PDA

View Full Version : All ext pages causing js errors when not called locally.



malkishua
20 Apr 2007, 1:43 PM
Hi folks,
I just installed ext toady and tried to use it for the first time.
im getting a JS "error object doesn't support this property or method" error on every page i try to load through the web browser (IE7). using: "http://sever/ext/"

funny thing is if i run the fine form the local path instead evrything seems to work ok.
ayone have any ideawhat the problem is?
Thanks,
Rob.

brian.moeskau
20 Apr 2007, 2:46 PM
Almost certainly means that the paths to your script files is not correct, esp. if they work locally. Have you double-checked your virtual paths on the server?

malkishua
20 Apr 2007, 2:51 PM
Hey, form what i could see all the paths in the examples are relative.
i just added an alias to the ext basepath for apache

thought i would add some info:
the pages that dont work for me are all the examples / docs that came in the ext package.

my setup is a wamp package for windows running apache.
root www path is "d:\dir1\dir2" ext was unpacked in "d:\dir1\dir2\ext"
loading examples in browser through "d:\dir1\dir2\ext" will work fine however loading them
through "http://myhsot/ext" fails.


Thanks,
Rob.

brian.moeskau
20 Apr 2007, 7:37 PM
Yes, paths in the examples are relative, but I'm not sure what your code looks like so I thought I'd ask. You must have something configured wrong on the web server, but I'm not sure what. You might try taking the path from each script include on your page and putting it directly into the browser (e.g., does this work: "http://myhost/ext/adapter/yui/yui-utilities.js"). If you have verified all paths to be correct, and the page works locally, then I'm not sure what to tell you without seeing your setup.

malkishua
20 Apr 2007, 7:46 PM
Thanks again,
My point was it not my code :) im trying to load examples form the extjs package like the "hello.html", and they throw a java script error when loaded form the browser.

maybe im missig something here because i dont tink the problem is with the extjs, what i do know is its working trough noraml paths and not throguht the http://.

though i have more than one web page running on this machine and the other ones dont give out any js errors. is there something else erquired to work with extjs on the server? (besides things like apache, php.....).

Thanks,
Rob.

brian.moeskau
20 Apr 2007, 7:58 PM
Did you verify the scripts like I mentioned? HelloWorld.htm would run in the following path by default:


http://yourserver/ext/examples/dialog/hello.html

The script tag paths look like:


<script type="text/javascript" src="../../adapter/yui/yui-utilities.js"></script>

Which means you should be able to type this into your browser and it should display the script file:


http://yourserver/ext/adapter/yui/yui-utilities.js

Have you verified that those paths are accessible on your server via http?

malkishua
20 Apr 2007, 8:10 PM
Did you verify the scripts like I mentioned? HelloWorld.htm would run in the following path by default:


http://yourserver/ext/examples/dialog/hello.html



this way it seems to load the js files but then gives js error in IE7.




The script tag paths look like:


<script type="text/javascript" src="../../adapter/yui/yui-utilities.js"></script>

exactly, havent changed a single line in the files that were in the package.

Which means you should be able to type this into your browser and it should display the script file:




http://yourserver/ext/adapter/yui/yui-utilities.js

Have you verified that those paths are accessible on your server via http?
[/QUOTE]

yes, file is accessable, option to run it though also yields js errors but thats to be expected no?

Thanks,
Rob.

brian.moeskau
21 Apr 2007, 12:13 AM
Working with Rob, we saw that the web server (Apache) appears to be corrupting the script file (ext-all.js primarily) by cutting it off at around 64kb, then starting the file again within the same stream so that the file ends up being 4 or 5 partial copies of ext-all.js when parsed by the browser. Also happens through http://localhost, but Rob verified that the local copy of the file was valid. As each chunk is right around 64kb, it seems like a possible config setting somewhere that is incorrect, but I have no clue where to look. Anyone else heard of something like this or have any ideas of something to look at?