There are 2 section on my page. I have a combo box on each section. Use need to select at least one option from section 1 or section 2. I have the following code to validate the data, I use msgbox to display the value of the two combo box and I get no value in these two boxes.
Here is my code:
Function ValidateOK(myvalue1, myvalue2, mycontrol,myMessage)
set myform=document.forms("MRready"
strCSBBarriers=Document.getElementById("CSB1".Value
strOthBarriers=Document.getElementById("OTH1".Value
If ValidateBarriers(strCSBBarriers, strOthBarriers, Document.getElementById("CSB1","Barriers"=True then ValidateOK=True
else
ValidateOK=False
End If
End Function
The following is the ValidateBarrier function:
Function ValidateBarriers(myvalue1,myvalue2,mycontrol,myMessage)
'If Left(myvalue1,6)="select" and Left(myvalue2,6)="select" then
'ValidateBarriers=False
'Msgbox "You must select at least one barrier from A or B.",,myMessage
'mycontrol.Focus
'Else
'ValidateBarriers=True
'End If
msgbox "value 1: " & myvalue1
msgbox "value 2: " & myvalue2
msgbox "myMessage : " & mymessage
ValidateBarriers=false
End Function
Thanks in advance.
Here is my code:
Function ValidateOK(myvalue1, myvalue2, mycontrol,myMessage)
set myform=document.forms("MRready"
strCSBBarriers=Document.getElementById("CSB1".Value
strOthBarriers=Document.getElementById("OTH1".Value
If ValidateBarriers(strCSBBarriers, strOthBarriers, Document.getElementById("CSB1","Barriers"=True then ValidateOK=True
else
ValidateOK=False
End If
End Function
The following is the ValidateBarrier function:
Function ValidateBarriers(myvalue1,myvalue2,mycontrol,myMessage)
'If Left(myvalue1,6)="select" and Left(myvalue2,6)="select" then
'ValidateBarriers=False
'Msgbox "You must select at least one barrier from A or B.",,myMessage
'mycontrol.Focus
'Else
'ValidateBarriers=True
'End If
msgbox "value 1: " & myvalue1
msgbox "value 2: " & myvalue2
msgbox "myMessage : " & mymessage
ValidateBarriers=false
End Function
Thanks in advance.