在FF中工作但不在chrome中工作(Works in FF but not in chrome)
这与Codeignitor,Ajax和Jquery有关
以下代码在Firefox和chrome中工作正常我需要在url中进行更改
像url:create(这是针对Firefox)就像url:users / create(这适用于Chrome,但在Firefox中不起作用)
请注意我是codeignitor的新手,所以不知道我是否犯了错误
项目正在CodeIgniter中开发
$.ajax({ type: "POST", url: "create", data: "full_name="+full_name, success: function(returned_html){ //Do Something here }, error: function (XMLHttpRequest, textStatus, errorThrown){ alert("Error with ajax Function: "+ textStatus+" "+errorThrown); } });This is related with Codeignitor, Ajax and Jquery
Following code works fine in Firefox and for chrome I need to make change in url
like url: create (This is for Firefox) like url: users/create (This is for Chrome and it doesn't work in Firefox)
Please note that I am new to codeignitor so don't know if I made a mistake there
Project is being developed in CodeIgniter
$.ajax({ type: "POST", url: "create", data: "full_name="+full_name, success: function(returned_html){ //Do Something here }, error: function (XMLHttpRequest, textStatus, errorThrown){ alert("Error with ajax Function: "+ textStatus+" "+errorThrown); } });最满意答案
您可以使用非相对网址,因为我认为Firefox和Chrome没有相同的基本路径。
url : 'http://.../create'You can use a non-relative url because I think Firefox and Chrome does not have the same base path.
url : 'http://.../create'更多推荐
发布评论