Close new window opened by Form without confirmation message....
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Anonymous
Posted On:   Tuesday, March 27, 2001 08:06 AM

I have 2 forms in a single HTML pg. i'm submitting the first form using document.form1.submit(), using the onLoad event & sending a hidden variable that updates a table..

To let the second form stay in the main page for further processing, i have set the target of the first form to _blank & on submission it opens up in a new window...

I want the updation to happen without a new window being opened if possible :-(
..or i want the new window to close immediately..

hope it all makes sense..

Re: Close new window opened by Form without confirmation message....

Posted By:   Dave_Eaves  
Posted On:   Monday, April 2, 2001 09:42 AM

See this answer for how to post a form to a new window.


http://www.jguru.com/forums/view.jsp?EID=390453


The secret to closing the window without having a confirmation message appear is to name the new window and then have the window that created it close it.


Window A opens Window B and gives it a name (e.g. windowB);


Put a function in your calling window that closes the window you opened (e.g. closeChildWin). Put a function in the page that serves as the response from your cgi program.


function in Window A

function closeChildWindow()

{



windowB.close();



}


function in Window B

function pageLoad()

{


// Call this onLoad function onLoad

parent.closeChildWindow();



}

About | Sitemap | Contact