anuj_web
New Member
- Messages
- 145
- Reaction score
- 0
- Points
- 0
Hi,
I am trying to access all form elements using this JS code
I call the function here :
the code does not give any msg as required...there are four comboboxes in the form "frmsearch"
thanks
I am trying to access all form elements using this JS code
Code:
function srchvalidate(theform)
{
var str = '';
var elem = document.getElementById('theform').elements;
for(var i = 0; i < elem.length; i++)
{
if(elem[i].value=="")
{
alert("You have not filled all parameters");
}
else
{
theform.submit.type="submit";
theform.submit();
}
}
}
I call the function here :
Code:
<input type="button" id="Button2" name="submit" value="Search" style="position:absolute;left:80px;top:219px;width:75px;height:24px;z-index:11" tabindex="5" onclick="srchvalidate(document.frmsearch)">
the code does not give any msg as required...there are four comboboxes in the form "frmsearch"
thanks