If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > ASP > how to submit the form of childwindow???

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 11-29-02, 00:12
arun694 arun694 is offline
Registered User
 
Join Date: Oct 2002
Posts: 12
how to submit the form of childwindow???

Hi all

on clickof a button i open a childwindow and input some details in that childwindow. so on click of the submit button i want to submit the form to another page and update the database and return back to the child window or parent window which ever is possible.

please help in this issue. its very critical for me.

thanks
arun
Reply With Quote
  #2 (permalink)  
Old 11-29-02, 07:28
Mulligan Mulligan is offline
Registered User
 
Join Date: Jul 2002
Posts: 55
So you want the form in the child window to submit to a different page and then return to the parent or child window? Without lots of complex JavaScript-related shenanigans, this is pretty easy to do with ASP. When you open the child window from the parent, pass the URL of the parent window to it. Store this as a hidden form variable in the child window's form.

The child window's form should have action="" set to whatever page you wish to submit to and importantly, target="_parent". When you submit to the other page, do all your database processing and then Response.Redirect to the submitted URL form variable, which will then reload the parent page again in the parent window.

I'll leave closing the child window when you submit it, down to you. It's not that difficult; you need to wrap a JavaScript handler around the onSubmit event for the form which executes window.close() after calling form.Submit().
Reply With Quote
  #3 (permalink)  
Old 12-01-02, 05:04
arun694 arun694 is offline
Registered User
 
Join Date: Oct 2002
Posts: 12
thanks mulligan

Quote:
Originally posted by Mulligan
So you want the form in the child window to submit to a different page and then return to the parent or child window? Without lots of complex JavaScript-related shenanigans, this is pretty easy to do with ASP. When you open the child window from the parent, pass the URL of the parent window to it. Store this as a hidden form variable in the child window's form.

The child window's form should have action="" set to whatever page you wish to submit to and importantly, target="_parent". When you submit to the other page, do all your database processing and then Response.Redirect to the submitted URL form variable, which will then reload the parent page again in the parent window.

I'll leave closing the child window when you submit it, down to you. It's not that difficult; you need to wrap a JavaScript handler around the onSubmit event for the form which executes window.close() after calling form.Submit().
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On