homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
Forum Library, Charter, Moderator: open

JavaScript and AJAX Forum

Javascript & Netscape4 Problem
Need a Solution

 4:18 am on Feb 24, 2003 (gmt 0)

I'm still a novice when it comes to writing Javascript. I've tried changing this code several different ways and I just can't get it to work in Netscape 4 so I would appreciate any suggestion you might have. It does work in the textbox area for IE6 and NN6.

function messages(adviceNumber) {
//document.FORM1.getElementById("adviceBox").value = helpers[adviceNumber];
//document.layers.FORM1.adviceBox.value = helpers[adviceNumber];
MM_findObj("adviceBox").value = helpers[adviceNumber];

Thanks in advance for your help.




 4:31 am on Feb 24, 2003 (gmt 0)

I don't use javascript that much, but maybe you could try the following:

change your function header so that you pass the form along like so:

function messages(yourForm, adviceNumber) {

and change the value like so:
yourForm.adviceBox.value = helpers[adviceNumber];

now you'd need to change the function calls wherever they are to something like this:

messages(FORM1, adviceNumeber)

hope that helps



 9:46 am on Feb 24, 2003 (gmt 0)

Had a similiar problem before. Something to with referencing and casting. I would try spliting up your assignment into

function messages(adviceNumber) {
var ab=0;
ab = MM_findObj("adviceBox");
ab.value = helpers[adviceNumber];

Test it in NN4/Morizilla, if it doesn't work type,
in the address bar, this opens up a console that may help with debugging.



 8:40 pm on Feb 24, 2003 (gmt 0)

getElementbyID doesn't work in Netscape 4.X (AFAIK)

It's one of the main reasons I stopped supporting Netscape 4.X.

There are a whole host of other issues with NN 4.X,including a completely different interpretation of the DOM from IE.

With IE being the leading browser I decided that NN needed to change rather than me change, and with NN 7, the DOM resembles that of IE.


 3:38 am on Feb 25, 2003 (gmt 0)

Thanks for all your help, I really appreciate it. I've found out that NN4 doesn't support mouseover event handling in the texarea box. I'll have to find a different solution. Thanks for trying. :)



 10:37 pm on Feb 25, 2003 (gmt 0)

Equivalent to document.getElementById() in older browsers:

document.layers['id'] = NN4
document.all['id'] = IE4

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved