...

View Full Version : help with form and showmodaldialog



Spoon
07-29-2002, 06:20 PM
Hi guys,

Can someone help me with the following:

I have a piece of code that opens a window that has asp and javscript in it (dont worry the asp doesnt do much!).
Here is my code to actually open the window:



function insertImage()
{
if (isHTMLMode){alert("Please uncheck 'Edit HTML'");return;}
idContent.focus();
idContent.document.selection.createRange();

upload_img = showModalDialog("pop_rte_image.asp","","status:no;dialogWidth:400px;dialogHeight:200px;help:no" );
if (upload_img) {
idContent.focus();
var sel = idContent.document.selection.createRange();
sel.pasteHTML(upload_img);
}
}


However there is a form in the window(upload_img = showModalDialog("pop_rte_image.asp","","status:no;dialogWidth:400px;dialogHeight:200px;help:no" );) i open and when it is submitted for some reason a new window is opened. I cant get it so that the window submits the form in itself.

Can this be done? how do i fix it? plzzzzz :)

tamienne
07-29-2002, 09:11 PM
can you post your html/javascript from pop_rte_image.asp

Spoon
07-29-2002, 11:39 PM
I have stuck it in a text file, the link is

www.aslickpage.com/code.txt

I really need help with this guys, thanks. Just wish it would all happen in that window!

Spoon
07-30-2002, 05:48 PM
bump...

blindbull
09-05-2002, 10:46 AM
You need to use an IFRAME to stop the spawning of new windows. Do a search for showmodaldialog on this group to see how. I posted a question on the subject of returning values and this has code in it that demonstrates.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum