Results 1 to 8 of 8

Thread: Popup Help

  1. #1
    Senior Member
    Join Date
    Aug 2003
    Posts
    300

    Popup Help

    I need help with creating a boderless popup window. I can create a regular popup or a popup with just the blue title-bar but I am talking about a pop-up with nothing but a graphical X in the corner. I have been looking all over GOOGLE and can't seem to find it. Some help would be much appreciated.

    Thanks

  2. #2
    Senior Member Zonewalker's Avatar
    Join Date
    Jul 2002
    Posts
    949
    you need something like

    <script language="javascript" type="text/javascript">
    <!--

    function popname()
    {
    window.open('pagename.html','popname',
    'toolbar=no,location=no,directories=no,status=no,
    menubar=no,resizable=no,copyhistory=no,
    scrollbars=no,width=640px,height=480px');
    } -->
    </script>

    and then followed by this in the <body> text

    <a href="JavaScript: popname()" onMouseOver="window.status='Please click to view a larger picture.'; return true" onMouseOut="window.status=''; return true"> image tag or hyperlink here
    </a>


    that will give you the pop up with nothing else except the windows title bar with the usual minimise, maximise and close buttons.... that what you meant? If you want to get rid of the windows title bar as well... let me know - don't recall off the top of my head if it's possible... think it is.
    hope that helps

    Z

    PS the javascript between { } should all be on one line not over several lines - had to break it up to make it more readable on AO. Oh and the width and height can be whatever dimensions you like...
    Quis Custodiet Ipsos Custodes

  3. #3
    GreekGoddess
    Guest
    they're called chromeless popups...btw
    here are a couple of more in depth tutorials, including positioning.

    http://www.telophase.net/viewtut.php?TutID=1
    http://www.telophase.net/viewtut.php?TutID=2

  4. #4
    Senior Member Zonewalker's Avatar
    Join Date
    Jul 2002
    Posts
    949
    are they... well - learn something new every day... cheers! I liked the picture in those pop ups in the tut's though... except... 'gother than thou'... heh I think not

    it would probably have been more helpful if I had explained the javascript rather than just giving it away... so I'd recommend giving the tuts a look adiz

    Z
    <edit> by the way Christina... the second link doesn't seem to be working, comes up with a fatal MySQL error
    Quis Custodiet Ipsos Custodes

  5. #5
    Senior Member
    Join Date
    Aug 2003
    Posts
    300
    Thanks for your responses but I am looking to see if there is a way to actually make a pop up with no IE title bar just a graphic... I haven't been able to find anything yet cause it stills comes up with the title bar no matter what code I try... Oh well guess I need to try harder... Any input would be helpful...


    Thanks

  6. #6

  7. #7
    Senior Member Zonewalker's Avatar
    Join Date
    Jul 2002
    Posts
    949
    I am fairly sure it can be done.... but I'm just not 100% sure how - I think for the open window event there is a parameter for the title bar, same as there is for the toolbar. However I don't think its advisable to get rid of the title bar as you have suggested, since a pop up window without some easy way of closing it tends to be really irritating. And as well many people use pop up blockers these days - hell even the google toolbar v2 has a pop up blocker integrated into it

    During some searches though I found some code to create a dragable layer rather than a pop up window - it's here;

    http://codelifter.com/main/javascrip...ablelayer.html

    I think this might actually suit you better rather than a true pop up, you'll just need to change the code to suit.... or use the code at the above website as a basis for writing your own.

    Hope that helps

    Z

    [EDIT] GG beat me to another link... but looking at the code, it doesn't actually remove the title bar... it just alters its appearance so that it looks non standard... looks good mind you! I am fairly sure there is a way to remove the title bar altogether... but as you might guess I'm not going to spend a lot of time on tracking down the answer because I don't think its a good idea to have a pop up window without a title bar of some form - sorry
    Quis Custodiet Ipsos Custodes

  8. #8
    Senior Member
    Join Date
    Aug 2003
    Posts
    300
    I have seen it and as long as you have a close button somewhere, it is alright. However, I really liked that drag window. And the code is completely editable I can toy with it so much and when you and a picture or something, it compensates for itself.

    Thanks, it wasn't what I was exactly looking for but it is awesome and will be archived!

Posting Permissions

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