Can I have a cycling carousel and a form on 1 page without losing data?

Jesse Rhee shared this question 4 years ago
Answered

Is there a way to have a page reload without clearing out my text boxes? I created a carousel, but in order to keep the carousel cycling, I ended it with a page reload so that the 'on page load' action would start the carousel again.


But now I have a form on the page. When my carousel completes a full cycle and the page reloads, I lose all my form data. Is there a way to make the form or carousel exclusive of the page? Or a way to lock the text boxes so they don't lose their data?

Comments (4)

photo
1

Hi Jesse,


Try saving the data in the text boxes on variables wit an "OnPageUnload" event and then restore the data in the text boxes by loading the info from the variables to the text boxes with an "OnPageLoad" event.


I think that should solve your problem.


Best regards,


Marc

photo
1

Thanks Marc! I'm going to give this a shot.

photo
1

Second part to the question-


I was able to save form data on the page reload. What I have now is a select list for Hotel, Car, Flight, etc. (think Travelocity). I have a dynamic panel next to my select list. The panel is dependent on which option is selected from the list (i.e. hotel on select list goes to hotel panel).


The problem is when I am NOT on the default panel and the page reloads, I am automatically taken back to my default panel. How do I keep form data AND stay on my current panel when the page reloads?

photo
1

Have a variable and when you have the event to 'set active panel' also change the value of a variable. Then 'OnPageLoad' depending on the value of the variable, you select one panel or another. (using conditionals)