ashutosh
javascript
4 Answer(s)      7 years ago
Posted in : Java Beginners

Ads

View Answers

January 19, 2009 at 12:18 AM


Hi friend,

Code After "property" validation :


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=x-user-defined">
<STYLE>A.first:link {
COLOR: green; TEXT-DECORATION: none
}
A.first:visited {
COLOR: green; TEXT-DECORATION: none
}
A.first:hover {
COLOR: yellow; TEXT-DECORATION: none
}
A.second:link {
COLOR: #400000
}
A.second:visited {
COLOR: #400000
}
A.second:hover {
COLOR: yellow
}
BODY {
BACKGROUND-COLOR: #d2b48c
}
TD {
text-color: #400000
}
</STYLE>

<SCRIPT type=text/javascript>

function validateForm(theForm){

var len = theForm.property.length;

if(theForm.request.selectedIndex == 0 ) {
alert("Please select property!");
return false;
}

var radio_choice = false;
for (counter = 0; counter < radio_form.radio_button.length; counter++){
if (radio_form.radio_button[counter].checked)
radio_choice = true;
}

if (!radio_choice){
alert("Please select Category!")
return (false);
}
var check =false;
for(var i=0;i<Number(len);i++)
{
if(theForm.property[i].checked==true)
{
check = true;
break;
}
}
if(!check)
{
alert("Please select property");
return false;
}
if(theForm.state.selectedIndex == 0 ) {
alert("Please select state!");
return false;
}

if(theForm.city.selectedIndex == 0 ) {
alert("Please select city!");
return false;
}

return true;
}
</SCRIPT>



January 19, 2009 at 12:20 AM


<META content="MSHTML 6.00.2900.2180" name=GENERATOR></HEAD>
<BODY>--------------------------------------------------------------------------------

<TABLE align=center>
<TBODY>
<TR>
<TD><FONT class=first color=black size=12><I><B>Real Estate
Company</B></I></FONT></TD></TR></TBODY></TABLE>
<TABLE align=right>
<TBODY>
<TR>
<TD><A
href="file:///C:/Documents%20and%20Settings/innova204/Desktop/sign%20in.html"><FONT
color=black size=4>sign in</FONT> </A>
<TD><A
href="file:///C:/Documents%20and%20Settings/innova204/Desktop/sign%20Up.html"><FONT
color=black size=4>sign up</FONT> </A></TD></TR></TBODY></TABLE><BR><BR>
<HR>
</HR>
<TABLE align=center>
<TBODY>
<TR>
<TD><A class=first
href="file:///C:/Documents%20and%20Settings/innova204/Desktop/home.html"><B><FONT
size=4>Home</FONT></B></A>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<TD><A class=first
href="file:///C:/Documents%20and%20Settings/innova204/Desktop/AboutUs.html"><B><FONT
size=4>AboutUs</FONT></B></A>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<TD><A class=first
href="file:///C:/Documents%20and%20Settings/innova204/Desktop/propertysearch.html"><B><FONT
size=4>PropertySearch</FONT></B></A>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<TD><A class=first
href="file:///C:/Documents%20and%20Settings/innova204/Desktop/Gallery.html"><B><FONT
size=4>Gallery</FONT></B> </A>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<TD><A class=first
href="file:///C:/Documents%20and%20Settings/innova204/Desktop/quicksearch.html"><B><FONT
size=4>QuickSearch</FONT></B></A>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<TD><A class=first
href="file:///C:/Documents%20and%20Settings/innova204/Desktop/Link%20Your%20Property.html"><B><FONT
size=4>Link Your Property</FONT></B></A>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <A
class=first
href="file:///C:/Documents%20and%20Settings/innova204/Desktop/contactus.html"><B><FONT
size=5>ContactUs</FONT></B></A> </TR></TBODY></TABLE>
<HR>
</HR>
<MARQUEE><FONT color=white size=4><B>Data about shares/other realestate
information...</B></FONT></MARQUEE>
<HR>
</HR>
<CENTER>
<FORM name=radio_form onsubmit="return validateForm(this);" action=""
method=post>
<TABLE border=0>
<TBODY>
<TR>
<TD><SELECT name=request> <OPTION value=0
selected>AllProperties</OPTION> <OPTION value=1>Rent</OPTION> <OPTION
value=2>Sale</OPTION></SELECT></TD></TR>
<TR>
<TD>Category: <INPUT type=radio value=residence
name=radio_button>Residence <INPUT type=radio value=commercial
name=radio_button>Commercial <INPUT type=radio value=both
name=radio_button>Both</TD></TR>
<TR>


January 19, 2009 at 12:21 AM


<TD>PropertyType</TD></TR>
<TR>
<TD><INPUT type=checkbox name=property>Apartments</TD>
<TD><INPUT type=checkbox name=property>Resort</TD>
<TD><INPUT type=checkbox name=property>OfficeSpace</TD>
<TD><INPUT type=checkbox name=property>BeachHouses</TD></TR>
<TR>
<TD><INPUT type=checkbox name=property>Restaurents</TD>
<TD><INPUT type=checkbox name=property>Ulla</TD>
<TD><INPUT type=checkbox name=property>Castle</TD>
<TD><INPUT type=checkbox name=property>Duplex</TD></TR>
<TR>
<TR>
<TD><INPUT type=checkbox name=property>PreConstruction</TD>
<TD><INPUT type=checkbox name=property>Vineyard</TD>
<TD><INPUT type=checkbox name=property>CommercialComplex</TD>
<TD><INPUT type=checkbox name=property>Iglou</TD></TR>
<TR>
<TD><INPUT type=checkbox name=property>SingleFamilyHome</TD>
<TD><INPUT type=checkbox name=property>WareHouse</TD>
<TD><INPUT type=checkbox name=property>Business</TD>
<TD><INPUT type=checkbox name=property>Others</TD></TR>
<TR>
<TD><BR><B>Property
Location<B></B></B></TD></TR>--------------------------------------------------------------------------------

<TR>
<TD><SELECT name=state> <OPTION value=0 selected>select state</OPTION>
<OPTION value=1>Andaman and Nicobar Islands</OPTION> <OPTION
value=2>Andhra Pradesh</OPTION> <OPTION value=3>Arunachal
Pradesh</OPTION> <OPTION value=4>Assam</OPTION> <OPTION
value=5>Bihar</OPTION> <OPTION value=6>Chandigarh</OPTION> <OPTION
value=7>Chhattisgarh</OPTION> <OPTION value=8>Dadra and Nagar</OPTION>
<OPTION value=9>Daman and Diu</OPTION> <OPTION value=10>Delhi</OPTION>
<OPTION value=11>Goa</OPTION> <OPTION value=12>Gujarat</OPTION> <OPTION
value=13>Haryana</OPTION> <OPTION value=14>Himachal</OPTION> <OPTION
value=15>Jammu and Kashmir</OPTION> <OPTION value=16>Jharkhand</OPTION>
<OPTION value=17>Karnataka</OPTION> <OPTION value=18>Kerala</OPTION>
<OPTION value=19>Lakshadweep</OPTION> <OPTION value=20>Madhya
Pradesh</OPTION> <OPTION value=21>Maharashtra</OPTION> <OPTION
value=22>Manipur</OPTION> <OPTION value=23>Meghalaya</OPTION> <OPTION
value=24>Mizoram</OPTION> <OPTION value=25>Nagaland</OPTION> <OPTION
value=26>Orissa</OPTION> <OPTION value=27>Puducherry</OPTION> <OPTION
value=28>Punjab</OPTION> <OPTION value=29>Rajasthan</OPTION> <OPTION
value=30>Sikkim</OPTION> <OPTION value=31>Tamil Nadu</OPTION> <OPTION
value=32>Tripura</OPTION> <OPTION value=33>Uttarakhand</OPTION> <OPTION
value=34>Uttar Pradesh</OPTION> <OPTION value=35>West
Bengal</OPTION></SELECT>


January 19, 2009 at 12:22 AM


<TD><SELECT name=city> <OPTION value=0 selected>select city</OPTION>
<OPTION value=1>Alappuzha</OPTION> <OPTION value=2>Baleshwar</OPTION>
<OPTION value=3>Bardhhaman</OPTION> <OPTION value=4>Bharuch</OPTION>
<OPTION value=5>Berhampur</OPTION> <OPTION value=6>Kozhikode</OPTION>
<OPTION value=7>Kannur</OPTION> <OPTION value=8>Chengalpattu</OPTION>
<OPTION value=9>Kochi</OPTION> <OPTION value=10>Chennai</OPTION> <OPTION
value=11>Guwahati</OPTION> <OPTION value=12>Jalandhar</OPTION> <OPTION
value=13>Palakkad</OPTION> <OPTION value=14>Pune</OPTION> <OPTION
value=15>Kollam</OPTION> <OPTION value=16>Sewagram</OPTION> <OPTION
value=17>Sridham</OPTION> <OPTION value=18>Srirampur</OPTION> <OPTION
value=19>Tarangambadi</OPTION> <OPTION value=20>Thalasseri</OPTION>
<OPTION value=21>Thiruchchirapalli</OPTION> <OPTION
value=22>Trissur</OPTION> <OPTION value=23>Thiruvananthapuram</OPTION>
<OPTION value=24>Udhagamandalam</OPTION> <OPTION
value=25>Vadodara</OPTION> <OPTION value=26>Varanasi</OPTION> <OPTION
value=27>Vasai</OPTION> <OPTION value=28>Vijayawada</OPTION></SELECT>
</TD></TR></TBODY></TABLE>
<TABLE>
<TBODY>
<TR>
<TD><INPUT type=submit value=SEARCH name=submit></TD>
<TD><INPUT type=reset value=RESET>
</TD></TR></TBODY></TABLE></FORM></CENTER></BODY></HTML>

