Hi ,
i am working on cakephp. I have developed an application where i have used localhost in all ajax post and get..
like
var ht = $.ajax({
type: "GET",
url: "http://localhost/FormBuilder/index.php/forms/getInvitees/<?php echo $emailid;?>",
async: false
}).responseText;
var myObject = eval('(' + ht + ')');
this thing works only when i put localhost . But when i change that to my Ip like
http://111.11.11.11/FormBuilder/index.php/forms/getInvitees/",
then i am getting a syntax error () in the line
var myObject = eval('(' + ht + ')');
WHy it happens ?? Please give valuable suggestions in solving this..
The response for ht will be {"invitees":[{"invitee":"23"}]} from which i will generate a link by
var data = myObject;
$.map(data.invitees, function(i){
var id=i.invitee;
$("<a href=<?php echo $link?>/"+id+"/Invitee> <?php echo $link?>/"+id+"/Invitee</a>").appendTo("#"+inc);
inc++;
return i.invitee;});
Thank you