Form submission before page reload
i have a popup window where i submit a form ... after the form is submitted i want to reload the parent page . I use <form onsubmit :
but sometimes the form is not submitted and the page is reloaded...so how can i check if the form has finished submission and than to reload parent page and close popup??
There may be an easier cross-browser solution but one way that should work everywhere is to have your form not really "submit" at all. Send the data by AJAX and then close the window when the receipt of the data is acknowledged by a message from the server.
can you be more specific...
supose we have a $_POST['name']; and we want to insert or update this input to a db field callled 'name'...
taking in consideration this example can u explain it more specific
Basically the process would consist of:
(1) grabbing the values set by the user in the form and assembling them in a manner suitable for a POST request (or GET request if you are using that)
(2) sending the data off to the server via AJAX
(3) getting a response back from the server and reacting to it.
Which of these gives you a problem? I don't mind helping but I really hate going into detail about something that the person already knows and understands.
And also, after this reply I am going down to sleep. Any reply might not be speedy.
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Tags for this Thread