Reputation: 7663
I have created a website survey that is in the footer of our site. Obviously the footer is on every page within our site.
There is a link in the footer that opens a very basic include via jQuery toggle. (form.aspx)
Once the form is submitted it is sent to another page that is not using jQuery toggle for processing (processing-form.aspx). Which takes the user away from the page they might be visiting.
What can I do to keep the user experience in tact and not have to process on another page, and redirect back, or make a link "click here to return to the page you were on".
Upvotes: 1
Views: 171
Reputation: 29725
What you want to do is to have your survey process the form submission via AJAX, which will allow it to be processed without a full round trip to the server. Once the form is submitted, you can then use your jQuery code to hide the form.
A nice article about accomplishing such a task can be found here.
Upvotes: 2
Reputation: 983
Use an HTTP handler instead of a separate page, and use jQuery to make an asynchronous call to the page and display some sort of "Thank you for responding" message in place of your survey.
http://www.15seconds.com/Issue/020417.htm
Upvotes: 1