I'm making a website. It's a simple profile page. I don't have any subpage, I just do 3 divs and change them and css.
But because its a radioset, if you refresh the page from cache (f5) or duplicate the tab, or press back/forward, the form data remains intact so it shows the proper div. This is good behavior. However I only see this in Firefox.
Browsers like google chrome are not keeping the form data on (f5) refresh from cache but it clears form data (as if it is a reload from server). How can I make form data persist on reload from cache in this browser?
here is the site if you would like to see what i mean: http://noitidart.github.io/
I understand people sometimes want the opposite behavior then I'm looking for. They want form cleared even on reload (as Chrome currently does) but that's easy to ensure in Firefox just stick in a document.form.reset() in the head.
Firefoxes restore of form data values is fine on reload (without Shift or CTRl;).
This is missing in Google Chrome.
I found this:
autocomplete="off"
https://github.com/pradosoft/prado/issues/642
Perhaps autocomplete="on" would make it happen? :) i dont know.
stackoverflow.com uses it too.
Related
I make a multi-device app that has a TWebBrowser component.
If i write this code
WebBrowser1.Navigate('https://google.com');
it opens the form as it should be.
But if i write this code
WebBrowser1.Navigate(edit1.text);
where edit1.text=the URL of a GoogleForms form (=https://docs.google.com/forms/d/e/1FAIpQLScLDCv_LeYJzvMoxnmvt_gN_gqeup7_vbU8VLaC-qXNPEGMIQ/viewform?vc=0&c=0&w=1&fbzx=3551763952707733753), it shows the form confused (the dropdown components as list of text, the "submit" button as text etc) like this :
is there a solution, please ?
PS. the form is opened in Internet Explorer (and Google) right.
The reason why this happens is that by default TWebBrowser component is opening web pages in compatiblity mode. This prevents myn moder web pages to show properly.
So in order to avoid this you need to opt in to the browser emulation feature using the documented registry key.
You can find more info about this on the link bellow
https://stackoverflow.com/a/25843958/3636228
I have edited my existing smart form in smart form configurations in settings menu.
Then I have published and updated the smart form in contents folder properties.
Now I went to particular content which is using that particular smart form in CMS 400 editor and I can see the changes.
But when I go through the page in browser it still shows the old smart form.Unable to reflect changes in browser. please help me.
Thanks in advance
It would help to know what version you're running. That being said, there are a few things that could be going on here...
Caching
FrameworkAPI caching might be turned on, in which case you'd have to wait for the cache expiration or recycle the app pool in order to see updated content. Caching is enabled in web.config by changing the defaultContainer property in this section to Cache.
<ektron.framework.services>
<unity configSource="ektron.cms.framework.unity.config"/>
<framework defaultContainer="Default" childContainer="BusinessObjects"/>
</ektron.framework.services>
Republish the content
Changes to a smart form definition won't immediately trickle down to all content blocks using that particular smart form. If you add a field (for instance), that field won't exist on any content blocks unless you open up that content block in edit mode and republish it. It will automatically be added to the content block when you click Edit, but that change won't be saved until you click publish.
I'm working on a page with 9 inputs and js that performs logic on those inputs before submitting it. It's getting really annoying having to enter the information into the forms every time I want to see my javascript changes.
Is there a way to refresh the page without clearing the form?
P.S. I'm working in IE9+, Chrome, Firefox, and Safari.
Thanks in advance!
Apparently, there are few tools (if any) that do this (at least that I was able to find). I've found a way to do this by writing a script that hijacks the window event loop and stores all the input values in a stringified cookie. When you refresh the page, you can use window.onload to automatically repopulate the inputs.
If you (understandably) don't want to write your own script to do this, I've written one you are welcome to use on github.
Today I was doing this thing with Spring:
Have a page with a form and a chance to choose one item related to the form.
If you push "Choose item" the app will save somehow what you typed in the form, go to another page, let you choose the thing.
When you are back to the form it's filled with what you wrote before going to the other page, plus the item chosen.
Seems easy, but you have to take into account that for some stupid reason the user could open the page where you choose the item (maybe because of a bookmark, or because he pressed the back button 10 times to play). You know what I mean. I tried many ways, mainly based on HttpSession... I don't like any of those. None of them seems elegant. I was even thinking of using a hidden form in the other page, but given that it is not unique to this "flow" (I mean you can go to the item choose page from others as well), I will have to worry about conflicts and so on.
So what would be the preferred way for you? Suggestions?
Go around the problem instead of solving it. You can use a modal javascript div popup where the user can pick the item she wants. The contents of this div can be loaded via ajax (separate Spring MVC controller called with Http GET). Once the selection has been made, you close the popup (hide the div) and copy the value into the original form. Done.
No need to store the state anywhere.
I suggest Spring Web Flow.
Spring Web Flow compliments the Spring MVC.
Here is link to Spring Web Flow Demo
Is there a way to prevent programs like Firebug from manipulating the DOM of a page.
I've noticed that you can simply delete thing like ads that are paid for by other companies.
Is there a way for the page to stop it?
Can you prevent me from switching to another channel on TV, or from cutting away ads from my newspaper? No. Same thing with my PC.
In other words: the page is in the client's computer, and the client can do whatever they wish with it.
The simple answer is no.
The long answer: if you construct your ads from many unrelated absolute-positioned elements, it will be next to impossible to delete them.
The right answer: if your ads are so obtrusive that you have to worry about people deleting them, then you should rethink your business.
Firebug runs in the context of the displayed page, and since pages' scripts can alter dom and delete things, firebug can too.
However you can run some javascript to check if the ad is deleted, and restore it, but still that javascript can be stopped/disabled with firebug.