Results 1 to 2 of 2

Thread: DHTML Window Widget open on click only

  1. #1
    Join Date
    Aug 2010
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default DHTML Window Widget open on click only

    1) Script Title: DHTML Window Widget

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

    3) Describe problem: Great script. I am trying to set it up so that it only opens the window when a link is clicked, not on page load. My knowledge of script editing is very limited !

    Thanks

  2. #2
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    If you look at demo 3 on the script page, it is opened via a link, and not automatically. Instead of calling dhtmlwindow.open() directly, simply wrap it in a function, and call it onClick inside the link. For example:

    Code:
    <script>
    function openwindow(){
    var googlewin=dhtmlwindow.open("googlebox", "iframe", "http://images.google.com/", "#1: Google Web site", "width=590px,height=350px,resize=1,scrolling=1,center=1", "recal")
    }
    </script>
    
    <a href="#" onClick="openwindow(); return false">Create/ Open Window</a>
    DD Admin

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
  •