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 Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Popup works on local but not when posted to the web

Status
Not open for further replies.

Mrmeola

Programmer
Jan 8, 2002
24
US
here is the problem...
The following code works locally but when I post it it just shows a screen shot of what it is over when it opens the url?


Code:
<script language=&quot;JavaScript&quot;>
function openWindow(theURL,winName,features, myWidth, myHeight, isCenter) {
  if(window.screen)if(isCenter)if(isCenter==&quot;true&quot;){
    var myLeft = (screen.width-myWidth)/2;
    var myTop = (screen.height-myHeight)/2;
    features+=(features!='')?',':'';
    features+=',left='+myLeft+',top='+myTop;
  }
  window.open(theURL,winName,features+((features!='')?',':'')+'width='+myWidth+',height='+myHeight);
}
</script>



page is called like this.




Code:
<td width=&quot;106&quot; valign=&quot;top&quot; align=&quot;center&quot;><a href=&quot;javascript:;&quot; onClick=&quot;openWindow(images/page1.html','','','442','298','true')&quot;><img src=&quot;images/thumb/image1.jpg&quot; width=&quot;100&quot; height=&quot;67&quot; border=&quot;0&quot; alt=&quot;show me&quot;></a></td>

Please help

E
 
no idea if this will fix your problem or not but looks like you're missing a quote in openWindow(images/page1.html',blah blah
it should be openWindow('images/page1.html','','','442','298','true')
 
Thank you for the responce but to no avail....still not working!
I'm stumped (still)
 
OOPS....I figured it out....it was a simple naming problem
guess I wasn't sleepy enough to see it.

Thanks
E
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top