ie will have a value for the selectbox.value but netscape will not.

use 
var valNewMortinfo=
document.Mailme.NewMortinfo.options[document.Mailme.NewMortinfo.selectedInde
x].value;
var
valCurrentLoanInfo=document.Mailme.CurrentLoanInfo.options[document.Mailme.C
urrentLoanInfo.selectedIndex].value;

instead and all should work.

John

-----Original Message-----
From: Chapman, Katrina [mailto:[EMAIL PROTECTED]]
Sent: Friday, September 29, 2000 1:44 PM
To: CF-Talk
Subject: RE: JS does not work in Netscape but does in IE


function ValidateForm() {
var valCurrentLoanInfo=document.Mailme.CurrentLoanInfo.value;
var valNewMortinfo=document.Mailme.NewMortinfo.value;

//validate required fields
        if
                        ((valCurrentLoanInfo=="")&&(valNewMortinfo==""))
                        {
                                alert("You must select a Current Loan and/or
a New Mortgage option.");
                                return false;   
                }
document.Mailme.action="actionpage.cfm";
Mailme.submit()}

I know for a fact that this workis in IE cause it's what we use here.  I
haven't tested it in NS however.

--K

> -----Original Message-----
> From: Brown, David D. [mailto:[EMAIL PROTECTED]]
> Sent: Friday, September 29, 2000 8:58 AM
> To: CF-Talk
> Subject: JS does not work in Netscape but does in IE
> 
> 
> Could you someone tell me what is wrong with this code.?  It 
> works fine in
> IE, but not in Netscape.
> 
> 
> What I have is two select boxes and want at least one to be 
> something other
> then null.
> 
> The form name is Mailme and the two select names are 
> CurrentLoanInfo and
> NewMortinfo
> 
> Thank you
> 
> David
> 
> 
> function Validate() 
> { var bIsValid = true; 
> if (bIsValid && (!ValidCurrentLoanInfo() && !ValidNewMortInfo()))
> { error(document.mailme.CurrentLoanInfo,"You must select a 
> Current Loan
> and/or a New Mortgage option.");
>  bIsValid = false;
>  }
> 
> --------------------------------------------------------------
> ----------------
> Archives: http://www.mail-archive.com/[email protected]/
> To Unsubscribe visit 
> http://www.houseoffusion.com/index.cfm?sidebar=lists&body=list
s/cf_talk or send a message to [EMAIL PROTECTED] with
'unsubscribe' in the body.
----------------------------------------------------------------------------
--
Archives: http://www.mail-archive.com/[email protected]/
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.
------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/[email protected]/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to