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

Statement not coming after form.submit

P: n/a
Hi all

I am trying to submit the form and after form.submit line i am trying
to open a url using window.open....

I found in some forum it is not possible to reach out the statement
after the form.submit

The alternate way is having a alert next to form.submit will execute
the following statements.... this is ok...

My problem is in form.submit only i am creating a file and i am trying
to open the same file in next statement... This thing i am not able to
achieve it.... how we can handle this situation....

document.forms[0].submit();
alert('You are about opening file/folder');
var openUrl=host + rootFolder + "/" + dstFile;
//alert(openUrl);
window.open(host + rootFolder + "/" + dstFile)

thanx in advance for ur quick reply

Mar 21 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a
su***************@gmail.com wrote:
I am trying to submit the form and after form.submit line i am trying
to open a url using window.open....
True. The execution context is supposed to be exited/lost
when the location the enclosing resource points to changes.
I found in some forum it is not possible to reach out the statement
after the form.submit
"Reach out"?
The alternate way is having a alert next to form.submit will execute
the following statements.... this is ok...
You are not making any sense.
My problem is in form.submit only i am creating a file and i am trying
to open the same file in next statement...
You cannot.
This thing i am not able to achieve it.... how we can handle this
situation....


"Open the file" (better: access the resource in a newly opened popup
window), using code in the _response_ document. A better approach
would be to open the window first and then submit to it. This
solution has been posted here numerous times before; search the
archives for "form target onsubmit".
PointedEars
Mar 21 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.