Thanks









Related Tutorials/Questions & Answers:
JavaScript
JavaScript  clone JavaScript
javascript
javascript  javascript code to dynamically add table on button click.../javascript/javascriptexamples/javascript-add-row-dynamically.shtml http://www.roseindia.net/javascript/javascript-add-row-to-table.shtml http://www.roseindia.net
Advertisements
Javascript
Javascript  How validations are done using javascript ,with example? and interview questions on javASCRIPT
javaScript
javaScript  How to open a browser window that cannot be resized? (HTML + Javascript
javascript
javascript  Hi deepak, how to write form validation on javascript
JavaScript
JavaScript  how to get full path of a file type in javascript
JavaScript
should use JavaScript? Thanks   Hi, JavaScript is scripting language that runs on browser. You have to embed JavaScript in HTML page. Please see JavaScript tutorial. Thanks
javascript
javascript  write a program to display implement about browsers using javascript
javascript
javascript  i have just learned javascript... can you tell me what kind of applications can be made by javascript?? thank you
javascript
javascript  hi sir, if i want to learn javascript. what concepts i want to know
javascript
javascript  Hi sir, This is sinduri, i want to learn javascript, so plz can u help me.how to learn
javascript
javascript  how to set the request or session attribute in javascript head part of jsp page
JAVASCRIPT
JAVASCRIPT  I have one textbox and I want to validate that it must start with number(1-0). can anyone tell me a javascript for that ? thanks in advance
Javascript
Javascript   Javascript to check Numeric entry in checkbox.....   Hi Please find the following code for numeric entry validation in javascript function validateBox(){ var data=document.myForm.someText.value
javaScript
javaScript  . Print a table like below in JAVASCRIPT 5 x 1 = 5 5 x 2 = 10 ΓΆβ?¬Β¦ΓΆβ?¬Β¦ΓΆβ?¬Β¦. 5 x 20 = 100
javascript
javascript  hi, I was actually working on to calculate the number of days between two dates of yyyy-mm-dd format using javascript, and when i click on button then number of days should be display in textbox
javascript
javascript  passing javascript values to jsp   Hi Friend, Try the following code: form.jsp: <html> <script> function getMsg...;/script> <input type="button" onclick="getMsg();" value="Get Javascript value
Javascript
this format xxx-xxx-xxxx, i want the code in javascript. as a function.   Javascript Phone Number Validation <html> <script> function..." method="post" onsubmit="javascript:return validate();"> Phone Number:<
Javascript
Javascript  Dear Sir, Thank You a lot for your continuos support.Again i am in need of your help. What is the javascript code to disable a link,once... javascript or css Please help me.Urgent Regards Debasis   Hello Friend
Javascript
Javascript  <html> <head> <script type="text/javascript"> function validateForm() { var sname=document.getElementById('spocname'); var scontact=document.getElementById('spoccontact'); if(sname.value.length
javascript
javascript  how to create random question using javascript?   <html> <script> function displayQuestions() { document.getElementById("text").value=" "; var Questions = new Array(20
javascript
javascript  Hi deepak, sample example on javascript form validation   <html> <script> function checkName(text) { if(isNaN(text)){ return 1; } else{ alert("Please enter a valid name. The only charachters
JavaScript types
JavaScript types  What are JavaScript types
javascript validation
javascript validation  validation of comparing dropdownlist and textbox in javascript
JavaScript and ECMAScript
JavaScript and ECMAScript  What?s relationship between JavaScript and ECMAScript
javascript doubt
javascript doubt  How to retrieving the values from Database by using javascript
JavaScript - JavaScript Tutorial
JavaScript Tutorials is one of the best Quick reference to the JavaScript. In this JavaScript reference you will find most of the things about java script. JavaScript tutorial is classified into sections with examples. This tutorial
JavaScript - JavaScript Tutorial
JavaScript Tutorials is one of the best Quick reference to the JavaScript. In this JavaScript reference you will find most of the things about java script. JavaScript tutorial is classified into sections with examples. This tutorial
Prototypes for JavaScript
Prototypes for JavaScript  What's Prototypes for JavaScript

Ads

Advertisement