PDA

View Full Version : Help with ModalDialog script!!


Wobbler
07-28-2003, 05:39 PM
opener = window.dialogArguments;

var _editor_url = opener._editor_url;
var objname = location.search.substring(1,location.search.length);
var config = opener.document.all[objname].config;
var editor_obj = opener.document.all[objname];
var editdoc = editor_obj.contentWindow.document;

I tried everything but I always get an error on row 16 (var editdoc......)


the code that opens the ModalDiolog:

showModalDialog(_editor_url + "editor/table.html?"+objname,window,"resizable: no; help: yes; status: no; scroll: no;dialogHeight:18em ");


_editor_url sets the path from root directory (Currently set to "")
objname sends a string with the name of the form to the ModalDiaolog (Currently set to "editor")

Wobbler
07-28-2003, 07:21 PM
anybody?

Danne
07-28-2003, 07:53 PM
What kind of object is window["objname"] ?

showModalDialog(_editor_url + "editor/table.html?"+objname,window,"resizable: no; help: yes; status: no; scroll: no;dialogHeight:18em ");

Wobbler
07-28-2003, 07:57 PM
It's the form name from the main document.
Or what do tou mean?

Danne
07-28-2003, 08:42 PM
yes, that's what I meant..:)

so in other words "editor_obj" is a form. According to msdn (http://msdn.microsoft.com/workshop/author/dhtml/reference/objects/form.asp) there is no form property called contentWindow.

What is "editdoc" intended to be? The document of the caller window? In that case try:
var editdoc = opener.document;