![]() |
|
#1
|
||||
|
||||
This JavaScript doesn't work on Mozilla.I am trying to hide / show 2 different versions of each row using this JavaScript code (by the user clicking on the + or - signs that appear on the page). The thing is, it works fine on Internet Explorer but nothing happens with Mozilla.
I would appreciate it if someone would try out this page and tell me where I went wrong... HTML Code:
__________________
J de Silva Learning Journal | GIDForums™ | GIDNetwork™ | GIDWebhosts™ | GIDSearch™ |
|
#2
|
|||
|
|||
|
According www.dansteinman.com, Mozilla uses a different DOM to IE.
I've tried to edit your code, but nothing is working for me. But if you follow his tutorial, things might be better for you GF |
|
#3
|
||||
|
||||
|
Well... that was quite an old page / tutorial and...
http://www.dansteinman.com/dynduo/en...ingstyles.html , not one sample link on that page worked with Mozilla. Now I remember why I never got around to learning JavaScript... __________________
J de Silva Learning Journal | GIDForums™ | GIDNetwork™ | GIDWebhosts™ | GIDSearch™ |
|
#4
|
|||
|
|||
|
Oh you're not serious
Yet another browser with it's own DOM? Will it ever end? Surely it's the same as Netscape's? Grrr, I'll have a try at it later tonight, and see if I get anywhere. GF |
|
#5
|
||||
|
||||
|
I STILL cannot believe this but I think I got it!
Here's where I went wrong - I had to use Code:
instead of Code:
Code:
Now it works both with MSIE and Mozilla... tomorrow, a quick check with Opera. Before that, some well deserved sleep. __________________
J de Silva Learning Journal | GIDForums™ | GIDNetwork™ | GIDWebhosts™ | GIDSearch™ |
|
#6
|
||||
|
||||
JavaScript's "document.getElementById(id).style.display"I have updated the code with all the corrections that make it now work both with Mozilla and Microsoft's Internet Explorer (and I suspect, the latest version of Netscape too).
Unfortunately, it doesn't work at all with Opera 6.0. I hope it does on the latest, version 7. If anyone can confirm this, I would appreciate it. Corrected Code: HTML Code:
__________________
J de Silva Learning Journal | GIDForums™ | GIDNetwork™ | GIDWebhosts™ | GIDSearch™ |
|
#7
|
|||
|
|||
|
Hi JdS,
I have absolutely no clue where you went wrong (as I have never worked with JavaScript), but I usually don't care about compatibility. I only test my pages in IE to make sure they work fine, and I make sure that the site looks fine on 800x600 and 1024x768 (the two resolutions that I generally use). I do have Mozilla, Netscape, Opera, Mosaic, K-Meleon, Hotjava, and Beonex at my dispensal. Anyway, back to the topic. It doesn't make too much of a difference to me if 8% of people can't view my site properly. In fact, the only client-side scripting language that I use is VBScript, which only works in IE (and Netscape if you have the plugin installed). __________________
You're not supposed to be looking at this. |
|
#8
|
|||
|
|||
|
Nope, Opera 6 doesn't like it, but it's DOM is pretty crappy anyway.
But are you aware that it only supports common DHTML if you've it set up to identify itself as IE5? Otherwise most DOM objects don't exist. GF |
|
#9
|
||||
|
||||
|
The second one works absolutely fine in firebird, which uses Mozilla 1.4.
Did anyone test it in Opera 7? Rob |
Recent GIDBlog
Flickr uploads of IA pictures by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| We're looking for JavaScript codes / mini tutorials. | JdS | Web Design Forum | 7 | 31-Mar-2008 23:25 |
| JavaScript Tutorial Part 1 | pcxgamer | Web Design Forum | 2 | 01-Dec-2003 09:16 |
| Why doesnt my form work correctly? | rhino1616 | Web Design Forum | 2 | 06-Nov-2003 17:21 |
| How do web redirection scripts work? | rhino1616 | Web Design Forum | 9 | 27-Oct-2003 09:47 |
| Mozilla TARGET question | nickbeee | Web Design Forum | 2 | 03-Aug-2002 03:57 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The