View Full Version : pop-up window


.r.y.x.
07-03-2003, 09:49 AM
in the pop-up window script...is there a way for me to use a link instead of a button? please...this is very important...if anyone knows how...please let me know. thanks!

Kaliyoda
07-03-2003, 10:35 AM
I just do it like this.... (With some example attributes - no toolbar or status bar, 500x400px window positioned 100px in and 100px down)



<a href="#" onClick="window.open('yourfilename.htm', 'NewWin',
'toolbar=no,status=no,scrollbars=yes,width=500,hei ght=400,top=100, left=100')">Your link text</a>

.r.y.x.
07-03-2003, 10:41 AM
hmmmmm....tis not working..i mean, its a link but when i click on it...it goes back to my site and there are no pop-up windows

Kaliyoda
07-03-2003, 10:46 AM
Did you put the name of your pop up page in there instead of 'yourfilename.htm'???

Kaliyoda
07-03-2003, 11:18 AM
Try this instead.......

In the HEAD section....(Just once)

<script language="JavaScript" type="text/JavaScript">
<!--
function MM_openBrWindow(theURL,winName,features) { //v2.0
window.open(theURL,winName,features);
}
//-->
</script>


and a sample link....


<a href="#" onClick="MM_openBrWindow('yourfilename.htm','linkname','scr ollbars=yes,width=500,height=500')">Your link text</a>

.r.y.x.
07-03-2003, 02:34 PM
hmmm..its really not working. i replaced the "#" for the page i want as well as "youfilename.htm" but it still doesnt want to pop-up.

Kaliyoda
07-03-2003, 02:38 PM
Hmmmm....... it looks like the code I posted (the 2nd method) inherited some spaces when I pasted it. Take out the spaces like in Window. Open and give that a try.

lefty
07-04-2003, 01:28 AM
You shouldn't take out the #