anuj_web
New Member
- Messages
- 145
- Reaction score
- 0
- Points
- 0
Hi...
How can i identify the type of a combobox element..
like the text box is identified by the type "text"
I got that one....
but when I try to check the values of all the comboboxes it does not work
I cannot access the control type and its value in this code and hence ...I think this is why the code does not give the output ... i.e no alert is generated
thanks
How can i identify the type of a combobox element..
like the text box is identified by the type "text"
I got that one....
but when I try to check the values of all the comboboxes it does not work
Code:
function Validate(theform)
{
var elem = document.getElementById('theform').elements;
for(var i = 0; i < elem.length; i++)
{
if(elem[i].type="select-one" && elem[i].value="")
{
alert('You have not selected all required Parameters');
theform.action="";
theform.submit;
}
else
{
theform.action="Search.php";
theform.submit;
}
}
}
I cannot access the control type and its value in this code and hence ...I think this is why the code does not give the output ... i.e no alert is generated
thanks
Last edited: