Home Answers Viewqa Java-Beginners please send me java script for html validation

 
 


ashutosh
please send me java script for html validation
6 Answer(s)      4 years and 4 months ago
Posted in : Java Beginners

View Answers

January 13, 2009 at 11:38 PM


Hi friend,

complete code after javascript validation :


<html>
<head>
<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:white;}




body{ background-color:#D2B48C;}
td{text-color:#400000 ;}
</style>
<script>
function validate()
{
if(document.frm.first_name.value=="")
{
alert("Please enter first name.");
return false;
}
if(document.frm.last_name.value=="")
{
alert("Please enter last name.");
return false;
}
if(document.frm.address.value=="")
{
alert("Please enter address.");
return false;
}
if(document.frm.city.value=="")
{
alert("Please enter city.");
return false;
}

if(document.frm.zipcode.value=="")
{
alert("Please enter zipcode.");
return false;
}
if(document.frm.country.value=="")
{
alert("Please enter country.");
return false;
}
if(document.frm.phone.value=="")
{
alert("Please enter phone.");
return false;
}
if(document.frm.cardtype.value=="-1")
{
alert("Please select card type.");
return false;
}

if(document.frm.card_number.value=="")
{
alert("Please enter card number.");
return false;
}
if(document.frm.date_expiry.value=="")
{
alert("Please enter date of expiry.");
return false;
}
return true;
}
</script>
</head>
<body>

<form name="frm" onsubmit="return validate();">
<table align=center>
<tr>
<td><font class=first size=10 color=black><i><b>Real Estate Company</b></i></font></tr>
</table>


<table align=right>
<tr>
<td><a href="sign in.html"><font size=4 color=black>sign in</font>

<td><a href="sign Up.html"><font size=4 color=black>sign up</font>
</tr>
</table><br><br>


<hr></hr>
<table align="center">
<tr>
<td><a class="first" href="home.html"><b><font size=4>Home</font></b></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<td><a class="first" href="AboutUs.html"><b><font size=4>AboutUs</font></b></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<td><a class="first" href="propertysearch.html"><b><font size=4>PropertySearch</font></b></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<td><a class="first" href="gallery.html"><b><font size=4>Gallery</font></b></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

<td><a class="first" href="quicksearch.html"><b><font size=4>QuickSearch</font></b></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<td><a class="first" href="Link Your Property.html"><b><font size=4>Link Your Property</font></b></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<a class="first" href="contactus.html"><b><font size=4>ContactUs</font></b></a>
</table>

<hr></hr>

January 13, 2009 at 11:39 PM



<marquee><font color="white" size=6><b>Data about shares/other realestate information...</b></font></marquee>

<hr></hr>
<br>
<br>
<td><u>Billing Information:</u></td><br><br>

<td>First Name*&nbsp;<input type="text" name="first_name"></td><br>
<td>Last Name*&nbsp;&nbsp;<input type="text" name="last_name"></td><br>
<td>Address*&nbsp;&nbsp&nbsp;&nbsp;&nbsp;&nbsp;<input type="text" name="address"></td><br>
<td>City&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="text" name="city"
></td><br>
<tr></tr><tr><td>State&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td></tr>
<tr><td><select>
<option value="-1">Select State</option>

<option value="-1">Andaman and Nicobar</option>

<option value="-1">Andhra Pradesh </option>

<option value="-1">Arunachal Pradesh </option>


<option value="-1">Assam</option>

<option value="-1">Bihar </option>

<option value="-1">Chandigarh </option>


<option value="-1">Chhattisgarh </option>

<option value="-1">Dadra and Nagar </option>

<option value="-1">Daman and Diu </option>

<option value="-1">Delhi </option>

<option value="-1">Goa </option>

<option value="-1">Gujarat </option>

<option value="-1">Haryana </option>

<option value="-1">Himachal</option>

<option value="-1">Jammu and Kashmir </option>

<option value="-1">Jharkhand </option>

<option value="-1">Karnataka </option>

<option value="-1">Kerala </option>

<option value="-1">Lakshadweep</option>

<option value="-1">Madhya Pradesh </option>

<option value="-1">Maharashtra </option>

<option value="-1">Manipur </option>

<option value="-1">Meghalaya </option>

<option value="-1">Mizoram </option>

<option value="-1">Nagaland </option>

<option value="-1">Orissa</option>

<option value="-1">Puducherry </option>

<option value="-1">Punjab </option>

<option value="-1">Rajasthan </option>

<option value="-1">Sikkim </option>

<option value="-1">Tamil Nadu </option>

<option value="-1">Tripura </option>

<option value="-1">Uttarakhand </option>

<option value="-1">Uttar Pradesh </option>

<option value="-1">West Bengal</option>
</option>
</select><br>

<td>Zipcode*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="text" name="zipcode"></td><br>
<td>Country*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="text" name="country"></td><br>
<td>Phone&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="text" name="phone"></td><br><br>
<td><u>Payment Information:</u></td><br><br>
Card Type*&nbsp;&nbsp&nbsp;&nbsp;&nbsp&nbsp;
<select name="cardtype"><option value='-1'>select</option>
<option value='0'>Master Card</option>
<option value='1'>Visa</option>
<option value='2'>American express</option>

</select><br><br>
</select>
<td>Card Number*&nbsp;<input type="text" name="card_number"></td><br><br>
<td>Date of Expiry<input type="text" name="date_expiry"></td><br><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<td><input type="submit" value="Continue"></td>
<td><input type="submit" value="Reset"></td>
</form>

</body>
</html>

January 13, 2009 at 11:40 PM


For read more information visit to:

http://www.roseindia.net

Thanks


January 14, 2009 at 6:16 AM


Hi friend,


I am sending code according to your requirement.


<html>
<head>
<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){

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);
}

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>
</head>

