hi i want validations for two drop down lists. when user
enter to second list by skipping first list alert box should
appear.
<HTML><HEAD>
<TITLE>drop down validation</TITLE>
<script type="text/javascript">
function validateForm(){
if(document.ItemList.Item.selectedIndex==0)
{
alert("Please select item from first list.");
document.ItemList.Item.focus();
return false;
}
return true;
}
</SCRIPT>
</HEAD>
<BODY>
Please choose an item from the drop down menu:
<form name="ItemList" method="post" action="asp.html"
onsubmit="validateForm()">
<table width="100%" border="0">
<tr>
<td width="135">Choose a username: </td>
<td>
<select name="Item">
<option value selected> SELECT </option>
<option value>Apples</option>
<option value>Oranges</option>
</select>
<table width="100%" border="0">
<tr>
<td width="135">Choose a username: </td>
<td>
<select name="Item" onclick="validateForm()">
<option value selected> SELECT </option>
<option value>Apples</option>
<option value>Oranges</option>
</select>
<input type="submit" name="Submit" value="Submit">
</td></tr></table></form>
</BODY>
</HTML>
please any body help me
thanks
No Answer is Posted For this Question
Be the First to Post Answer
What is the use of ‘debugger’ keyword in javascript code?
HI friends .am Mohammed Riyash.JMC BCA Tricy. My doubt is. In some websites like bloomberg.com..etc. when MouseOver() action performed.the menuitems will be drop down..and hides when blur()action happened.any body give the code for that..
Is it possible to use javascript to change the meta-tags of the page?
What is stack queue?
Why typeof null is object?
Is javascript object a hash table?
How to add a combo box dynamically at run time in Java script?
What is nodetype in javascript?
Is javascript array dynamic?
how many feet does a centipeed have?
Is a javascript script faster than an asp script?
write a program to generte a harmonic series 1+1/2+1/3+1/4+1/5 upto 15 terms.