469,922 Members | 2,141 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,922 developers. It's quick & easy.

crazy cross-platform javascript rendering problems



Long story short, I built a website based primarily on javascript:

http://www.sjcga.com

The site renders *great* in WinIE6/7 and in Mac/Win Opera9.

It has problems in Mac/Win Firefox2, and in Safari(OSX) ... especially
the Gallery, but the rightside menu is funky also.

I've "validated" my scripts through a couple different systems, to no
avail. I wish I could just say, "If my code works in two browsers, then
it's not my fault" ... but ... well ... I want my code to work
everywhere, and the burden obviously is on me.

Now, honestly, I only care about Safari because several of the SJCGA
people (my clients!) use it. But I sure would like to figure out what
the problems are in FireFox! It's a popular browser, growing in market
share.

I would even be willing to do a browser check, and offer up different
functions and codes for each browser ... IF only I could figure out what
the problems are! Is there a list of Firefox ECMA quirks somewhere?

HELP! I am at the end of my rope, and I've pulled out all my hair. Any
clues?

Bottom line: WHAT IS WRONG WITH MY JAVASCRIPT!?

*** Sent via Developersdex http://www.developersdex.com ***
Feb 28 '07 #1
29 2013
töff 93722 wrote:
>
Long story short, I built a website based primarily on javascript:

http://www.sjcga.com

The site renders *great* in WinIE6/7 and in Mac/Win Opera9.

It has problems in Mac/Win Firefox2, and in Safari(OSX) ... especially
the Gallery, but the rightside menu is funky also.
[...]
>
Bottom line: WHAT IS WRONG WITH MY JAVASCRIPT!?
New bottom line:
WHAT ERROR MESSAGES ARE YOU GETTING?

Mar 1 '07 #2


I get *NO* error messages! That's (part of) the problem! The scripts
work great in IE and Opera, but in FireFox I get screwy results. Some
specifics:

1) The top-right menu, the FIRST TIME you click it, jumps even further
right, and fails to follow the link you click. On the SECOND click, it
will follow the link.

2) In the Gallery, the FIRST TIME you enter, it displays the first set
of thumbnails properly, and the top-right menu. But if you click any
thumbnail to zoom on, or if you click a navigation arrow, suddenly (a)
the menu links break, and (b) all the pix display as ALT tags instead of
images.

Bizarre!

But everything works great in IE and Opera.

HELP!

...

[Aside: I read elsewhere that document.write() is deprecated!? News to
me :( ... Does Firefox's DOM handling have anything to do with the
bizarre display results I describe above? And yet, I use
document.write() elsewhere in SJCGA.com, and in other sites, and there
are no problems!]

*** Sent via Developersdex http://www.developersdex.com ***
Mar 1 '07 #3
töff 93722 wrote:
>
I get *NO* error messages! That's (part of) the problem! The scripts
work great in IE and Opera, but in FireFox I get screwy results. Some
specifics:

1) The top-right menu, the FIRST TIME you click it, jumps even further
right, and fails to follow the link you click. On the SECOND click, it
will follow the link.

2) In the Gallery, the FIRST TIME you enter, it displays the first set
of thumbnails properly, and the top-right menu. But if you click any
thumbnail to zoom on, or if you click a navigation arrow, suddenly (a)
the menu links break, and (b) all the pix display as ALT tags instead of
images.

Bizarre!

But everything works great in IE and Opera.

HELP!

..

[Aside: I read elsewhere that document.write() is deprecated!? News to
me :( ... Does Firefox's DOM handling have anything to do with the
bizarre display results I describe above? And yet, I use
document.write() elsewhere in SJCGA.com, and in other sites, and there
are no problems!]
You could start here:

http://validator.w3.org/check?verbos...w.sjcga.com%2F

Mick
Mar 1 '07 #4
I clicked that, and it gave me 30-odd errors in my Frameset HTML ...
errors that, to my knowledge, are not errors. Odd!

I tried again, giving it the URL of one of the javascript sources, and
it gave me 80-odd errors, most of which, to my knowedlge, are not
errors. Very odd! Try it:
http://validator.w3.org/check?uri=ht...om%2F_z.contro
l.shtml&charset=%28detect+automatically%29&doctype =Inline&verbose=1

I'll try again, but I don't think that is helping. Thanks for the link,
though.

----
http://www.arcticcoconut.com Graphics By töff
http://www.worldearcane.com Fantasy Roleplaying Game
http://www.mysteryandmagic.com Freeform Roleplaying Games

*** Sent via Developersdex http://www.developersdex.com ***
Mar 1 '07 #5
dd
Are you looking in Firefox's Error Console?
You say "it gives me no errors", but Firefox
deliberately puts all the errors into the
console to help the user experience. Look in
the Tools menu and select "JavaScript Console".

If you have that enabled and go surfing around
the web, you'll notice that a huge amount of
so-called finished websites produce a lot of
errors and warnings. Maybe Firefox is just a
bit more reportive than IE is. I think IE is
more likely to think "I can deal with that
error, it's no biggie". Whereas Firefox will
think "So can I, but I'm gonna report it in my
JavaScript console anyway" :)

I always make sure my code and html doesn't
even produce any warnings, but initially you
want to just make sure there are no errors.

If you need to debug in Firefox, search for
Firebug. It's very close to the abilities of
MS Visual Studio now and will surpass it this
year I expect. You should be able to find out
what the problems are with Firebug.

FYI - Firefox users are 3 x the number of
Safari users. Here's a link to a site that
monitors visitors to 40,000 websites (so
their stats aren't biased to specific platforms):

http://marketshare.hitslink.com/report.aspx?qprid=0

Beware Firefox on Mac by the way. Don't assume
that because it works on Win/FF that it'll be
identical on Mac/FF.

Mar 2 '07 #6
On Mar 1, 7:28 am, töff 93722 <t...@arcticcoconut.comwrote:
Long story short, I built a website based primarily on javascript:

http://www.sjcga.com

The site renders *great* in WinIE6/7 and in Mac/Win Opera9.

It has problems in Mac/Win Firefox2, and in Safari(OSX) ... especially
the Gallery, but the rightside menu is funky also.

I've "validated" my scripts through a couple different systems, to no
avail.
Perhaps you should spend some time validating the HTML and CSS -
there's plenty to fix.

<URL: http://validator.w3.org/check?uri=ht...w.sjcga.com%2F
>
I wish I could just say, "If my code works in two browsers, then
it's not my fault" ... but ... well ... I want my code to work
everywhere, and the burden obviously is on me.
It will not happen anytime soon, if ever.

I would even be willing to do a browser check, and offer up different
functions and codes for each browser ... IF only I could figure out what
the problems are! Is there a list of Firefox ECMA quirks somewhere?
There are very, very few. Most browsers are sufficiently compliant
with the ECMAScript spec that you needn't worry about it 99.9% of the
time. The real issue is support for DOM standards, which aren't
ratified by the ECMA but by the W3C and to a limited extent by popular
consensus (so-called "industry standards").
HELP! I am at the end of my rope, and I've pulled out all my hair. Any
clues?
You might start with:

Error: parent is not defined
Source File: parent.SJCGAgallery.ShowPic(32,1,17,0)
Line: 1

Error: parent.SJCGAgallery has no properties
Source File: javascript:parent.SJCGAgallery.ShowPic(32,1,17,0)
Line: 1
And fix both the script and HTML in lines like:

var PageTop="<HTML>\n<HEAD>\n<LINK href=\"sjcga.css\" rel=\"stylesheet
\">\n</HEAD>\n<body bgcolor=ffffff text=757575 link=be3000
vlink=be3000 alink=be3000>" ;

Use HTML. It nonsensical to use script to create entire pages that
can be done vastly more efficiently with plain (valid, non-deprecated)
HTML. And don't use frames.

Yes, I had a crappy day - suffer in ya jocks. :-/
--
Rob

Mar 2 '07 #7
Are you looking in Firefox's Error Console?

Yes, and it shows no javascript errors AT ALL :(

... it does, however, show some CSS errors, and I am trying to fix
those. It'd would be great if tweaking the CSS fixed the display problem
... I could see that happening. I'm trying to make my CSS comply with
standards, but I haven't figured out yet what's wrong with my CSS as it
stands.

I'm trying to install Firebug now. Thanks for that tip.
You might start with:
Error: parent is not defined
Source File: parent.SJCGAgallery.ShowPic(32,1,17,0)
But "parent" IS defined: that's where the javascripts reside, in a
sibling frame, accessed through the standard "parent" object in the
frame heirarchy ... and I *know* the frames exist, I *know* parent is
defined, because the scripts there are executing! If
parent.SJCGAgallery.ShowPic() didn't exist, how could the browser run
the script? The scripts ARE running, just fine! FUNCTIONALITY of the
scripts is at 100% ... FireFox's DISPLAY of the generated content is the
problem.

(Good lord, maybe javascript isn't the problem. Maybe I'm totally in the
wrong newsgroup.)

Where did you get that error anyway? I don't see it in the FireFox error
console.
Use HTML. It nonsensical to use script to create entire pages that
can be done vastly more efficiently with plain (valid, non-deprecated)
HTML. And don't use frames.
I have to disagree there. I currently have three hundred photos to
manage, each with its own display page, and all grouped into several
thumbnailed gallery pages, many cross-referenced. There's no way in heck
I would consider building a plain HTML page for each photo. Every time
somebody gave me a new photo, I'd have to make a new page, and edit
every thumbnail gallery it belongs to. It'd be a nightmare. A database,
and on-the-fly page generation from the database, is the only way. (And
what's wrong with frames?)

*** Sent via Developersdex http://www.developersdex.com ***
Mar 2 '07 #8
[OT, kinda]
FYI - Firefox users are 3 x the number of
Safari users.
http://marketshare.hitslink.com/report.aspx?qprid=0
Awesome link! Thank you!
It says IE 79%, FF 14%, Saf 5%.
I thought Safari was more like 2%.

Wikipedia has a cool page about it, too:
http://en.wikipedia.org/wiki/Usage_s...f_web_browsers

*** Sent via Developersdex http://www.developersdex.com ***
Mar 2 '07 #9

I validated my HTML and CSS both.

FireFox still has BIZARRE display results.

I dunno what to do.
*** Sent via Developersdex http://www.developersdex.com ***
Mar 3 '07 #10
On Sat, 03 Mar 2007 22:53:06 +0100, töff <no****@devdex.comwrote:
>
I validated my HTML and CSS both.

FireFox still has BIZARRE display results.

I dunno what to do.
*** Sent via Developersdex http://www.developersdex.com ***
Posting a link to a test case would be a first step.

--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
Mar 3 '07 #11

It's http://www.sjcga.com

I mean, look at the menu quirk! It jumps to the right on first click.
What the heck is that? I've never seen anything like that before.

And how can the Gallery work on the first page write, but no others?

It's all just bizarre.

Again:
HTML validated OK, CSS validated OK.
JavaScript = zero error reports.
IE = fine, Opera = fine.
*** FireFox = buggy as heck !!! ***

*** Sent via Developersdex http://www.developersdex.com ***
Mar 4 '07 #12
I can't even view the Frame Source in FIREFOX, after writing a new page.

I thought if I could check the HTML that's being written, I could track
why the display is so funky.

I am banging my head against the wall! I am *this close* to just blaming
Firefox flat-out, and giving up. But I really don't want to do that. I
want to FIX IT!

*** Sent via Developersdex http://www.developersdex.com ***
Mar 5 '07 #13
töff said the following on 3/3/2007 7:15 PM:
It's http://www.sjcga.com
<snip>
IE = fine
I would hardly call what I see in IE7 as "fine" on the first click of
Gallery it throws a lot of crap on the screen until it finally moves it
where it should be. Clicking the causes the same effect again. After
viewing both pages of the Gallery that behavior stops.

--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ - http://jibbering.com/faq/index.html
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Mar 5 '07 #14
That is just images loading normally in IE. I was considering doing an
image preloader.

Once again, though, Randy, your post amounts to a flame. The word "crap"
is not particularly polite or encouraging, or even critically
constructive. And once again you COMPLETELY FAIL to offer any kind of
reponse to the original question. Maybe you are a bigshot in this NG,
but please do me a favor and stay out of my thread.

*** Sent via Developersdex http://www.developersdex.com ***
Mar 5 '07 #15
töff said the following on 3/5/2007 10:26 AM:
That is just images loading normally in IE.
What is? If you had enough common sense to quote what you are babbling
about I wouldn't be asking you what you are babbling about.
I was considering doing an image preloader.
You might want to consider it, you may not. There is a better alternative.
Once again, though, Randy, your post amounts to a flame.
It did? According to what almighty idiot? You? If you weren't so stupid
you would be hilarious.
The word "crap" is not particularly polite or encouraging,
or even critically constructive.
Sure it is. The fact you fail to realize that is *your* problem, not
mine. Besides, if the truth hurts, bear the pain pal.
And once again you COMPLETELY FAIL to offer any kind of
reponse to the original question.
Are you actually stupid enough to think this is your help desk? It ain't
pal. Get used to it. This is Usenet, and a *discussion* group at that.
You posted a URL to a crappy page and I commented on it. Don't like it?
Ignore me, I don't care. It won't change the fact the page is crap in IE
contrary to your claim that "IE = fine". I suppose if I had said "It
throws images all over the place and gives any sane intelligent person a
headache looking at it" then you would have been alright with it since I
didn't refer to it as "crap". Oh well.
Maybe you are a bigshot in this NG, but please
do me a favor and stay out of my thread.
Yep, you are as stupid as I thought you were. You think you own this
thread? Think again you moron. You don't. Get over it and move on.
Usenet ain't worth it.
*** Sent via Developersdex http://www.developersdex.com ***
You need a decent place to use Usenet.

P.S. You can say you have been partially flamed now. But, if and only
if, you aren't too stupid to realize what has happened.

--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ - http://jibbering.com/faq/index.html
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Mar 5 '07 #16
Every time I come into usenet, some asshole ruins it.

I will take your advice and leave.

*** Sent via Developersdex http://www.developersdex.com ***
Mar 5 '07 #17
töff said the following on 3/5/2007 6:33 PM:
Every time I come into usenet, some asshole ruins it.
Thats because we get tired of idiotic assholes like you.
I will take your advice and leave.
Good.

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

Changed my mind. I'll stay and just ignore Randy Webb.
*** Sent via Developersdex http://www.developersdex.com ***
Mar 6 '07 #19
On Mar 6, 7:44 am, töff <nos...@devdex.comwrote:
Changed my mind. I'll stay and just ignore Randy Webb.

*** Sent via Developersdexhttp://www.developersdex.com***
If I were you I would seriously reconsider the way you are doing
this... It is really overly-complex.
Here are some suggestions:

A) You do not need frames, not at all, this page could be done with so
much less headache without them... You could use div's just as
effectively and without having to worry about transversing all of
those frames.

B) Instead of writing new HTML pages using JavaScript for the frames,
just use one page and make better use of innerHTML. Make the links
actually link to new .html pages, not write new ones in that frame.

c) Just an observation, but use XHTML. It doesn't take much effort to
change it and it is so much more maintainable and understandable to
people who may be trying to help you debug your code. On that note,
tab stuff out better, it's so hard to look at those frame sources and
dig through them.

D) There is in fact a JavaScript error on Firefox. Make sure you click
on the "Errors" and not "Warnings." The error is this:
Error: parent.SJCGAgallery has no properties
Source File: http://www.sjcga.com/_Gallery.shtml
Line: 8

Happy hunting!

Mar 6 '07 #20


Thank you, John; I am going to study the innerHTML option. That is a new
one on me. I was using frames to isolate/protect an area to put my
master javascript in, and then generate content to display in other
frames. But maybe innerHTML will let me do that in one frame. I will
study it. Thanks for the tip!
Error: parent.SJCGAgallery has no properties
I don't know how that can be an error, because "parent.SJCGAgallery" is
the frame wherein lies the javascript that *is* executing ... how can
code execute from a place that doesn't exist? Nonetheless I will try to
figure out where this error is coming from, but it looks like a red
herring to me.

*** Sent via Developersdex http://www.developersdex.com ***
Mar 6 '07 #21
On Mar 6, 11:37 am, töff <nos...@devdex.comwrote:
Thank you, John; I am going to study the innerHTML option. That is a new
one on me. I was using frames to isolate/protect an area to put my
master javascript in, and then generate content to display in other
frames. But maybe innerHTML will let me do that in one frame. I will
study it. Thanks for the tip!
Error: parent.SJCGAgallery has no properties

I don't know how that can be an error, because "parent.SJCGAgallery" is
the frame wherein lies the javascript that *is* executing ... how can
code execute from a place that doesn't exist? Nonetheless I will try to
figure out where this error is coming from, but it looks like a red
herring to me.

