Welcome to TalkGraphics.com
Results 1 to 8 of 8
  1. #1
    Join Date
    Aug 2000
    Location
    wakefield,nelson,new zealand.
    Posts
    57

    Default

    Hi guys, anyone know if it is possible to launch different size popups from the same page and where i might find the code, thanks again Dave.
    IP

  2. #2
    Join Date
    Aug 2000
    Location
    wakefield,nelson,new zealand.
    Posts
    57

    Default

    Hi guys, anyone know if it is possible to launch different size popups from the same page and where i might find the code, thanks again Dave.
    IP

  3. #3
    Join Date
    Aug 2000
    Location
    NS Canada
    Posts
    212

    Default

    Hi Dave ...

    Very simple to do by linking to an external .js for all your popups.

    1. Create a file called "whatever.js" and add this :

    2. Link to it from your HTML page :

    <SCRIPT language="JavaScript" src="whatever.js" type="text/javascript"></script>

    3. Add your onunload in the body tag :

    onUnload="closePopP()"

    4. Call your popup like this :

    And of course, you can change the above attributes (url, size, scrolls etc) with each link.

    Hope that helps.

    cfn ... Jen
    Jen Worden
    Web Developer
    www.meadoworks.com
    cfn ... Jen

    Jen Worden
    Web Developer
    www.meadoworks.com
    IP

  4. #4
    Join Date
    Aug 2000
    Location
    wakefield,nelson,new zealand.
    Posts
    57

    Default

    Thanks for your help once again jen this is exactly what i was after, keep up the great work, regards Dave.
    IP

  5. #5
    Join Date
    Aug 2000
    Location
    Las Vegas, NV
    Posts
    819

    Default

    Welcome back Jen...we missed ya!

    Mickie
    IP

  6. #6
    Join Date
    Aug 2000
    Location
    Ingolstadt, Germany
    Posts
    358

    Default

    <blockquote>onclick="javascriptpenPopP();"</blockquote>

    Oops, quick correction to the HTML part: don't include the 'javascript:' bit - that's for javascript URLs (eg. <a href="javascript:doSomething();"> - incidentally javascript URLs are almost always the wrong thing to do and are best avoided). 'onXXX' event handlers are direct JavaScript of course, no prefix needed.</p>

    Another issue is that with this form, the main window will still navigate to "yourlink.html" after the popup is opened. If following the link is not desired behaviour (it usually isn't), the onclick handler should return false (<code>onclick="openPopP(...); return false;"</code>) to stop the link working.</p>

    My favoured approach is to use <code>this.href</code> in the call to the function, so you only have to write the link URL once, in the href, to make the popup use the same link (non-JavaScript browsers can still follow the link of course just not in a popup). Also I like to put a <code>return false;</code> at the end of the open-popup function so I can write just the following HTML:</p><div><code></code><a href="page.html" onclick="return popup(this.href, ...);"></div>
    IP

  7. #7
    Join Date
    Aug 2000
    Location
    NS Canada
    Posts
    212

    Default

    Doh! Thanks Andrew for correcting those - 'twas a long day, I guess. :0


    PS. Just noticed your welcome message, Mickie, thanks! (I've been lurking around, in between canoe/kayak trips [img]/infopop/emoticons/icon_smile.gif[/img] ;, so many helpful responses that I don't have to interject as often!)

    [This message was edited by Jen Worden on August 14, 2001 at 08:17.]
    cfn ... Jen

    Jen Worden
    Web Developer
    www.meadoworks.com
    IP

  8. #8
    Join Date
    Aug 2000
    Location
    wakefield,nelson,new zealand.
    Posts
    57

    Default

    Thankyou guys for the help,keep up the good work regards Dave.
    IP

 

 

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
  •