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 *** | | | | re: crazy cross-platform javascript rendering problems
töff 93722 wrote: Quote:
>
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.
>
[...] Quote:
>
Bottom line: WHAT IS WRONG WITH MY JAVASCRIPT!?
New bottom line:
WHAT ERROR MESSAGES ARE YOU GETTING? | | | | re: crazy cross-platform javascript rendering problems
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 *** | | | | re: crazy cross-platform javascript rendering problems
töff 93722 wrote: Quote:
>
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 | | | | re: crazy cross-platform javascript rendering problems
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 *** | | | | re: crazy cross-platform javascript rendering problems
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. | | | | re: crazy cross-platform javascript rendering problems
On Mar 1, 7:28 am, töff 93722 <t...@arcticcoconut.comwrote: Quote:
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 Quote:
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. Quote:
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"). Quote:
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 | | | | re: crazy cross-platform javascript rendering problems
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. Quote:
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. Quote:
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 *** | | | | re: crazy cross-platform javascript rendering problems
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 *** | | | | re: crazy cross-platform javascript rendering problems
On Sat, 03 Mar 2007 22:53:06 +0100, töff <nospam@devdex.comwrote: Quote:
>
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/ | | | | re: crazy cross-platform javascript rendering problems
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 *** | | | | re: crazy cross-platform javascript rendering problems
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 *** | | | | re: crazy cross-platform javascript rendering problems
töff said the following on 3/3/2007 7:15 PM: <snip> 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/ | | | | re: crazy cross-platform javascript rendering problems
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 *** | | | | re: crazy cross-platform javascript rendering problems
töff said the following on 3/5/2007 10:26 AM: Quote:
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. Quote:
I was considering doing an image preloader.
You might want to consider it, you may not. There is a better alternative. Quote:
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. Quote:
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. Quote:
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. Quote:
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. 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/ | | | | re: crazy cross-platform javascript rendering problems
Every time I come into usenet, some asshole ruins it.
I will take your advice and leave.
*** Sent via Developersdex http://www.developersdex.com *** | | | | re: crazy cross-platform javascript rendering problems
töff said the following on 3/5/2007 6:33 PM: Quote:
Every time I come into usenet, some asshole ruins it.
Thats because we get tired of idiotic assholes like you. Quote:
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/ | | | | re: crazy cross-platform javascript rendering problems
Changed my mind. I'll stay and just ignore Randy Webb.
*** Sent via Developersdex http://www.developersdex.com *** | | | | re: crazy cross-platform javascript rendering problems
On Mar 6, 7:44 am, töff <nos...@devdex.comwrote: Quote:
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! | | | | re: crazy cross-platform javascript rendering problems
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! Quote:
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 *** | | | | re: crazy cross-platform javascript rendering problems
On Mar 6, 11:37 am, töff <nos...@devdex.comwrote: Quote:
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!
> Quote:
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... | | | | re: crazy cross-platform javascript rendering problems
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. | | | | re: crazy cross-platform javascript rendering problems
töff said the following on 3/6/2007 10:44 AM: Most idiots do. Quote:
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/ | | | | re: crazy cross-platform javascript rendering problems | | | | re: crazy cross-platform javascript rendering problems | | | | re: crazy cross-platform javascript rendering problems | | | | re: crazy cross-platform javascript rendering problems | | | | re: crazy cross-platform javascript rendering problems |  | Similar JavaScript / Ajax / DHTML bytes | | | /bytes/about
We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights.
Get the best answers to your questions from over 226,546 network members.
|