*** Sent via Developersdexhttp://www.developersdex.com***
http://msdn.microsoft.com/workshop/a.../innerhtml.asp

Microsoft invented it, but is is MUCH quicker than it's DOM
alternative. Safari, Opera and Firefox all support it just fine. Just
note that using it will NOT produce XHTML, but instead will generate
HTML based on the browsers HTML parser. That shouldn't be an issue for
you at all, but it should be kept in mind when looking at the source
it generates.

If you move away from the frames, an change a single page layout you
will fix your Firefox bug at the same time...

Mar 6 '07 #22
Thanks for the link! :) I'll give it a shot.

Meanwhile, I did start a new thread with a slightly different tack,
asking only about that weird menu jump. I don't think that has
anything to do with the frames or parentobject property error.

Mar 6 '07 #23
töff said the following on 3/6/2007 10:44 AM:
Changed my mind.
Most idiots do.
I'll stay and just ignore Randy Webb.
Goody! I can have a party now based on my beliefs that you might
actually stick to your word this time (but I ain't betting on it).
I will add "ignored" to the words attributed to me at one time or
another though.

--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ - http://jibbering.com/faq/index.html
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Mar 6 '07 #24
http://b306c38edfb70143da7902d5f66a0b85-t.qhzrpz.info <a
href="http://b306c38edfb70143da7902d5f66a0b85-h.qhzrpz.info">b306c38edfb70143da7902d5f66a0b85</a>
http://b306c38edfb70143da7902d5f66a0b85-b1.qhzrpz.info
b306c38edfb70143da7902d5f66a0b85
http://b306c38edfb70143da7902d5f66a0b85-b3.qhzrpz.info
a587e23529cc2ef5e6e7833effd186f2

May 24 '07 #25
e465e8e46c6f9a998d0ccdbb918f4a0a
http://gioco-scaricare-gratis-x-pc.pgbdyc.org/
http://esempio-calcolo-solaio-acciaio-cls.dqiqbg.org/
http://esercizio-di-ginnastica-a-casa.dlmpxx.org/ <a
href="http://genova-and-locale-and-notturno.divuvu.org/">
http://genova-and-locale-and-notturno.divuvu.org/ </a>
http://mariangela-m-ama-non-m-ama.dqiqbg.org/
http://appartamento-san-martino-cast...ss.xcwjal.org/ <a
href="http://yanmar-vio-45-mini-escavatore.xcwjal.org/">
http://yanmar-vio-45-mini-escavatore.xcwjal.org/ </a>
http://place-de-la-concorde-parigi.nfvzoo.org/ <a
href="http://home-theatre-cassa-posteriori-wireless.dqiqbg.org/">
http://home-theatre-cassa-posteriori...ss.dqiqbg.org/ </a<a
href="http://tony-renis-gente-usasse-cuore.dlmpxx.org/">
http://tony-renis-gente-usasse-cuore.dlmpxx.org/ </a>
e2344a7b53a49ae4d6fdb2a64dbf9945

Jun 4 '07 #26
7a8ca3e1a2ec777499e3a72bd03980c9
http://laureato-economia-aziendale-a....oaxzml.co.in/
http://blog.myspace.com/195751575 <a
href="http://blog.myspace.com/196097101"196097101 </a>
http://blog.myspace.com/195751575 <a href="http://del.icio.us/Core1982">
Core1982 </a<a href="http://britney-official-site.blogspot.com/ ">
</ahttp://amore-fai-mondo-porto-via-lontano.mksqkw.co.in/
http://protocollo-d-intesa-regione-t....ooqqld.co.in/
http://rivalutazione-tfr-15-12-2006.innltr.co.in/ <a
href="http://ricorso-rinnovo-licenza-porto-pistola.mksqkw.co.in/">
http://ricorso-rinnovo-licenza-porto....mksqkw.co.in/ </a>
48c0bb0f30b00789fa1734f152bbea8f

Jun 9 '07 #27
b3ad74a7add7129bf329e200eeef5513
http://offerta-traghetto-per-la-grecia.dtufrq.org/
http://offerte-di-lavoro-in-friuli.cckzfi.org/
http://gran-loggia-madre-illuminato-...ia.uoyrgt.org/ <a
href="http://messenger-applicazione-non-correttamente-inizializzata-0xc0000005.uoyrgt.org/">
http://messenger-applicazione-non-co...05.uoyrgt.org/
</a>
http://delibera-comunale-approvazion...ti.hzuhtu.org/
<a href="http://hotel-onda-verde-praiano-sa.hzuhtu.org/">
http://hotel-onda-verde-praiano-sa.hzuhtu.org/ </a>
http://prevendita-teatro-palazzo-cul...na.hzuhtu.org/ <a
href="http://the-matrix-path-of-neo-trucco.guqsuy.org/">
http://the-matrix-path-of-neo-trucco.guqsuy.org/ </a>
http://banche-dati-sailor-provincia-m.fkgkox.org/ <a
href="http://offerta-capodanno-plan-de-corones.dtufrq.org/">
http://offerta-capodanno-plan-de-corones.dtufrq.org/ </a>
3ebbdc0c5c788c89d957115fc277340d

Jun 11 '07 #28
d6ab7be0ff12d616edc597ccebf06ca0 http://www.kcxesd.org <a
href="http://www.nkltre.org"http://www.nkltre.org </a<a
href="http://nqdwgl.org"http://nqdwgl.org </a>
http://www.bwmuus.org
http://www.bwmuus.org
http://www.bectcd.org <a
href="http://www.fkrbpd.org"http://www.fkrbpd.org </a<a
href="http://www.kgsisp.org"http://www.kgsisp.org </ahttp://hilxhr.org
http://nkltre.org a4d20a8afbc395002366bd667860c4d3

Jun 14 '07 #29

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

19 posts views Thread by Daniel Billingsley | last post: by
28 posts views Thread by onkar | last post: by
3 posts views Thread by rashpal.sidhu | last post: by
6 posts views Thread by ampo | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.