#1
  1. No Profile Picture
    sgisser
    Guest
    Devshed Newbie (0 - 499 posts)
    I have several links on a page. Each needs its own popup window. I do not know javascript so please be gentle and as clear about placing the text into my html as you can.
  2. #2
  3. No Profile Picture
    sawz
    Guest
    Devshed Newbie (0 - 499 posts)
    this script will allow pop up windows, it will also allow your pop ups to have pop ups:

    in the <head> section:


    <SCRIPT Language="JavaScript">
    var win1Open = null
    var win2Open = null
    function openPopUp(windowURL, windowName, windowWidth, windowHeight){
    var winHandle = window.open(windowURL,windowName,"toolbar=no,scrollbars=yes,resizable=no,width=" + windowWidth + ",height=" + windowHeight)
    return winHandle
    }
    function winClose(){ // close all open pop-up windows
    if(win1Open != null) win1Open.close()
    if(win2Open != null) win2Open.close()

    }
    function openPopUpWindow(){} // does nothing but required by JavaScript & shows in status bar
    </SCRIPT>
    <SCRIPT Language="JavaScript1.1"> // improved openPopUp function for Netscape 3+
    function openPopUp(windowURL, windowName, windowWidth, windowHeight){
    var winHandle = window.open(windowURL,windowName,"toolbar=no,scrollbars=yes,resizable=no,width=" + windowWidth + ",height=" + windowHeight)
    if(winHandle != null) winHandle.focus() //brings window to top
    return winHandle
    }
    </SCRIPT>

    now for your links:

    <A HREF='JAVASCRIPT penPopUpWindow()' onClick='win1Open=openPopUp("your_doc.html", "popWin1", "250", "225")'>

    your initial pop up will be "popWin1", if you want to have a pop up from the first pop up, then change this to "popWin2".

    I hope this helps.



    [This message has been edited by sawz (edited 11-12-99).]
  4. #3
  5. No Profile Picture
    sgisser
    Guest
    Devshed Newbie (0 - 499 posts)
    Thanks but where do I place this on my HTML and where do I place the "link text" from my existing page, and where do I place the name of the pop up to be opened. I have four popups to be opened by clicking on the existing link text.

    Also, I need 1 line of scrolling text for a home page. Could you possibly provide code for it?

    Thank you very much for all your help,
  6. #4
  7. No Profile Picture
    sawz
    Guest
    Devshed Newbie (0 - 499 posts)
    on top i provided the script, this belongs in the head part of your document.


    now, below this i gave you the tag to place where your links are in your code. this can be placed anywhere as long as the script is in place.

    this has to be edited for your needs, ie the name of the page, and the size of the pop up.

    also in the script, you can configure these pop ups to have a scrollbar or not, a toolbar or not, its highly configurable.

    its hard for me to explain these things, i just know how to make them work.

    take the script and linking info and play around with it, thats how i learned.

    i don't know why that image showed up in the script but its supposed to be instead of that frowny face.

    as far as a scrolling message, try www.javascripts.com
    thats where i get all my stuff
  8. #5
  9. No Profile Picture
    sawz
    Guest
    Devshed Newbie (0 - 499 posts)
    that frowny faCE IS PIISIN ME OFF.

    its suppose to be this :
    plus a small o no spaces...geeez
  10. #6
  11. No Profile Picture
    sgisser
    Guest
    Devshed Newbie (0 - 499 posts)
    ok thanks I'll try

Similar Threads

  1. feedback - span links = yuck
    By shreela in forum Dev Shed Lounge
    Replies: 2
    Last Post: January 28th, 2004, 11:59 PM
  2. Parsing text links and BBCode at the same time
    By Krypt in forum PHP Development
    Replies: 5
    Last Post: October 11th, 2003, 01:57 PM
  3. automaticaly displaying links in several categories
    By robstl70 in forum PHP Development
    Replies: 0
    Last Post: August 13th, 2003, 09:38 PM
  4. MS Outlook - breaking links in HTML emails
    By rod k in forum Dev Shed Lounge
    Replies: 10
    Last Post: August 22nd, 2002, 10:05 PM
  5. A:visited links
    By ljp099 in forum HTML Programming
    Replies: 4
    Last Post: May 21st, 2002, 11:06 PM

IMN logo majestic logo threadwatch logo seochat tools logo