Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Code won't work in Netscape 1

Status
Not open for further replies.

jimmythegeek

Programmer
May 26, 2000
770
US
I have the following script on a Photo Gallery Page:

==========
<SCRIPT LANGUAGE=&quot;JavaScript&quot;>
function popupPage(pic, w, h)
{
var windowprops = &quot;location=no, scrollbars=no, menubars=no, toolbars=no, resizable=no&quot; + &quot;,left=300, top=90&quot; + &quot;, width=&quot; + w + &quot;, height=&quot; + h;
popup = window.open(pic,&quot;MenuPopup&quot;,windowprops);
}
</SCRIPT>
==========

Then I use the following in the Body:

==========
<A onClick=&quot;popupPage('images/stage.jpg','320','250')&quot;><IMG BORDER=&quot;0&quot; SRC=&quot;images/tnstage.jpg&quot; width=&quot;75&quot; height=&quot;56&quot;></a>
==========

This works wonderfully in IE, but does not work in Netscape. Any suggestions?

Thanks in advance
Jim Lunde
compugeeks@hotmail.com
Custom Application Development
 
Hi jimmythegeek!

You have to fix your code a little:

1. Remove all whitespaces in this string:
var windowprops = &quot;location=no,scrollbars=no,menubars=no,toolbars=no,resizable=no&quot; + &quot;,left=300, top=90&quot; + &quot;,width=&quot; + w + &quot;,height=&quot; + h;

2. Add HREF attribute to <A>:
<A href=&quot;#&quot; onClick=&quot;popupPage('images/stage.jpg','320','250')&quot;><IMG BORDER=&quot;1&quot; SRC=&quot;&quot; width=&quot;75&quot; height=&quot;56&quot;></a>

Now it works in IE, Opera, NN4.x and N6 - checked it myself

Andrew | starway@mail.com
 
You Are the Man! Works great, Thanks alot !!! Jim Lunde
compugeeks@hotmail.com
Custom Application Development
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top