Posts [ 3 ]

Topic: Effects on revisit of a page

Hello,I am using Prototype.js and Effects.js with a form I am developing and have run into an issue. The effects are working fine on the initial run of a page. The behavior of the form hides certain fields depending on the value of a radio button. If the elements are hidden, and a user leaves the page, and then returns to the page, elements are again visible. The radio buttons are maintaining their values upon returning to the initial page. I am also attempting to use the same functionality with checkboxes.

Re: Effects on revisit of a page

Do you mean return to the page as in using your browser's back button to go back to the page, or as in clicking on a link that goes back to the page?

If you're using the browser's back button (or javascript to step back through the browser history), then the form field values are going to be remembered by the browser, hence the reason your radio buttons aren't being reset.

Re: Effects on revisit of a page

Thank you Kelli,I ended up resolving this by changing my onLoad call to call a function that combined the stuff to make my validation work and field checkers for the effects.

in my view I put

<body onload="onloadCombinerp2()">

and in my javascript, I put:function onloadCombinerp2() {// this function loads the validity checker and makes fields visible or not visible dependent upon the status of the check box and referral type radio buttons on page 2 var v = new Validation('page1', {immediate:true, useTitles:true});