i just can't figure out this one. this is the web page file: http://lookaroundyou.net/test.php click on button and nothing happens.
i use same files on my localhost computer and alert pop ups? why? please
accessing ajax.js directly gives me forbidden message so i suppose it has something to do with permiss开发者_如何转开发ions? how to alte this?
many thanks
The problem is permissions here, when trying to load your ajax.js
file I'm getting a 403-Forbidden, so the script never loads for my browser...which is what's causing the error.
Your page is at the root of the domain, so this doesn't make much sense:
<script type="text/javascript" language="javascript" src="../ajax.js">
...that ../
shouldn't be there (it would be beneath the root of the site), make sure your path to ajax.js
is correct.
Failed to load source for: http://lookaroundyou.net/ajax.js
Apparently, loading http://lookaroundyou.net/ajax.js isn't allowed on your server.
Maybe, it's in the wrong place since you're trying to load it via "../ajax.js
" which means in the folder before your web folder, or totally absent.
http://lookaroundyou.net/ajax.js gives a 403 Forbidden HTTP status and the JavaScript file is not included. Check your server settings and/or .htaccess files.
Also why include ../ajax.js
if you're already at the top level? It should be just ajax.js
. But note that this is not the reason your script doesn't work because the browser is smart enough to look in the right place even with those extra ..
.
精彩评论