Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

window.showModalDialog() and form submission

Status
Not open for further replies.

bvallet

Programmer
Apr 10, 2001
52
US
I'm trying to do something and I'm not sure if I can. We currently create pop-ups using window.open(). These are independent forms that submit their values to completely different tables from the main form but are related (ex. main form - customer order list, pop-up - order detail). Window.open() works well except when the users get click happy and bury the pop-up window. Most of them don't even realize that there is a pop-up.

What I'm trying to do is use window.showModalDialog() to keep these pop-ups on top. This works well until the form is submitted. When that happens, a new browser instance is opened with the forms response loaded in it and the pop-up is unchanged. This doesn't work for us because the form's response is supposed to close the pop-up window and return the focus to the main form.

What I would like to know is, is there anyway to change this behavior or should I give up on using showModalDialog().

Any help would be greatly appreciated.
 
hie!

may be this is what u lookin for...

if'ya dont want 2 use Modal windows - u can 'imitate' it usin <body onblur=&quot;self.focus()&quot;> in your pop-up & use window.open()

hope it was helpfull

 
Thanks, I tried that.

The problem is, if they click somewhere else before the pop-up window is fully established, the window is still buried.

You wouldn't believe how many of my users think buttons need to be double-clicked.

Actually, I want to use Modal windows. I just want the response to the form submission to open in the pop-up window and not in a new browser instance.

That's not asking to much, is it?
 
sorry, i'm a novice, cant help u... :(

(but if u want the window (not modal) 2 appear in your case(if user clicked somewhere else) u might write onload=&quot;self.focus()&quot;)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top