0

I have a form that has a popup when a certain button is pressed on the page. If i filled in the form, but have not submitted it for posting yet and I press the popup button, when i go to exit the modal the form that I had filled in goes blank. I looking to prevent this. I dont want to have post when I click the popup button, I want to smoothly exit the modal so that when I go back to the parent page all the unsubmitted but filled in data is still there. Really the only code I am using that you have to worry about is i have an onclick event like this:

onclick="location.href=parent.location"

that was the easiest solution i found to exit the modal but obviously it has the one problem stated above.

thanks.

acmisiti
  • 425
  • 1
  • 4
  • 17
  • Without understanding how your particular modal works, we can't really help. – Diodeus - James MacFarlane Mar 07 '12 at 20:17
  • it is a simple modal. i explained it pretty well i thought. there is a page with a form on it. i click the modal popup and it appears. if the from behind the modal has information filled in but not submitted, when i go to close the modal it erases all the information filled in due to the onclick event explained above. modal is referenced from the button with href="#modal". what else is there to explain. – acmisiti Mar 07 '12 at 21:04

1 Answers1

0

So, after not getting any answers I decided to just make a note saying that "ESC to exit". This works fine. It only makes sense that if you are able to do this then you must be able to do the same on a button click.

acmisiti
  • 425
  • 1
  • 4
  • 17