Hello and welcome to our community! Is this your first visit?
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Sep 2011
    Thanked 0 Times in 0 Posts

    Test if the fields will be completed submit will visible


    months when I want all the fields will be filled

    submit will be visible on all but I just do what has not n'arive test

    Note b: there is already invisible submit send # I hope the idea is clear Maintenon.

    here is my code jQuery:
    $(document).ready(function() {
    			//------------------ validation champ email par blur -------------
    					$("#email,#objet,#message").blur(function() {
    					var filter = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
    					if ($("#email").val() !== "E-mail" && $("#email").val() !== "" && $("#email").val().match(filter) 
    					&& $("#objet").val() !== "" && $("#objet").val() !== "Objet" 
    					&& $("#message").val()!== "" && $("#message").val()!== "Votre message") {
    					alert('les champs valid');
    					return true;
    					else {
    					alert('les champs not valid');
    					return false;
    			//--------------- animation de champ message -----------------
    					height: "50px"
    					}, 1000 );
    here is the html code:
    <input id="email" type="text" value="E-mail" onFocus="if (this.value=='E-mail') {this.value=''}"/> <div class="cl"></div> <input id="objet" type="text" value="Objet" onFocus="if (this.value=='Objet') {this.value=''}"/> <div class="cl"></div> <textarea id="message" type="text" value="Votre message" onFocus="if(this.value=='Votre message') {this.value=''}">Votre message</textarea> <div class="cl"></div> <input id="envoyer" type="submit" value="Envoyer"/>
    Last edited by saibri; 09-19-2011 at 05:59 PM.

  2. #2
    New to the CF scene
    Join Date
    Sep 2011
    Thanked 1 Time in 1 Post
    your text does not make sense to me. I think if you took the time to review what you typed before submitting your message, you could correct the many typos in your message.

    For example: "I just do what has not n'arive test"... what in the world does that mean??


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts