PDA

View Full Version : why setURL keeps loading (but never loads) a local file...



faisalv
13 May 2007, 6:59 AM
Hi Dear Ext gurus and dilettantes,
before I invoke your wrath prematurely, I would like to mention that I have searched the forum for this topic - and while setURL has been mentioned vis a vis executing scripts and avoiding "CSS bleeds" (i.e. styles loaded from the new page - at the specified url - contaminate the display of the original html) using the iframe technique, I did not come across any information as to why my local file (which i know the XHR object is finding since it does not throw an exception - as i have noted in firebug if i misspell the name of the document) would not load.
I know I can fix the problem with an iframe - but I am new to AJAX and Ext (which is an inspiring piece of software ;-) and am curious as to why this approach is not working for me.

Here are the relevant fragments:

centerPanel.setUrl('./index.html')
centerPanel.refresh();

index.html ==> <html><head><title>Test Title</title></head><body>TestBody</body></html>


oh and by the way the entire application is being developed locally so it's not like XHR has to request the document from another 'server'.
thanks in advance,
Faisal Vali

Animal
13 May 2007, 10:52 AM
XHR only gets using HTTP. It cannot access the local file system.

faisalv
13 May 2007, 1:20 PM
thanks - i installed instantrails and fed it through apache and it worked :-)