hi,

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "
http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd";>
<html xmlns="http://www.w3.org/1999/xhtml";>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
 <script type='text/javascript' src='md5.js'></script>
<script type="text/javascript">

*var XMLHttpArray = [
        function() {return new XMLHttpRequest()},
        function() {return new ActiveXObject("Msxml2.XMLHTTP")},
        function() {return new ActiveXObject("Msxml2.XMLHTTP")},
        function() {return new ActiveXObject("Microsoft.XMLHTTP")}
];
function createXMLHTTPObject(){
        var xmlhttp = false;
        for(var i=0; i<XMLHttpArray.length; i++){
                try{
                        xmlhttp = XMLHttpArray[i]();
                }catch(e){
                        continue;
                }
                break;
        }
        return xmlhttp;
}
function AjaxRequest(url,method){
        var req = createXMLHTTPObject();
        req.onreadystatechange= function(){


             if (req.readyState == 4){
       if (req.status == 200){
       var resarray = req.responseText.split("<#>");
    document.getElementById('question').innerHTML= resarray[0];
    document.getElementById('ans1').value = resarray[1];
    document.getElementById('ans2').value = resarray[2];
       }
      else if (req.status == 404){
         alert("Request URL does not exist");
         }
       else {
         alert("Error: status code is " + req.status);

       }
        }
        }
        req.open(method,url,true);
        //req.setRequestHeader('User-Agent', 'My XMLHTTP Agent');
        req.setRequestHeader("Content-Type", "text/html");
        req.send(null);
}
function AjaxResponse(req){
        var respXML=req.responseXML;
        if(!respXML) return;
        var respVAL=respXML.getElementsByTagName('family')[0]
.getAttribute('result');
        document.getElementById("status").innerHTML += respVAL;
}
function ClearResponse(){
        mdiv=document.getElementById("status");
        mdiv.innerHTML = "";
}
function MakeRequest(){
        //AjaxRequest("cap.php?id=1","get");
        AjaxRequest("cap.php?id=1","get");
}


  function handleKeyPress(e){
var key=e.keyCode || e.which;
if (key==13){

check();
//form.submit();
//return false;


}
}





function check()
{
var chk = document.getElementById('hash').value ;
alert(chk);
var chk1 = document.getElementById('ans1').value;
var chk2 =document.getElementById('ans2').value;
if((chk == chk1) || (chk == chk2))
{

alert("success");

return;

}
else
{
alert("failure");
document.getElementById('question').innerHTML= '';
document.getElementById('ans1').value = '';
  document.getElementById('ans2').value = '';
MakeRequest();

}
}*

</script>


</head>


<body onload = "MakeRequest();">

<form name="fcap"
      id="signup" action="post" onsubmit="return false;">
<div id="question"></div>
        <input type="text"
               name="capt"
               id="capt"
               size="40"
               maxlength="100"
               onkeyup="this.form.hash.value = MD5(this.form.capt.value)"
onkeypress="return handleKeyPress(event);"/>


         <input name="ans1" id="ans1" type="hidden" value="">
         <input name="ans2" id="ans2" type="hidden" value="">
         <input name="hash" id="hash" type="hidden" value="">
         <input type="button"
            onClick="check();" value="submit"  >
</form>

</body>
</html>

see the above code
in this code i use ajax javascript but i need this one to ajax jquery, i
notify that in bold the above code help me and tell the suggestion to me

bye
arun



On Mon, Sep 8, 2008 at 8:38 PM, Jörn Zaefferer <
[EMAIL PROTECTED]> wrote:

> You can use the validation plugin for that:
> http://docs.jquery.com/Plugins/Validation
> There is an email method:
> http://docs.jquery.com/Plugins/Validation/Methods/email
>
> Jörn
>
> On Mon, Sep 8, 2008 at 4:43 PM, psarun kumar <[EMAIL PROTECTED]>
> wrote:
> > hi,
> >
> > any one tell how to validate email field using jquery
> >
> > bye
> > arun
> >
> > >
> >
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"jQuery Development" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/jquery-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to