By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,749 Members | 1,615 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,749 IT Pros & Developers. It's quick & easy.

Thumbnail popup no longer works

P: n/a
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='+he ight+',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:openWindow('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.
Jul 23 '05 #1
Share this Question
Share on Google+
6 Replies


P: n/a
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.

Jul 23 '05 #2

P: n/a
Stevie D wrote:
<snip>
... changing text in frontpage 2000)
Ouch!

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

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

<snip>

Richard.
Jul 23 '05 #3

P: n/a
Thanks Lee.

"Lee" <RE**************@cox.net> wrote in message
news:d8*********@drn.newsguy.com...
Stevie D said:

Hi I'm a Javascript newbie

I'm doing a 'simple' (basically adding pages and changing text in frontpage2000) update of a web site for a friend - what I have done 'should not' havedone anything to the Java script that this site contains and the bits I'veadded 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.

Jul 23 '05 #4

P: n/a
Stevie D wrote:
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.
--
Rob
Jul 23 '05 #5

P: n/a
Lee
Richard Cornford said:

Stevie D wrote:
<snip>
... changing text in frontpage 2000)


Ouch!

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

^^^^^
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.

Jul 23 '05 #6

P: n/a
Lee wrote:
Richard Cornford said:

<snip>
file://-->

^^^^^
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.


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.
Jul 23 '05 #7

This discussion thread is closed

Replies have been disabled for this discussion.