views:

24

answers:

1

Hi ,

http://stackoverflow.com/questions/2204247/how-is-this-jquery-app-validating-the-username-3rd-party-script

Iam using the same third party script for form validation that was mentioned in the above question .Now we have file in the third party script known as jquery.validationEngine-en.js .so i have a field in my html known as

<input type="text"  id ="test1"  value ="" class ="ajax[optional,ajaxcode]">

in the jquery.validationEngine-en.js we have defined in this way

   "ajaxcode":{  
        "file":"get_custcode.php?citycode=",
        "alertText":"code is already taken",
        "alertTextOk":"", 
        "alertTextLoad":"* Checking..."
   },

So my problem is How do i pass the citycode (parameter ) with some dynamic value(PHP) which is very much mandatory at the server side script (PHP)inorder to make sure that custcode dowsnot exist in that city. But iam Unable to pass the city code. here are the various things i have tried for passing the value

 "file":"get_custcode.php?citycode="+<? echo $_REQUEST['citycde']?>,

   "file":"get_custcode.php?citycode=<? echo $_REQUEST['citycde']?>",
+1  A: 

How about placing the value of the city inside a hidden form and let jQuery get the value out of it for the validation:

HTML

<input type="hidde" id="cityCode" value='<? echo $_REQUEST['citycde']?>' />

Js script

"file" : "get_custcode.php?citycode="+$("#cityCode").val()
xar
@XAR:Really Awesome
Someone