|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
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
|
|||
|
|||
|
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 URLpenPopUpWindow()' 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).] |
|
#3
|
|||
|
|||
|
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, |
|
#4
|
|||
|
|||
|
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 URL instead of that frowny face. as far as a scrolling message, try www.javascripts.com thats where i get all my stuff |
|
#5
|
|||
|
|||
|
that frowny faCE IS PIISIN ME OFF.
its suppose to be this : plus a small o no spaces...geeez |
|
#6
|
|||
|
|||
|
ok thanks I'll try
|
![]() |
| Viewing: Dev Shed Forums > Web Design > HTML Programming > several popups fr links |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|