Google Search
Google Search
HTML/JavaScript
Monday, August 29, 2011
Dynamic Listbox selection
function validate()
{
for(var i=0;i< document.form.FirstList.length;i++)
{
document.form.SecondList[i].selected=true;
}
for(var i=0;i< document.form.SecondList.length;i++)
{
document.form.SecondList[i].selected=true;
}
var title2=document.form.title2.value;
if(title2=="")
{
alert("Enter the Title");document.form.title2.focus();return false;
}
var description2=document.form.description2.value;
if(description2=="")
{
alert("Enter the Description");document.form.description2.focus();return false;
}
var status2=document.form.status2.value;
if(status2=="")
{
alert("Select the Status");document.form.status2.focus();return false;
}
var priority2=document.form.priority2.value;
if(priority2=="")
{
alert("Select the Priority");document.form.priority2.focus();return false;
}
var SecondList=document.form.SecondList.value;
if(document.form.SecondList.length=="0")
{
alert("Select the Assigned To");document.form.SecondList.focus();return false;
}
var starthr=document.form.starthr.value;
if(starthr=="")
{
alert("Select the Start Time");document.form.starthr.focus();return false;
}
var startdate=document.form.startdate.value;
if(startdate=="")
{
alert("Select the Start Date");document.form.startdate.focus();return false;
}
var enddate=document.form.enddate.value;
if(enddate=="")
{
alert("Select the End Date");document.form.enddate.focus();return false;
}
var relatedto2=document.form.relatedto2.value;
if(relatedto2=="")
{
alert("Select the Related To");document.form.relatedto2.focus();return false;
}
return true;
}
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment