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

javascript works in IE, not in firefox

P: n/a
Hello,
I am having an issue with javascript in firefox. On this URL,
there should be a menu displayed above a dashed line. Works ok in IE6
& 7 but no menu displays in firefox. Any sugestions?

http://classifiedads.officeresalesol....com/TesT.html

Thanks!

Tim

Nov 27 '07 #1
Share this Question
Share on Google+
15 Replies


P: n/a
qw********@gmail.com said the following on 11/26/2007 7:05 PM:
Hello,
I am having an issue with javascript in firefox. On this URL,
there should be a menu displayed above a dashed line. Works ok in IE6
& 7 but no menu displays in firefox. Any sugestions?
IE7, I get a menu but an error message on the page.
http://classifiedads.officeresalesol....com/TesT.html
Open Firefox, open your page, click the Tools>Error Console and start
debugging.

But, why in the world are you attempting to use XHTML on the web? It is
a recipe for disaster.

--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ - http://jibbering.com/faq/index.html
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Nov 27 '07 #2

P: n/a
On Mon, 26 Nov 2007 16:05:30 -0800 (PST), in comp.lang.javascript
qw********@gmail.com
<12**********************************@d27g2000prf. googlegroups.com>
wrote:
>| Hello,
| I am having an issue with javascript in firefox. On this URL,
| there should be a menu displayed above a dashed line. Works ok in IE6
| & 7 but no menu displays in firefox. Any sugestions?
|
| http://classifiedads.officeresalesol....com/TesT.html
|
Line 30: tr not defined.
-- -------------------------------------------------------------
jn******@yourpantsyahoo.com.au : Remove your pants to reply
-- -------------------------------------------------------------
Nov 27 '07 #3

P: n/a
On Nov 26, 6:05 pm, qwareho...@gmail.com wrote:
Hello,
I am having an issue with javascript in firefox. On this URL,
there should be a menu displayed above a dashed line. Works ok in IE6
& 7 but no menu displays in firefox. Any sugestions?

http://classifiedads.officeresalesol....com/TesT.html

Thanks!

Tim
Hi Tim. I see you are using the "<center>" tag. Try taking that out
and see what happens. I'm pretty sure that tag is no longer valid HTML
and most likely not good in XHTML either.
Nov 27 '07 #4

P: n/a
Doug Gunnoe said the following on 11/26/2007 9:44 PM:
On Nov 26, 6:05 pm, qwareho...@gmail.com wrote:
>Hello,
I am having an issue with javascript in firefox. On this URL,
there should be a menu displayed above a dashed line. Works ok in IE6
& 7 but no menu displays in firefox. Any sugestions?

http://classifiedads.officeresalesol....com/TesT.html

Thanks!

Tim

Hi Tim. I see you are using the "<center>" tag. Try taking that out
and see what happens. I'm pretty sure that tag is no longer valid HTML
and most likely not good in XHTML either.
Wow. And you think that is causing a JS error of "tr is not defined"?

--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ - http://jibbering.com/faq/index.html
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Nov 27 '07 #5

P: n/a
On Nov 26, 11:17 pm, Randy Webb <HikksNotAtH...@aol.comwrote:
Doug Gunnoe said the following on 11/26/2007 9:44 PM:
On Nov 26, 6:05 pm, qwareho...@gmail.com wrote:
Hello,
I am having an issue with javascript in firefox. On this URL,
there should be a menu displayed above a dashed line. Works ok in IE6
& 7 but no menu displays in firefox. Any sugestions?
>http://classifiedads.officeresalesol....com/TesT.html
Thanks!
Tim
Hi Tim. I see you are using the "<center>" tag. Try taking that out
and see what happens. I'm pretty sure that tag is no longer valid HTML
and most likely not good in XHTML either.

Wow. And you think that is causing a JS error of "tr is not defined"?

--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ -http://jibbering.com/faq/index.html
Javascript Best Practices -http://www.JavascriptToolbox.com/bestpractices/
No. It would not cause that error. The OP did not post that error and
I did not read your reply right away. I was thinking it could have
been some kind of parsing error causing his image not to show. But
actually you are correct.

"if(LOGGEDIN == null) {
stuff......tr(false);"

And then he calls this several times tr(true) etc. Yet there is no tr
function declared anywhere.

I would appear that IE handles this by continuing to load the page and
Firefox stops.

Nov 27 '07 #6

P: n/a
Tim in Phoenix said the following on 11/27/2007 3:04 PM:
Randy & Doug,
Thank you for the replies and information.
And thank you for learning to quote/snip/reply in the future.
What is the recommended HTML standard to use since it's clearly not XHTML?
HTML4.01 Strict
The js building the menus was generated from a program named Xara
Webstyle 4 and was a cut/paste into the js file being used;
My apologies.
I'll have to find out why tr is not defined, but also want to ensure
that I'm using the correct HTML spec.
First, make sure you have valid HTML4.01 Strict at a minimum. What you
have now would barely validate as HTML3.2. Then, find you a better menu
to use as that one is one horribly incompetent way to create a menu.

--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ - http://jibbering.com/faq/index.html
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Nov 27 '07 #7

P: n/a
Doug Gunnoe wrote:
Hi Tim. I see you are using the "<center>" tag. Try taking that out
and see what happens. I'm pretty sure that tag is no longer valid HTML
and most likely not good in XHTML either.
It is Valid in HTML 3.2, HTML 4.01 Transitional and XHTML 1.0 Transitional.
It is not Valid in HTML 4.01 Strict, XHTML 1.0 Strict, and XHTML 1.1.

RTFS (Read The F*** Specification[s]): http://www.w3.org/TR/
PointedEars
Nov 27 '07 #8

P: n/a
Tim in Phoenix wrote:
[...] What is the recommended HTML standard to use since it's clearly not
XHTML? [...]
Read my sig.
PointedEars
--
realism: HTML 4.01 Strict
evangelism: XHTML 1.0 Strict
madness: XHTML 1.1 as application/xhtml+xml
-- Bjoern Hoehrmann
Nov 27 '07 #9

P: n/a
I made a change to HTML 4.01 transitional and also changed the js to
call another js depending on whether or not the user is logged in. So
now the page passes validation and also displays the menu in both FF &
IE. The code that originally contained the undefined 'tr' function
has been moved into a separate js file. The error console no longer
shows tr as being undefined, so was it the change from XHTML to HTML
that resolved this, or something due to the nested js call?

Thanks again for the useful information!

Tim
Nov 29 '07 #10

P: n/a
I made a change to HTML 4.01 transitional and also changed the js to
call another js depending on whether or not the user is logged in. So
now the page passes validation and also displays the menu in both FF &
IE. The code that originally contained the undefined 'tr' function
has been moved into a separate js file. The error console no longer
shows tr as being undefined, so was it the change from XHTML to HTML
that resolved this, or something due to the nested js call?

Thanks again for the useful information!

Tim
Nov 29 '07 #11

P: n/a
Tim in Phoenix said the following on 11/29/2007 12:09 AM:
I made a change to HTML 4.01 transitional and also changed the js to
call another js depending on whether or not the user is logged in. So
now the page passes validation and also displays the menu in both FF &
IE. The code that originally contained the undefined 'tr' function
has been moved into a separate js file. The error console no longer
shows tr as being undefined, so was it the change from XHTML to HTML
that resolved this, or something due to the nested js call?
It was the nested functions as Richard explained.
Thanks again for the useful information!
Thanks for quoting *something* when you reply next time.

--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ - http://jibbering.com/faq/index.html
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Nov 29 '07 #12

P: n/a
Randy Webb wrote:
Tim in Phoenix said the following on 11/29/2007 12:09 AM:
>Thanks again for the useful information!

Thanks for quoting *something* when you reply next time.
There was _not_ the need to quote anything *here*.

So much for pedanticism.
PointedEars
--
"Use any version of Microsoft Frontpage to create your site. (This won't
prevent people from viewing your source, but no one will want to steal it.)"
-- from <http://www.vortex-webdesign.com/help/hidesource.htm>
Nov 29 '07 #13

P: n/a
Randy Webb wrote:
Tim in Phoenix said the following on 11/29/2007 12:09 AM:
>Thanks again for the useful information!

Thanks for quoting *something* when you reply next time.
There was _not_ the need to quote anything *here*.

So much for pedanticism. Pot, kettle, black.
PointedEars
--
"Use any version of Microsoft Frontpage to create your site. (This won't
prevent people from viewing your source, but no one will want to steal it.)"
-- from <http://www.vortex-webdesign.com/help/hidesource.htm>
Nov 29 '07 #14

P: n/a
Thomas 'PointedEars' Lahn said the following on 11/29/2007 2:48 PM:
Randy Webb wrote:
>Tim in Phoenix said the following on 11/29/2007 12:09 AM:
>>Thanks again for the useful information!
Thanks for quoting *something* when you reply next time.

There was _not_ the need to quote anything *here*.
So much for pedanticism.
Your mama dropped you on your head when you were a baby didn't she?

Comparing yourself to Spock is an insult to Spock.

--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ - http://jibbering.com/faq/index.html
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Nov 30 '07 #15

P: n/a
Thomas 'PointedEars' Lahn said the following on 11/29/2007 2:49 PM:
Randy Webb wrote:
>Tim in Phoenix said the following on 11/29/2007 12:09 AM:
>>Thanks again for the useful information!
Thanks for quoting *something* when you reply next time.

There was _not_ the need to quote anything *here*.

So much for pedanticism. Pot, kettle, black.
And this, from someone who still lives with the ignorant belief that you
can cancel a message in Usenet. Perhaps you should try to spend more
time proof-reading before you post and you wouldn't have that problem to
start with.
--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ - http://jibbering.com/faq/index.html
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Nov 30 '07 #16

This discussion thread is closed

Replies have been disabled for this discussion.