•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the HTML and CSS section within the Web Development category of DaniWeb, a massive community of 403,110 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,235 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our HTML and CSS advertiser: Lunarpages Web Hosting
Views: 4694 | Replies: 4
![]() |
•
•
Join Date: Jun 2004
Location: H4x0rville
Posts: 2,105
Reputation:
Rep Power: 9
Solved Threads: 18
I'm testing something on an old version of netscape, specifically 4.7. Everythings fine except for my javscript function doesn't work because it says getElementById is not a function:
document.getElementById('ncp').src = "ncp" + pictureNum + ".jpg";
I've got many more of these type lines but it works fine in IE and FF. Is there something I can do to make this compatible with netscape browsers?
document.getElementById('ncp').src = "ncp" + pictureNum + ".jpg";
I've got many more of these type lines but it works fine in IE and FF. Is there something I can do to make this compatible with netscape browsers?
You'll have to navigate the hierarchy. For example, use the document.images collection.
I made the decision long ago that I simply wasn't going to worry myself, or add huge development overhead, to supporting old browers, particularly for corporate development projects and/or sites. Use a strict DOCTYPE, code to that standard, cut down on the fancy stuff, and use server-side code as much as possible.
I made the decision long ago that I simply wasn't going to worry myself, or add huge development overhead, to supporting old browers, particularly for corporate development projects and/or sites. Use a strict DOCTYPE, code to that standard, cut down on the fancy stuff, and use server-side code as much as possible.
•
•
Join Date: Jun 2004
Location: H4x0rville
Posts: 2,105
Reputation:
Rep Power: 9
Solved Threads: 18
I just decided to scrap the idea. I couldn't get anything to work without changing a bunch of code. I think to really get it to work you have to use layers with netscape, but it's just not worth it.
Thanks for the help!
Thanks for the help!
•
•
Join Date: Aug 2004
Posts: 49
Reputation:
Rep Power: 5
Solved Threads: 1
Netscape 6+ supports getElementById.
If you require support for Netscape 4 (about 1 visitor in 500 or less now) then you need to use document.layers instead just for those visitors and use getElementById for everyone else.
If you require support for Netscape 4 (about 1 visitor in 500 or less now) then you need to use document.layers instead just for those visitors and use getElementById for everyone else.
![]() |
•
•
•
•
•
•
•
•
DaniWeb HTML and CSS Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
- how to make animation bar in vb.net (ASP.NET)
- Getting the height and width of content fitting DIV element. (JavaScript / DHTML / AJAX)
- A new image swap? (JavaScript / DHTML / AJAX)
- Error Microsoft OLE DB/ODBC (0x80004005) Access (ASP)
- this. method is working "backwards" (JavaScript / DHTML / AJAX)
- Is my code wrong or is Opera? (JavaScript / DHTML / AJAX)
- 'Lock Down' a form (PHP)
- How can fix the problem? (JavaScript / DHTML / AJAX)
- Forms Not Returning Correct Information (JavaScript / DHTML / AJAX)
- Forms (JSP)
Other Threads in the HTML and CSS Forum
- Previous Thread: HTML Introduction
- Next Thread: css help plzz



Linear Mode