I have the following code snippet that defines the property values in my form.
function retrieve(){
setSelectedIndex(document.producerSetForm.GA1,"<%=ssnGA1%>");
setSelectedIndex(document.producerSetForm.GA2,"<%=ssnGA2%>");
setSelectedIndex(document.producerSetForm.GA3,"<%=ssnGA3%>");
setSelectedIndex(document.producerSetForm.GA4,"<%=ssnGA4%>");
setSelectedIndex(document.producerSetForm.GA5,"<%=ssnGA5%>");
}
where these ssnGA1,ssnGA2 etc may or may not be having a value. I need to check whether whether they have a value to do some more processing. I tried
var len=<%=ssnGA1.toString().length()%>;
if(len !=0)
but it works only if the value is present. else it giving javascript error. Please help. THANKS