Working in IE, but not Netscape Why?

Results 1 to 2 of 2

Thread: Working in IE, but not Netscape Why?

  1. #1
    Join Date
    Dec 1969

    Default Working in IE, but not Netscape Why?

    I have the following function written in javascript which works <BR>fine in IE, but gets a javascript error when the page is loaded in Netscape and the function doesn&#039t work.<BR><BR>function UpdateData()<BR>{<BR>if (ValidateNotEmpty(document.formOrder.SPck.value,&# 039PCK&#039)&& ValidateNotEmpty(document.formOrder.STerms.value,& #039Terms&#039))<BR> {<BR> document.formOrder.submit();<BR> }<BR>}<BR>The ValidateNotEmpty function is listed below, but I don&#039t think it has to do with that function because if I have only one<BR>item being validated, it works. ie. this line works in the<BR>above function.<BR> if (ValidateNotEmpty(document.formOrder.SPck.value,&# 039PCK&#039))<BR><BR><BR>function ValidateNotEmpty(sField,sFieldName)<BR> {<BR> var bValOk = true;<BR> var sMsgText =""<BR> if (JavaUtilTrim(sField) == "") <BR> {<BR> sMsgText = "Entry required: "+ sFieldName;<BR> MessageBox(sMsgText);<BR> var bValOk = false; <BR> }<BR> return(bValOk);<BR>}

  2. #2
    Join Date
    Dec 1969

    Default RE: Working in IE, but not Netscape Why?

    I am not sure, but may be problem is not functions.In Netscape you have to place both of functions onSubmit of the form, but you cannot use the onClick event of the button(if it&#039s an immage).So, try to call one function from another. I hope, it can help.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts