I am new to web programming and am creating a site in flash. The person I’m doing the site for wants smaller windows showing information to popup when a button is clicked. I was told to use javascript pop() function. If I write the script for one button it works just fine. My problem is, is I need the function to work on four separate buttons. I am pulling my hair out since I don’t know the language.
Here is the code I put in the index.html page:
<SCRIPT LANGUAGE = “JavaScript”>
function pop() {
window.open(“popup.html”, “”, “height = 400, width = 600, left=100, resizeable = no, top=100”);
window.open(“popup1.html”, “”, “height = 400, width = 600, left=100, resizeable = no,top=100”);
window.open(“popup2.html”, “”, “height = 400, width = 600, left=100, resizeable = no,top=100”);
window.open(“popup3.html”, “”, “height = 400, width = 600, left=100, resizeable = no,top=100”);
}
</SCRIPT>
popup.html should work on the first button, popup1.html should work on the second button and so forth.
To call the script the buttons are written
on (release){
getURL (“JavaScript:pop();”);
}
Written this way all four popup windows open on each button. I do not know how to distinguish which popup to go with which page. I have tried writing the button code with each button having their respective popup# with in the parenthesis of the getURL script.
I have tried using an if statement but not sure I wrote it right because it didn’t work. Also tried a case statement and that didn’t work.
Hope this makes sense. If anyone could please help I’d greatly appreciate it.
Thank you.
Samel