dimanche 1 février 2015

Simple Jquery Validation and sending valid DATA to other jsp


Vote count:

0







  1. I want to Validate this thing and Send this value to other JSP page ..




  2. I am new to this concept ..I need you to help by " CORRECTING this Form " and suggest me after CORRECTION .. how can i able to send value to other page ...




3.here :- only one field should Enter .. incase of two fileds or 2_fields.NULL() show a warning ..[ i did with a some thing wrong




<script>
$(document).ready(function(event) {
<!-- Real-time Validation -->

var is_name=$('#contact_name').val();

var is_number=$('#contact_number').val();

$("#contact_submit button").click(function() {
if(($('#contact_number').val().length !=0) && ($('#contact_name').val().length !=0)) {

$("#nosearch").hide();
$("#search").hide();
$("#wrong").show();
}

else if (($('#contact_number').val().length ==0) && ($('#contact_number').val().length ==0) ) {

$("#nosearch").show();
$("#search").hide();
$("#wrong").hide();
}
else {
$("#nosearch").hide();
$("#search").show();
$("#wrong").hide();

I know some action type of thing should happen here .. i don't know what it would be .. help me ...
}
});
$("#nosearch").show();
$("#search").hide();
$("#wrong").hide();
});
</script>



<form id="contact" method="post" action=" **i don't know how to send a value to other page** ">
<div>
<label for="contact_name">Number:</label>
<input type="text" id="contact_number" size="15" name="number"></input>
</div>

<div>
<label for="contact_email">Name:</label>
<input type="text" id="contact_name" size="25" name="name"></input>
</div>

<div id="contact_submit">
<button type="submit">Submit</button>
</div>
<h4 id="wrong"> Only use one coloum ...<h4>
<h4 id="nosearch"> Enter any Information <h4>
<h4 id="search"> Result about :- .... <h4>
</form>



My fiddle link :-




asked 2 mins ago

hari

18






Simple Jquery Validation and sending valid DATA to other jsp

Aucun commentaire:

Enregistrer un commentaire