By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,520 Members | 1,268 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,520 IT Pros & Developers. It's quick & easy.

xfering control to JS function at completion of <form> submit

P: n/a
Don
Hi all,

Is there some way in a <form> tag to transfer control to a JavaScript function after completion of
the submit, where the <form> and function are on the same page? I believe ONSUBMIT and similar
event handlers can be used to transfer control to a function just before the submit is completed.
But, I'm looking for a way to transfer control afterwards.

Thanks in advance.
Don
-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----== Over 100,000 Newsgroups - 19 Different Servers! =-----
Jul 23 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
VK
No, it is not possible in the flat design (script and form on the same
page).

After page is gone (upon submission), it's gone: with all its scripts,
pictures, forms etc.
The only workaround would be to include the needed script into the response
page generated on the server. Just populate that script on fly using form
data and attach its functions to the onLoad event.

It is possible to play tricky with frame/iframe to separate script and form
(script in one frame, form in another). But it's only if you are absolutely
insisting on staying strictly client side.

Jul 23 '05 #2

P: n/a
>Don <no@adr.com> wrote:
Hi all,

Is there some way in a <form> tag to transfer control to a JavaScript function after completion of
the submit, where the <form> and function are on the same page? I believe ONSUBMIT and similar
event handlers can be used to transfer control to a function just before the submit is completed.
But, I'm looking for a way to transfer control afterwards.

"VK" <sc**********@yahoo.com> wrote:
No, it is not possible in the flat design (script and form on the same
page).

After page is gone (upon submission), it's gone: with all its scripts,
pictures, forms etc.
The only workaround would be to include the needed script into the response
page generated on the server. Just populate that script on fly using form
data and attach its functions to the onLoad event.

It is possible to play tricky with frame/iframe to separate script and form
(script in one frame, form in another). But it's only if you are absolutely
insisting on staying strictly client side.


If the form was submitted to another frame/window the page would not
be destroyed. The onload handler of the page resulting from the form
submission could call into script in the original frame.

Regards,
Steve
Jul 23 '05 #3

P: n/a
Don
On Wed, 29 Sep 2004 17:29:20 GMT, Steve van Dongen <st*****@hotmail.com> wrote:
Don <no@adr.com> wrote:
Hi all,

Is there some way in a <form> tag to transfer control to a JavaScript function after completion of
the submit, where the <form> and function are on the same page? I believe ONSUBMIT and similar
event handlers can be used to transfer control to a function just before the submit is completed.
But, I'm looking for a way to transfer control afterwards.


"VK" <sc**********@yahoo.com> wrote:
No, it is not possible in the flat design (script and form on the same
page).

After page is gone (upon submission), it's gone: with all its scripts,
pictures, forms etc.
The only workaround would be to include the needed script into the response
page generated on the server. Just populate that script on fly using form
data and attach its functions to the onLoad event.

It is possible to play tricky with frame/iframe to separate script and form
(script in one frame, form in another). But it's only if you are absolutely
insisting on staying strictly client side.


If the form was submitted to another frame/window the page would not
be destroyed. The onload handler of the page resulting from the form
submission could call into script in the original frame.

Regards,
Steve

Thanks Steve. I'll give it a try. Won't be able to get back to it for a few days.
Don
-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----== Over 100,000 Newsgroups - 19 Different Servers! =-----
Jul 23 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.