View Full Version : Stop parent processing while dialog being shown

10-08-2003, 01:28 PM
This has probably been asked before but can't find it so sorry if I'm double-posting.

I'm trying to get a dialog box to pop up in circumstances where an XML link hasn't correctly populated data and ask the user to manually enter data.

taskbrwse.htm opens the popup window NOCPrompt.htm. I want taskbrwse.htm to stop processing until the user has closed NOCPrompt.htm in a bid to pursuade the user to use the popup. Is this possible? Using this code to open the dialog:

"window.showModelessDialog(~"NOCPrompt.htm?task=" +
TaskID +
"~",~"Enter NOC Ticket~",~"dialogHeight: 300px; dialogWidth: 300px; edge: Raised; " +
"center: Yes; help: No; resizable: No; status: No;~");"

TIA for any help.

[edit]This only needs to work for IE 5.0+

10-09-2003, 10:13 AM
You can try stoping the loading of a page till a javascript code is run and finished using a return condition, something like:

function somefunction() {
return true;

<body onload="return somefunction();">

I don't know if it works for onload, but I use it for onsubmit, and is OK. Try it

10-13-2003, 05:10 PM
Thanks for that Kor. Decided to work around the problem a bit.

Come across a problem though with it and help would be appreciated for this too! :D

when using window.showModelessDialog() I'd love to be able to submit a form on the dialog so that I can get some values out of the form and process them. Trouble is I get this error on document.forms.BrowseForm.submit();

Object doesn't support this property or method. I've isolated to the submit() that's causing trouble. Does this mean I can't submit a modeless diablog? If so is there something similar I can use??


10-14-2003, 10:33 AM
instead of

if BrowseForm is the name of the form

if you have a singlke form use

(that means the first form)

the full syntax is


where elements or element_name can miss, if the object of the method is the form itself, not the element

10-14-2003, 12:07 PM
Thanks for that, Kor. Sadly that doesn't work. I seem to think from my searches around the net the forms on Dialogs cannot be submitted which is a bit of a shame. Looks like I'll need to work around it somehow.

10-14-2003, 03:33 PM
Ok I've got this one sorted for now. I just open up the same file in another dialog and use the GET method to push through all the data I need. Not the prettiest solution but it works fine so I'm not complaining :)

Cheers for the help Kor ;)