Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    New to the CF scene
    Join Date
    Jul 2002
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    help with form and showmodaldialog

    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:

    Code:
    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

  • #2
    Regular Coder
    Join Date
    Jun 2002
    Location
    Delaware, USA
    Posts
    137
    Thanks
    0
    Thanked 0 Times in 0 Posts
    can you post your html/javascript from pop_rte_image.asp

  • #3
    New to the CF scene
    Join Date
    Jul 2002
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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!

  • #4
    New to the CF scene
    Join Date
    Jul 2002
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts
    bump...

  • #5
    New Coder
    Join Date
    Jul 2002
    Location
    Hastings, East Sussex
    Posts
    24
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •