i tried like
emailInfo.html(data);
It print fine ,
When i out into condition, there i facing Problem ,
like
for example
var test = emailInfo.html(data);
if(test == 'ACCT'){
emailInfo.html(test);
}else{
emailInfo.html("Somthing bla lbla ");
}
On Wed, Jun 3, 2009 at 4:54 PM, ryan.j <ryan.joyce.uk@googlemail.com> wrote:
it's not working because the value of data isn't "ACCT" or "ACAT".
is the response actually returning anything to data? add ...
alert( "data = " + data);
to your success case.
On Jun 3, 12:03 pm, bharani kumar <bharanikumariyer...@gmail.com>
wrote:
> $(document).ready(function(){
> $("#txt_airport_code").keyup(function () {
> //var getValue = $("#txtUser").attr("value");
>
> var emailInfo = $("#msg1");
> var airport_code = "airport_code";
> $.ajax({
> type: "POST",
> data:
> "str="+$("#txt_airport_code").attr("value")+"&code="+airport_code,
> url: "check.php",
> beforeSend: function(){
> emailInfo.html("Checking Email...");
> },
> success: function(data){
> if(data == "ACAT"){
> emailInfo.html("ACAT Already Exist");
> }else if(data == "ACCT"){
> emailInfo.html("ACCT Already Exist");
>
> }else{
> emailInfo.html("Available");
> }
> }
> });
> });
> });
>
> Hi All ,
>
> This my snippet ,
>
> am doing the already exist functionality ,
>
> The above snippet is working fine ,
>
> but the problem is ,,
>
> Always the condition goes to the Available , am not able to mark out my
> Error spot,
>
> Can u tell me , where i made the mistake ,
>
> Thanks advance
--
Regards
B.S.Bharanikumar
http://php-mysql-jquery.blogspot.com/
No comments:
Post a Comment