Not sure if I'm in the correct forum but...

I have a form with three select boxes. Box 1 has a variety of choices, but boxes 2 & 3 are empty. When the person selects an option from box 1, box 2 gets populated with choices. When the person selects an option from box 2, box 3 gets populated with choices.

This is handled with javascript through either onblur or onchange (still working on which will work best for this).

The problem occurs after pressing submitting the form and then pressing the back button. All fields maintain their data EXCEPT boxes 2 & 3.

How do I get it so that those two boxes keep the data like the rest of the form?

Recommended Answers

All 2 Replies

Member Avatar for rajarajan2017

I suggest you to utilize AJAX for this, It will maintain the data even the page get refreshed. In your scenario the page got refreshed and the text box values are resetted.

I've never used AJAX but I think I'll start looking at it. Thanks.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.