Thumbnail popup no longer works

S

Stevie D

Hi I'm a Javascript newbie

I'm doing a 'simple' (basically adding pages and changing text in frontpage
2000) update of a web site for a friend - what I have done 'should not' have
done anything to the Java script that this site contains and the bits I've
added work fine. However, having uploaded the changes, and looking at the
site in I.E. the thumbnail images that already existed in the site don't
load into a popup window that was designed in JavaScript, but I'm fairly
sure that they used to. The popup window opens but the image doesn't.

The thumbnails are arranged in a table.

I think the following is a sample of the relevant JavaScript.

**************
HTML
**************

<script language="JavaScript">
<!--
function openWindow(url,name,scroll,width,height,top,left) {
popupWin = window.open(url,name,
'scrollbars='+scroll+',width='+width+',height='+height+',top='+top+',left='+
left)
}
file://-->
</script>

****************
HTML

***************

<td rowspan="3"><img name="gallery/doors/doors_r2_c01"
src="gallery/doors/doors_r2_c01.gif" width="40" height="250"
border="0"></td>
<td colspan="2"><a
href="javascript:eek:penWindow('gallery/doors/1.jpg','1',0,250,375,40,320);"><i
mg name="gallery/doors/doors_r2_c02" src="gallery/doors/doors_r2_c02.gif"

***************

The site is http://www.decorativeresins.com/ and the relevant page can be
found buy clicking on the doors item under the gallery button.

The thumbnail in the example is the one in the top left hand corner of the
table.

Any suggestions on how I can fix this.

Thanks in advance.
 
L

Lee

Stevie D said:
Hi I'm a Javascript newbie

I'm doing a 'simple' (basically adding pages and changing text in frontpage
2000) update of a web site for a friend - what I have done 'should not' have
done anything to the Java script that this site contains and the bits I've
added work fine. However, having uploaded the changes, and looking at the
site in I.E. the thumbnail images that already existed in the site don't
load into a popup window that was designed in JavaScript, but I'm fairly
sure that they used to. The popup window opens but the image doesn't.
The site is http://www.decorativeresins.com/ and the relevant page can be
found buy clicking on the doors item under the gallery button.

It looks to me like you must have mangled the directory structure.
The select menu to the left side of the home page can't find the
"Picture Gallery" page at all.
It tries to load "http://www.decorativeresins.com/picture.html",
which doesn't exist.

That's a real problem because there is no "Gallery" button if you
visit with a browser other than Internet Explorer.

Clicking the thumbnail attempts to open "gallery/doors/1.jpg".
There's no image at that location, or at "/gallery/doors/1.jpg".

Also note that there's no link to the home page from the "doors"
page, although there is a button labeled "Home". That button is
just a pulldown menu with links to "site map" and "contact us".
That pulldown menu also happens to pull down under the "QUICK FIND"
selection box, so you can't read the labels.
 
R

Richard Cornford

Stevie D wrote:
... changing text in frontpage 2000)

Ouch!

<script language="JavaScript">
<!--
function openWindow(url,name,scroll,width,height,top,left) {
popupWin = window.open(url,name,
'scrollbars='+scroll+',width='+width+',height='+height+',
top='+top+',left='+ left)
}
file://-->
^^^^^
In addition to what Lee said, you might ask yourself what that syntax
error is doing there.

<snip>

Richard.
 
S

Stevie D

Thanks Lee.

Lee said:
Stevie D said:


It looks to me like you must have mangled the directory structure.
The select menu to the left side of the home page can't find the
"Picture Gallery" page at all.
It tries to load "http://www.decorativeresins.com/picture.html",
which doesn't exist.

That's a real problem because there is no "Gallery" button if you
visit with a browser other than Internet Explorer.

Clicking the thumbnail attempts to open "gallery/doors/1.jpg".
There's no image at that location, or at "/gallery/doors/1.jpg".

Also note that there's no link to the home page from the "doors"
page, although there is a button labeled "Home". That button is
just a pulldown menu with links to "site map" and "contact us".
That pulldown menu also happens to pull down under the "QUICK FIND"
selection box, so you can't read the labels.
 
R

RobG

Stevie said:
Hi I'm a Javascript newbie

I'm doing a 'simple' (basically adding pages and changing text in frontpage
2000) update of a web site for a friend - what I have done 'should not' have
done anything to the Java script that this site contains and the bits I've
added work fine. However, having uploaded the changes, and looking at the
site in I.E. the thumbnail images that already existed in the site don't
load into a popup window that was designed in JavaScript, but I'm fairly
sure that they used to. The popup window opens but the image doesn't.
[...]

Can I also suggest that you get someone who knows what they are doing
to rewrite your DHTML menus? They are pretty awful in IE 6 and don't
even appear in Firefox or Netscape 7, making navigation to many pages
impossible.

Investigate pure CSS menus, they are much leaner and have a greater
chance of working on a wider variety of browsers.

In the HTML you have image elements like:

<IMG alt="Decorative Resins International" border=0 height=1
src="images/blank.gif" width=1>

While the alt attribute is required, you are not required to put text
in it. Visitors with a text-to-speech browser will hear the words
"Decorative Resins International" ad nausium before they get anywhere
near the actual content (it appears 33 times in the page).

For spacer gifs, bullet images and other purely presentational images,
leave the alt text empty.

The navcond.js script needs to be junked completely, it does not work
for any browser other than Netscape Navigator 4 and IE (and maybe some
that mimic IE's proprietary features like adjacentHTML). There are
vastly simpler ways of creating cross-browser dynamic content that work
in a much greater range of browsers.
 
L

Lee

Richard Cornford said:
Stevie D wrote:


Ouch!


^^^^^
In addition to what Lee said, you might ask yourself what that syntax
error is doing there.

Is it a syntax error? I took it to be a label on an otherwise blank
line. It's still worth asking what it's doing there.
 
R

Richard Cornford

Lee said:
Richard Cornford said:

Is it a syntax error? I took it to be a label on an
otherwise blank line. It's still worth asking what
it's doing there.

Yes it is a syntax error. The production for LabelledStatement is:-

LabelledStatement :
Identifier : Statement

And this 'label' is not followed by a statement. The line terminator at
the end of the comment allows automatic semicolon insertion to act but a
semicolon inserted would be an EmptyStatement, and:-

<quote cite="ECMA 262 3rd edition: section 7.9.1">
....
However, there is an additional overriding condition on the preceding
rules: a semicolon is never inserted automatically if the semicolon
would then be parsed as an empty statement or if that semicolon would
become one of the two semicolons in the header of a for statement
(section 12.6.3).
....
</quote>

So no semicolon can be inserted, and so no statement follows the 'label'
and so it cannot form a LabelledStatement. It must be a syntax error.

Richard.
 

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

No members online now.

Forum statistics

Threads
473,754
Messages
2,569,527
Members
44,999
Latest member
MakersCBDGummiesReview

Latest Threads

Top