January 14, 2009 at 6:17 AM


<body>
<table align=center>
<tr>
<td><font class=first size=12 color=black><i><b>Real Estate Company</b></i></font></tr>
</table>


<table align=right>
<tr>
<td><a href="sign in.html"><font size=4 color=black>sign in</font>
<td><a href="sign Up.html"><font size=4 color=black>sign up</font>
</tr>
</table><br><br>


<hr></hr>
<table align="center">
<tr>
<td><a class="first" href="home.html"><b><font size=4>Home</font></b></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<td><a class="first" href="AboutUs.html"><b><font size=4>AboutUs</font></b></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<td><a class="first" href="propertysearch.html">
<b><font size=4>PropertySearch</font></b></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<td><a class="first" href="Gallery.html"><b><font size=4>Gallery</font></b>
</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<td><a class="first" href="quicksearch.html"><b><font size=4>QuickSearch</font></b></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<td><a class="first" href="Link Your Property.html"><b><font size=4>Link Your Property</font></b></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<a class="first" href="contactus.html"><b><font size=5>ContactUs</font></b></a>
</table>

<hr></hr>

<marquee><font color="white" size=4><b>Data about shares/other realestate information...</b></font></marquee>

<hr></hr>
<center>
<form method="POST" action="" onsubmit="return validateForm(this);" name="radio_form">
<table border="0">
<tr><td>
<select name="request" >
<option value="0">AllProperties</option>
<option value="1">Rent</option>
<option value="2">Sale</option></select></td></tr>
<tr><td>
Category:
<input type="radio" name="radio_button" value="residence">Residence
<input type="radio" name="radio_button" value="commercial">Commercial
<input type="radio" name="radio_button" value="both">Both</td></tr>

<tr><td>PropertyType</td></tr>
<tr><td><input type="checkbox" name="property">Apartments</td>
<td><input type="checkbox">Resort</td>
<td><input type="checkbox">OfficeSpace</td>
<td><input type="checkbox">BeachHouses</td>
</tr>

<tr>
<td><input type="checkbox">Restaurents</td>
<td><input type="checkbox">Ulla</td>
<td><input type="checkbox">Castle</td>
<td><input type="checkbox">Duplex</td>
</tr>

<tr>
<tr><td><input type="checkbox">PreConstruction</td>
<td><input type="checkbox">Vineyard</td>
<td><input type="checkbox">CommercialComplex</td>
<td><input type="checkbox">Iglou</td></tr>

<tr>
<td><input type="checkbox">SingleFamilyHome</td>
<td><input type="checkbox">WareHouse</td>
<td><input type="checkbox">Business</td>
<td><input type="checkbox">Others</td></tr>

<tr>
<td><br/><b>Property Location<b></td>

</tr>

January 14, 2009 at 6:18 AM


<tr><td><select name="state">
<option value="0">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>
</option>
</select>

<td><select name="city">
<option value="0">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>
</table>
<table>
<tr><td><input type="submit" value="SEARCH" name="submit"></td>
<td><input type="reset" value="RESET">
</td></tr>
</table>
</form>
</body>
</html>
-----------------------------------
Visit for more information:
http://www.roseindia.net/javascript/
Thanks.
Amardeep









Related Pages:
please send me java script for html validation - Java Beginners
please send me java script for html validation  please send me code for javascript validation .........please send me its urgent a.first:link { color: green;text-decoration:none; } a.first:visited{color:green;text
please send me javascript validation code - Java Beginners
please send me javascript validation code  hallo sir , please send me java script code for this html page.since i want to do validation.i am a new user in java ....please send me its urgent
stuts java script validation is not working.
stuts java script validation is not working.  hello my stuts client side validation is not working. pls help me out i have put jsp file's code...-- Enter name: Enter pass: <html:submit/>
stuts java script validation is not working.
stuts java script validation is not working.  hello my stuts client side validation is not working. pls help me out i have put jsp file's code and validation.xml file's code. pls help --of jsp page-- > <html:form action
stuts java script validation is not working.
stuts java script validation is not working.  --of jsp page-- Enter name: Enter pass: <html:submit...; </form> </formset>   Please go through the following link
stuts java script validation is not working.
stuts java script validation is not working.  --of jsp page-- Enter name: Enter pass: <html:submit...; </form> </formset>   Please go through the following link
java script validation - Java Beginners
java script validation  how to do validations in j s p thru java..." with javascript validation : Contact Details .txt { font-size:12px; font...=document.screenForm.phone.value; if(document.screenForm.name.value=="") { alert("Please
send me javascript code - Java Beginners
send me javascript code  please send me code javascript validation code for this html page.pleaseeeeeeeee. a.first:link... after javascript validation : a.first:link { color: green;text
Please Send - Java Beginners
Please Send  Hi, this is perfect ur sending code I want java script coding Steps:-If user click on refresh button then page iage will be refresh Thanks  Hi friend, Thanks vineet
validation in java script
validation in java script  i have put this code for only entering integer value in text box however error occured...(){ if(document.form.num.value == ""){ alert("Please enter number
validation
validation  please help me to check validation for <form> <table class="form"> <tr> <td class...,datepickerfoloowupdescription leave empty please send me reply wating
please help me.
please help me.  Please send me the validation of this below link. the link is http://www.roseindia.net/answers/viewqa/JSP-Servlet/9584-JSP-Servlet-Search-and-Edit.html Thanks Trinath
struts validation
struts validation  I want to apply validation on my program.But i am failure to do that.I have followed all the rules for validation still I am unable to solve the problem. please kindly help me.. I describe my program below
struts validation
struts validation  I want to apply validation on my program.But i am failure to do that.I have followed all the rules for validation still I am unable to solve the problem. please kindly help me.. I describe my program below
please send me the answer - JDBC
please send me the answer -difference between DriverManager and DataDourse   what is Datasourse? What r the advantages? what is the difference between DriverManager and DataDourse
Time validation
box is in the correct format or not using java script. Please help me for doing...Time validation  Hi. I have a text box in html to get time...;html> <script language="JavaScript"> function check(timeStr) { var
Validation
me to save the email id and contact number (mobile number) in a database (MySQL). How do i perform a check using JAVA on the data before storing it in the database? PLEASE HELP!!!!!   import java.awt.*; import java.sql.*; import
validation
file its very usefull me,,, i am new no spring. userFormjsp <%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding
send me example of jmsmq - JMS
send me example of jmsmq  please send me example about jmsmq (java microsoft message queuing ) library
error please send me the solution
error please send me the solution  HTTP Status 500 - type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. exception
error please send me the solution
error please send me the solution  HTTP Status 500 - type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. exception
please help me.
please help me.  How to read a properties file in java with a suitable example. Please send me. Thanks Trinath   Please visit the following link: Java read properties file
pls send me the code for login and register - Java Beginners
pls send me the code for login and register  pls immediately send me the jsp code for login and registration with validation with java bean in mysql.... This link will help you. Please visit for more information. http
send HTML Email with jsp and servlet
send HTML Email with jsp and servlet  Can You please show me how to send html Email using JSP and Servlet thank you
html
html   HTML document with Javascript to count the number of vowels in a text typed in text area. please send the code.   Hi Ravi Here is the code ..I hope this will solve your problems : <!DOCTYPE HTML PUBLIC
validation - Java Beginners
5.lastname 6.date of birth. plz send me the code above mention required fields... JavaScript validation file 'validation.js': function emailcheck(str... || month<1 || month>12){ alert("Please enter a valid month") return false
please send me the banking data base in swings
please send me the banking data base in swings  sir, please send me how to create the banking data base program in swings
Unable to send mail using php script
anyone please tell me where am i going wrong..i am new to php. thank you...Unable to send mail using php script  Hello i am trying to send mail using mail function.But the message is never sent. I have installed a free smtp
Help me please!!! - Java Beginners
Help me please!!!  im badly needing the complete code for this project in java!!! can you please help me???!!! it is about 1-dimensional array... the answers 8Hours from now!!! Kindly help me!! please!!please!!! NOTE
sir, how to convert excel file to csv file using java? please send me sample code.
sir, how to convert excel file to csv file using java? please send me sample code.  please send me sample code for converting excel file into csv file uisng java
java script
java script  Hi, Any one please tell me how, to store below elements in an array using java script 12,13,14,a,b,xyz
java script - Ajax
java script  I have a java script function and getting "pitems" list values in select, and i want to send the values in the form of List to my...; } Can u plz help me out???  Hi Friend, Please clarify
java script - Ajax
java script  i know basic of java script. i want to gain more knowledge in java script. please send a link or guidelines to me. and ajax also my mail address is mishra.sibaprasad@gmail.com  Hi friend, Javascript
java script - JSP-Servlet
java script  what is the use of hidden fields in java script... get enabled. please give me a solution.   Hi Saranya, Please... problem then send me source code and explain in detail
Validation code - Java Interview Questions
Validation code  Hi, Anyone can please send me a javascript function... ************* Java Script Calender Date Picker function isNumberKey(value... **************** Java Script Calender Date Picker function isNumberKey
Send me Binary Search - Java Beginners
Send me Binary Search  how to use Binary think in java give me...(System.in)); System.out.println("Please enter number!"); int SIZE...)); } } ----------------------------------------- Read for more information. http://www.roseindia.net/java/ Thanks
problem in java script - Java Server Faces Questions
problem in java script  hi deepak i want to apply validation on email field of form nd i make this prog. but this is not working plz send me..."); } } email   Hi, Email validation in JavaScript
java script and velidatores - Security
java script and velidatores  i made a job portal and in it many fields which required validate how i do throw java script.. can you help me please send me common validate function which used in any site.....   Hi
i want to create website,with manu with three level submenu on top side of page please send me code java
i want to create website,with manu with three level submenu on top side of page please send me code java   iam createing wibsite thats using eclipse andtomcat server,please help me to write menu with three level submenu
java script validation - Java Beginners
java script validation  hi, i have two radio buttons yea and no. all text fiels r deactivated, when i click no radio button. its get active... Button Validation function callEvent1
validation
file.if user not upload should send error(i created folder when user upload file... madu dil, Can you please add code.Ok if you use struts then you can use Validation method valid the in put. otherwise call the javascript onsubmit to check
Form Validation
Form Validation  Java script validation for checking special characters and white spaces and give an alert.Please help me urgent Thanks in advance
Validation
Validation  1)where sohould we place struts.xml 2)where should we place validation.xml fies 3)Which is the main controller that acts as a servlet:please brief me about the different controller in S2
HTML
where i can store in the database SEND ME THE CODE FOR THIS IN JAVA AND HTML
how to send email please give me details with code in jsp,servlet
how to send email please give me details with code in jsp,servlet  how to send email please give me details with code in jsp,servlet
please send code - Java Beginners
please send code  hai friends plese provide code for fallowing program(CORE JAVA) i am taking string from commandprompt like 'AC2E4T45hj789' now... number it should be taken as single number) URGENTLY send the code
Please help me... its very urgent
Please help me... its very urgent  Please send me a java code to check whether INNODB is installed in mysql... If it is there, then we need to calculate the number of disks used by mysql
Html
Its Executing But On CLicking The Button Nothing Happens Please Help Me With Both...:48:44 PM Author : SAMSUNG --%> <%@page contentType="text/html" pageEncoding="UTF-8"%> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01
Html
Its Executing But On CLicking The Button Nothing Happens Please Help Me With Both...:48:44 PM Author : SAMSUNG --%> <%@page contentType="text/html" pageEncoding="UTF-8"%> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01
urgent...pleAse help me.....please!
urgent...pleAse help me.....please!  please help me urgent! how can i do dictionary with the use of array code in java, where i will type the word then the corresponding meaning for that word will appear...thanks

Ask Questions?

If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.

Ask your questions, our development team will try to give answers to your questions.