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 10 of 10

Thread: inline popup

  1. #1
    New Coder
    Join Date
    Sep 2003
    Posts
    59
    Thanks
    0
    Thanked 0 Times in 0 Posts

    inline popup

    What I want is a popup like...

    <a href="member.html" target="_blank">Member</a>

    ...But I want to be able to customize what the window looks like (width, height, scrollbars/no scrollbars, etc.). If you know how I can do this I'd appreciate the help. Mostly I just don't want pages and pages of javascript because I gonna have quite a few of these little guys.
    ~SiNa94~
    http://seducius.port5.com/
    "Stab...die!"

  • #2
    Senior Coder
    Join Date
    Jun 2002
    Location
    ColoRockyz
    Posts
    1,646
    Thanks
    1
    Thanked 0 Times in 0 Posts
    You may want to rethink your strategy as pop-ups are becoming a thing of the past due to abuse. This is javascript so try posting a few doors up.
    Zoobie or not Zoobie...That is the problem.
    <body onUnload="flush( ! )">

  • #3
    Senior Coder
    Join Date
    Nov 2003
    Location
    Minneapolis, MN
    Posts
    2,879
    Thanks
    2
    Thanked 65 Times in 56 Posts
    Hello,

    Well, you'll have to use a little. w3schools has a bunch of good javascript tutorials. The one you want is here, the page is set up so you can play with the code and see the immediate effects. Hope this helps,

    -Rich

  • #4
    Senior Coder
    Join Date
    Jun 2002
    Location
    ColoRockyz
    Posts
    1,646
    Thanks
    1
    Thanked 0 Times in 0 Posts
    He wants inline like:

    <a href="#" onclick='window.open("page.html", "", "width=500, height=400, toolbar=no, location=no, directories=no, status=no, menubar=no");'>Pop it</a>

    Post in the javascript forum if you need more help
    Zoobie or not Zoobie...That is the problem.
    <body onUnload="flush( ! )">

  • #5
    Senior Coder
    Join Date
    Oct 2003
    Location
    Australia
    Posts
    1,963
    Thanks
    0
    Thanked 0 Times in 0 Posts
    This is exactly what you're after.
    It's the most user friendly way of going about it.
    Users can click it, right-click (open new window) and even bookmark the link without getting a JS error.
    Code:
    <a href="http://www.youngpup.net/" title="YoungPup.net" onclick="window.open(this.href,
    'popupwindow', 'width=800,height=600,scrollbars,
    resizable,menubar=1,location=1,toolbar=1'); return false;"> YoungPup.net</a>
    It comes from youngpup.net, hence the the link...


    *edit: You beat me zoobie

    I take no responsibility for the above nonsense.


    Left Justified

  • #6
    Senior Coder
    Join Date
    Jun 2002
    Location
    ColoRockyz
    Posts
    1,646
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Heh heh...but that throws an error and is no different than <a href="http://yahoo.com">Yahoo!</a> if the whole window is replaced.
    Zoobie or not Zoobie...That is the problem.
    <body onUnload="flush( ! )">

  • #7
    Senior Coder
    Join Date
    Oct 2003
    Location
    Australia
    Posts
    1,963
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I must have stuffed it up when I copied from the source of my site...

    Here it is again, no errors, user friendly...
    Code:
    <a href="http://www.youngpup.net/" title="YoungPup.net" onclick="window.open(this.href, 'popupwindow', 'width=800,height=600,scrollbars,resizable,menubar=1,location=1,toolbar=1'); return false;"> YoungPup.net</a>
    ANdrew

    zoobie: try it, it's very different to a standard <a>

    I take no responsibility for the above nonsense.


    Left Justified

  • #8
    New Coder
    Join Date
    Sep 2003
    Posts
    59
    Thanks
    0
    Thanked 0 Times in 0 Posts
    \/Look Down\/
    Last edited by sina94; 02-02-2004 at 08:52 AM.
    ~SiNa94~
    http://seducius.port5.com/
    "Stab...die!"

  • #9
    New Coder
    Join Date
    Sep 2003
    Posts
    59
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hey, thanks for the help Zoobie. That's exactly what I was looking for, a simple inline code. My approach just wasn't the right approach. Only one question, what does the # stand for when you put in in the href=? As for the use of pop ups, that's what I needed to go with the flow of my site, regardless of whether their out of style or not. I have everything loading in an <iframe>, and I wanted a specific part to open outside of the <iframe> without moving people all over away from where they're at. I'll post a link here as soon as I get it all done so you'll see why they're so important. But thanks again for the help.
    ~SiNa94~
    http://seducius.port5.com/
    "Stab...die!"

  • #10
    Senior Coder
    Join Date
    Oct 2003
    Location
    Australia
    Posts
    1,963
    Thanks
    0
    Thanked 0 Times in 0 Posts
    sina94, the problem with the code zoobie posted is that it will cause a javascript error if the user right clicks the link and chooses "open in new window".
    This may not sound like a big problem, but if you we're using a page the you knew had its content within an iframe, wouldn't you open a link in a new window so as to not lose your place? So would I, and so would any seasoned web surfer.
    The second code snippet I posted will not cause any such problem.
    Merely a heads up

    Andrew

    I take no responsibility for the above nonsense.


    Left Justified


  •  

    Posting Permissions

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