Closed Thread Icon

Topic awaiting preservation: this.ID / this.className in NS 4.5? (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=8793" title="Pages that link to Topic awaiting preservation: this.ID / this.className in NS 4.5? (Page 1 of 1)" rel="nofollow" >Topic awaiting preservation: this.ID / this.className in NS 4.5? <span class="small">(Page 1 of 1)</span>\

 
Kaniz
Bipolar (III) Inmate

From:
Insane since: Jun 2003

posted posted 08-01-2003 19:22

I am working on a program / webpage for work right now, and need to generate a game board. Each cell in the board has something like
<td ...>
<a href="#" class=normal id=somequestionid onClick=prepQuestion(this.id,this.className> $200 </a>
</td>

This works fine in IE 6.0, however in NS 4.5, its not working at all and I am getting undefined. The reason why I am not passing the ID manually, is because another frame/popup window will be changing the class name for the given ID (click a question, pop up window.. you answer it, if its correct, it will change the class for that ID from normal to correct, if incorrect, it will set it to incorrect) and it would/will save me alot work if I can pass the onclick event the this....whatever

is there any way to get a this.ID type thing working in NS 4.5?

ozphactor
Maniac (V) Inmate

From: California
Insane since: Jul 2003

posted posted 08-01-2003 21:17

You do realize that IE6 and NN4 are a long ways apart, right?

I think earlier versions of Netscape 4 don't even recognize the ID attribute. (Correct me if I'm wrong)
I have a copy of Netscape 4.79 (which is the last of net NN4s) and the ID attribute works properly in it,

Some things you might wanna try:

1. Put quotes around all your attributes. Not only is this good form, but some attributes require the quotation marks.


...um, I can't really think of anything else. Sorry, but I really *hate* dealing with Netscape 4...

Kaniz
Bipolar (III) Inmate

From:
Insane since: Jun 2003

posted posted 08-01-2003 21:38

I think I did myself a diservice when writing my first 'major' program which used alot of DHTML/JavaScript/etc, in the fact that I *KNEW* 100% for certian that it would only be used on an IE6.0 computer, I didnt bother doing any cross-browser compatability stuff

However my currnet project, cant count on that limitation so need to take as low as NS 4.5 into consideration (per boss's orders) .... However, I *think* I can fudge my way around it a bit and just need to take a different approach at how I'm handling the tables/information.



Slime
Lunatic (VI) Mad Scientist

From: Massachusetts, USA
Insane since: Mar 2000

posted posted 08-02-2003 02:10

I strongly doubt NN 4 supports the "className" property. Try just "class" instead (but only for NN4 - use className as normal for other browsers).

Also note that you forgot a parenthesi in your code. You should also use quotes around all HTML attributes that aren't numbers (including onclick and other JavaScript events), as it is good style and will keep you from making any mistakes with whitespace.

« BackwardsOnwards »

Show Forum Drop Down Menu