Results 1 to 8 of 8

Thread: pop-up

  1. #1
    Join Date
    Jul 2006
    Location
    Antwerp, Belgium (Europe)
    Posts
    927
    Thanks
    121
    Thanked 2 Times in 2 Posts

    Default pop-up

    How can I create a pop-up window with scrolling, without naming it as a link to another page like this:
    Code:
    <a href="#" onClick="MyWindow=window.open('copyright.html','MyWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,width=500,height=350'); return false;" class="id">all content and visuals copyright 2004-2007</a> |
    So having it incorporated in the code of the page itself.

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    It is unclear to me what you want. You can create a pop up like so:

    Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd">
    <html>
    <head>
    <title></title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <style type="text/css">
    #copyright {
    color:blue;
    background-color:lightyellow;
    text-decoration:underline;
    cursor:pointer;
    }
    </style>
    <script type="text/javascript">
    function myPop(){
    myPop.win=window.open('','copyright','scrollbars,resizable,width=500,height=150');
    myPop.win.document.write('all content and visuals copyright 2004-2007');
    myPop.win.document.write('<p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p>');
    myPop.win.document.close();
    myPop.win.focus;
    }
    </script>
    </head>
    <body>
    <span id="copyright" onclick="myPop();">&copy;</span>
    </body>
    </html>
    But, at that rate, you might prefer to use something like:

    http://www.dynamicdrive.com/dynamici...ndow/index.htm

    as, pop up blockers will prevent a pop up sometimes.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. #3
    Join Date
    Jul 2006
    Location
    Antwerp, Belgium (Europe)
    Posts
    927
    Thanks
    121
    Thanked 2 Times in 2 Posts

  4. #4
    Join Date
    Jul 2006
    Location
    Antwerp, Belgium (Europe)
    Posts
    927
    Thanks
    121
    Thanked 2 Times in 2 Posts

    Default

    http://www.dynamicdrive.com/dynamici...ndow/index.htm
    That's what I was looking for, but just one detail:
    how can I remove the function of the minimilising of the window (_) ?
    I only want the visitor to be able to close the window.
    Thanks !

  5. #5
    Join Date
    Sep 2005
    Location
    India
    Posts
    1,627
    Thanks
    6
    Thanked 107 Times in 107 Posts

    Default

    I don't think it is possible to supress the minimize and maximize buttons in all the browsers.

    Either have to develop some JavaScript based solution for that....

  6. #6
    Join Date
    Jul 2006
    Location
    Antwerp, Belgium (Europe)
    Posts
    927
    Thanks
    121
    Thanked 2 Times in 2 Posts

    Default

    In the given link, it must be possible, as you decide yourself wether to place them or not. I just don't know how to take that part out without messing the whole code up. Is this the only line I would have to take ou ?
    Code:
    domwindowdata+='DHTML Window <div class="drag-controls"><img src="'+this.imagefiles[0]+'" title="Minimize" /><img src="'+this.imagefiles[1]+'" title="Close" /></div>'

  7. #7
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    The easiest way to take something like that out without messing up the rest of the script is to set its visibility to hidden:

    Code:
    <img style="visibility:hidden;" src="'+this.imagefiles[0]+'" title="Minimize" />
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  8. #8
    Join Date
    Jul 2006
    Location
    Antwerp, Belgium (Europe)
    Posts
    927
    Thanks
    121
    Thanked 2 Times in 2 Posts

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
  •