Jump to content

shankar23

Members
  • Posts

    22
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

shankar23's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. in onBlur function you shall write the code.. <input type="text" onBlur="call some function to validate"> thanks, Shang..
  2. Hi, do you want to validate all the seperately field?? (or) want to validate all the fields in single click?? thanks, Shang..
  3. Hi Michan, I did not get you?? Could you be much more clear with your issue?? thanks, Shang..
  4. Hi, you need to show any one of the value while page is load right? For eg:- If yes is selected in your radio button it shoulkd show like this correct?? Yes [clicked] No [Not clicked] Text 1. correct????????? thanks, Shang..
  5. Yes you are correct you need to set asynchronous property while you using Ajax GET or POST.
  6. hi make change your index.php should be like this: XMLHttpRequestObject.open("GET", dataSource,false); and not like this : XMLHttpRequestObject.open("GET", dataSource); thanks, Shang..
  7. Have you updated value into database??
  8. in Ajax only xmlHttp is main part... It will be used everywhere if Ajax exists... So just learn how to pass variable to PHP or any scripting languages... It will be usefull for you in future..
  9. In php script page save as "ajaxError.php" use this alone a <?php $email =$_GET["email"]; if($email) { if (!eregi("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$", $email)) { echo "<p align=center><font face='Verdana' size='1' color=red> <b>^</b> Re-enter the Email address in the proper format (username@domain.com). </font></p>"; } } ?> in Html page use this.. <input type="text" onblur="return validateEmail(this.value)"> <div id="emailError"></div> in javaScript use this.... function validateEmail(str) { var xmlHttp; xmlHttp=getXml(); if(xmlHttp==null) { alert("Your Browser Won't support Ajax "); return; } function Ready() { if(xmlHttp.readyState == 4) { document.getElementById("emailError").innerHTML=xmlHttp.responseText; } } var url ="ajaxError.php"; url = url + "?email="+str; xmlHttp.onreadystatechange= Ready xmlHttp.open("GET",url,true); xmlHttp.send(null); } function getXml() { var xmlHttp = null; try { xmlHttp=new XMLHttpRequest(); } catch(e) { try { xmlHttp = new ActiveXObject("Msxml2.XMLHTTP"); } catch(e) { xmlHttp = new ActiveXObject("Microsoft.XMLHTTP"); } } return xmlHttp;s } thanks Shang..
  10. try this........ function ajax() { var xmlhttp; try { xmlhttp=new XMLHttpRequest(); } catch (e) { try { xmlhttp=new ActiveXObject('Msxml2.XMLHTTP'); } catch (e) { try { xmlhttp=new ActiveXObject('Microsoft.XMLHTTP'); } catch (e) { alert('No AJAX support!'); return false; } } } return xmlhttp; } var http = ajax(); var url ='index.php'; var params = 'mode=rot13&string=test'; function handler() { if (http.readystate==4 && http.status==200) { document.form.string.value = http.responseText; } } function post() { http.open('POST', 'index.php', true); http.setRequestHeader('Content-type', 'application/x-www-form-urlencoded'); http.setRequestHeader('Content-length', params.length); http.setRequestHeader('Connection', 'close'); http.onreadystatechange = handler; http.send(params); }
  11. Hi good try.. As per i know you shall use Iframe layer.. thanks Shang..
  12. Hi You need to call all the function into button on click.. Using this you can do it.. For ex: You use for email blank field validation in onblur like this onBlur="return validate_email();".. you should use in button onclick="return validate()".. <script> function validate() { ............... . ..... . . . . .............. validate_email(); ..... . . . . ................. } </script> you can do like this.... thanks Shang..
  13. Hi Have you used both name and id (Html entities) while designing html form??? Because at some times this also make IE not respond properly... So check out this..And try again.. thanks Shang..
  14. Hey you !! Check out this in your program mysql_query().. you given like this mysql_query(query);.. thats wrong...! change like this mysql_query($query).. it works...
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.