Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Javascript problem with Netscape

Status
Not open for further replies.

davideart

Programmer
Apr 4, 2001
55
IT
Hi everybody, I find problems using a client-side javascript: the script is the followin' and I call it on the ONCLICK event of an image

<script language=&quot;javascript&quot;>
function funname(){
if (FormName.TextBoxName.value=='string') {
window.alert('abcdefg');}}
</script>

The script works correctly in IE, but it does nothing in NN.
Have some of you any idea?

Just as a try, I try the followin':

<script language=&quot;javascript&quot;>
function funname(){
if (1==1) {
window.alert('abcdefg');}}
</script>

and it works, so I guess the problem is in the way I try to address the field value of the form.

Thank in advance, David
 
I'm not sure cos I'm quite new to JavaScript but have you tried
Code:
document.formname.textboxname.value
?
 
yeah, sorry for not havin' told before, but I've already tried document.formname....., window.document.formname...and the script still does not run in Netscape.
thanks anyway shmmeee
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top