Javascript help needed

M

Michael Erb

I've got a page with links to panoramic images and use javascript to
open a separate window when the link to a specific panoramic image is
clicked.

Problem is that it's not working when I visit the site with my PC. But
it works fine when using my Mac.

On my PC, I get a browser error that the page is not found.

Could someone take a look at my source code and tell me what might be
causing this problem?

I'm not very fluent with javascript and am having a difficult time
troubleshooting this.

the site is http://www.cnyweddings.com/pano/index.php

One other thing... currently the links are opening another window, but
it'd probably be really cool to have the link replace the existing image
on the index page. But I'm not sure how to accomplish that. the code
fragments I've seen on HotScripts.com and other places don't quite seem
to fit my needs.

Here is the code in the Head...

<script language="JavaScript">
<!--
function winOpen(url){
width= "500";
height="600";
optionString =
"scrollbars=yes,status=yes,menubar=no,resizable=yes,location=no,toolbar=n
o,width=" + width + ",height=" + height;
psWindow = this.window.open(url,"",optionString );
}
//-->
</script>

Here is the code in the body...

<ul>
<li><a
href="javascript:winOpen('http://www.cnyweddings.com/pano/statler_terrace
..html')">Ithaca - Statler Hotel Terrace Dining Room</a></b></li>
<li>
<a href="javascript:winOpen('lakewatch_inn.php')"">Ithaca - Lakewatch
Inn</a></b></li>
<li>
<a href="javascript:winOpen('ginny_lee.php')">Lodi -Wagner Vineyard
Ginny Lee Cafe Panorama</a></b></li>
<li>
<a href="javascript:winOpen('statler_terrace.php')">Ithaca - Statler
Hotel
Terrace Dining Room</a></b></li>
<li>
<a href="javascript:winOpen('logan_ridge.php')">Lodi - Logan Ridge
Winery</a></b></li>
<li></li>
</ul>
 
K

kaeli

I've got a page with links to panoramic images and use javascript to
open a separate window when the link to a specific panoramic image is
clicked.

Problem is that it's not working when I visit the site with my PC. But
it works fine when using my Mac.

Works fine with my PC with both Netscape 7 and IE6.

--
 
M

Mick White

Michael said:
Problem is that it's not working when I visit the site with my PC. But
it works fine when using my Mac.

On my PC, I get a browser error that the page is not found.
Here is the code in the Head...

<script language="JavaScript">
<!--
function winOpen(url){
width= "500";
height="600";
optionString =
"scrollbars=yes,status=yes,menubar=no,resizable=yes,location=no,toolbar=n
o,width=" + width + ",height=" + height;
psWindow = this.window.open(url,"",optionString );
}
//-->
</script>

Try:
<script type="text/javascript">
function winOpen(url){
w= 500;
h=600;
optionString =
"scrollbars,status,resizable,width=" + w + ",height=" + h;
psWindow = window.open(url,"",optionString );
}
Here is the code in the body...

<ul>
<li><a
href="javascript:winOpen('http://www.cnyweddings.com/pano/statler_terrace
.html')">Ithaca - Statler Hotel Terrace Dining Room</a></b></li>
<li>

Try:
<a href = "http://www.cnyweddings.com/pano/statler_terrace.html" onclick =
"winOpen('http://www.cnyweddings.com/pano/statler_terrace.html');
return false;">Ithaca - Statler Hotel Terrace Dining Room</a>

Mick
 
M

Michael Erb

Thanks to everyone who replied. I actually found some new code which I
put into the site this afternoon and it seems to have fixed whatever the
problem was. I'm still not sure what was causing the glitch, but it
does seem to be working now.

Michael

kaeli said:
Works fine with my PC with both Netscape 7 and IE6.

--
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,763
Messages
2,569,562
Members
45,039
Latest member
CasimiraVa

Latest Threads

Top