Results 1 to 7 of 7

Thread: DHTML Window Widget (v1.1) Help Required

  1. #1
    Join Date
    May 2008
    Posts
    6
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default DHTML Window Widget (v1.1) Help Required

    Script Title: DHTML Window Widget (v1.1)

    Script URL (on DD): http://www.dynamicdrive.com/dynamicindex8/dhtmlwindow/

    Hi, I am trying to do open a url in the iframe using the modal window. But am I able to call a javascript function that is currently loaded in the modal window?

    I am currently stuck at this for a very long time. Please help. Thanks!!!

    Code:
    var emailwindow=dhtmlmodal.open('EmailBox', 'iframe', 'modalfiles/newsletter.htm', 'Newsletter Signup page', 'width=350px,height=200px,center=1,resize=0,scrolling=1')
    emailwindow.onclose= ....

  2. #2
    Join Date
    Jan 2008
    Posts
    4,168
    Thanks
    28
    Thanked 628 Times in 624 Posts
    Blog Entries
    1

    Default

    I didn't quite get that. Can I see the rest of your script? And your trying to get it to open up another page?
    Jeremy | jfein.net

  3. #3
    Join Date
    May 2008
    Posts
    6
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    Sorry, let me rephase:

    I have a page that calls upon the above script to view a page (example.html) in the dhtml modal window. However, when the user clicks the close button, I would like the onclose method to call upon a method in the example.html.

    Is that possible?

  4. #4
    Join Date
    May 2008
    Posts
    6
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    Also, somehow the modal window's onclose function does not work either. It closes the window without any questions asked.

  5. #5
    Join Date
    Jan 2008
    Posts
    4,168
    Thanks
    28
    Thanked 628 Times in 624 Posts
    Blog Entries
    1

    Default

    I think that you have to enable that. Can't help with your first question though.
    Jeremy | jfein.net

  6. #6
    Join Date
    May 2008
    Posts
    6
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    Hi Nile, so how do I do that? The examples given did not work either. Thanks!

  7. #7
    Join Date
    Jan 2008
    Posts
    4,168
    Thanks
    28
    Thanked 628 Times in 624 Posts
    Blog Entries
    1

    Default

    Here, an example from the page:
    onclose=function(){
    //your code here
    }


    A custom event handler that executes your desired code whenever the window is being closed. By returning false, you can cancel that action of closing the window. Here's an example that asks the user for confirmation when he/she attempts to close a window:
    Code:
    googlewin.onclose=function(){
    //returns false if user clicks on "No" button:
    var returnval=confirm("You are about to close this window. Are you sure?")
    return returnval
    }
    Jeremy | jfein.net

Bookmarks

Posting Permissions

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