简体   繁体   English

托管网站时 javascript 不工作

[英]javascript not working when the site is hosted

I have a search page at http://www.excoflare.com/dev2011/socialnetwork?menu=biz_people_search where I have an advanced search option.我在http://www.excoflare.com/dev2011/socialnetwork?menu=biz_people_search有一个搜索页面,其中有一个高级搜索选项。

When the user clicks in it it will show up city and country options.当用户点击它时,它将显示城市和国家选项。 But it doesn't work (please go to the link) though it was working fine in localhost.但它不起作用(请 go 到链接)虽然它在 localhost 中工作正常。 And I think path settings are OK since the CSS is working fine.而且我认为路径设置没问题,因为 CSS 工作正常。

It's not the path, you have an extra space after the ?这不是路径,你在?之后有一个额外的空间when you're requesting the file.当您请求文件时。 The server is looking for服务器正在寻找

http://www.excoflare.com/dev2011/socialnetwork/index.php%20?menu=createOptions&ajax=ajax
----------------------------------------------------------^

Fixing that should solve your problem.解决这个问题应该可以解决您的问题。

var url = "index.php ?menu=attach_file_2&ajax=ajax"; 

remove extra space here在此处删除多余的空间

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 javascript工作在本地主机,但不能托管? - javascript working in localhost but not when hosted? javascript / jquery,CSS在IIS托管站点上无法正常工作 - javascript/jquery, CSS not working properly on IIS hosted site jQuery Autocomplete在托管站点上不起作用 - jQuery Autocomplete Not Working on Hosted Site JavaScript代码在我的网站上不起作用 - Javascript Code not working when on my site 托管时视差不起作用 - Parallax not working when hosted 使用javascript解析IIS托管站点的URL - parsing url for IIS hosted site using javascript 包含在远程站点上的Java文件所在的服务器上的文件是否可以发出AJAX请求? - Can an AJAX request be made to a file residing on the server a Javascript file is hosted on when included on a remote site? 对第三方网站的JavaScript / jQuery引用在本地运行,而不是在godaddy运行站点上托管时出现(404错误) - JavaScript/jQuery reference to a third party website works locally, not when hosted on godaddy run site (404 error) 字符串索引器在本地工作,但在托管站点时不起作用 - string indexer works localy but not when site is hosted iPhone 在本地加载时不允许 HTML 页面中的 Javascript 或 Jquery 功能(从托管站点加载时工作正常) - iPhone does not allow Javascript or Jquery functionality in an HTML page when loaded in Locally (works fine when loaded from hosted site)
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM