Programming Forums

Programming Forums (http://www.programmingforums.org/forumindex.php)
-   JavaScript and Client-Side Browser Scripting (http://www.programmingforums.org/forum23.html)
-   -   Javascript (http://www.programmingforums.org/showthread.php?t=541)

chaiachaya Sep 14th, 2004 4:56 AM

Hi,
the netscape navigator to disable text fields. the use of

:
if(navigator.appName == "Netscape")
document.busForm.busRoom.disabled = true;
:
:
should work. Netscape java error handler gives me busForm undefined yet its properly defined in the html, IE recognizes it. Is their another way we can get away with this?

Thanks in advance!

Ooble Sep 14th, 2004 11:03 AM

For the code to work in Netscape, you'll have to write:
:

document.getElementById(busForm).busRoom.disabled = true;
The getElementById thing retrieves a pointer to the field - Netscape doesn't create them automatically.

One more thing, though: why do you want to disable the textbox in Netscape? You know that's alienating potential visitors, right?


All times are GMT -5. The time now is 12:57 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC