Click here to Skip to main content
15,921,959 members
Please Sign up or sign in to vote.
3.50/5 (2 votes)
Hi guys... i was wondering if you can help me with my problem... i have a jquery code that request for a certain page using ajax... now its working on firefox and other browser except IE... i keep on getting this error "Expected identifier, string or number"... i dont know whats the problem with this... it keeps on pointing to this line of code

$("#add_ads").click(function(){
	var urls= "../includes/add_ads.php";
	var request= "POST";
	$.ajax({
	  type: request + "",
	  url: urls + "",					
	  dataType: "html",
	  data: {
	    "page": $("#page_name").val() + "",
		   "action": "new"
		},
								
	  success: function(response){				    
             $.facebox(response);		
	  }
        });
      return false;
    });


i dont know where is the problem in my code i already tried the
type: request + "",
to
type: "POST",
and the
url: urls + "",
to
url: "../includes/add_ads.php",
i really dont know how to solve this now.. please help guys
Posted
Comments
Sergey Alexandrovich Kryukov 6-Feb-12 20:29pm    
IE behavior is may be weird, but did you run it under JavaScript debugger? In what line do you see a problem?
--SA
ZurdoDev 7-Feb-12 10:21am    
You likely need quotes around $("#page_name").val()

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900