ajax script not work on a site

提示: 作者被禁止或刪除 內容自動屏蔽

Note! Ajax scripts must be executed over http and not the file system. I.e. from address starting with http://... and not C:\...

試下打full url
始終cilent side script唔可以用relative path

TOP

提示: 作者被禁止或刪除 內容自動屏蔽

TOP

原帖由 adrianmak 於 2008-11-5 09:58 發表


你可能沒有看清楚,我話放在對方台win2003 server 行IIS 時,這個ajax 就沒有生效.
當然也是用http://client.domain.com/xxxxxxx/xxxx.html 來瀏覽


ajax_loadContent('contentmain','http://xxxxxxxx/xxxxx/page1.html');

TOP

提示: 作者被禁止或刪除 內容自動屏蔽

TOP

經 Ajax load 既野, 為求最佳兼容性, Content-Type 最好用 text/plain, encoding 最好用 utf-8 (唔可以寫 utf8, 如果唔係 IE 會出 error)

TOP

原帖由 adrianmak 於 2008-11-5 10:38 發表


以我認識,應該不需要給full domain path i.e http://xxxxxx/xxxxx/

應該只需要給文件名,web server 就自己會handle 在current web root document folder 打開這個文件

sor.....真係睇錯左  you are right
不太肯定這script是否正確
同埋你有無轉過browser?
試下用firefox開,睇下有無error

[ 本帖最後由 梁炳 於 2008-11-6 00:27 編輯 ]

TOP

提示: 作者被禁止或刪除 內容自動屏蔽

TOP

在對方的IIS 時用 firebug trace 下,
睇下o個行 statement 有冇行到
再睇下有冇 request 去 server
同時間睇下有冇 error/ exception 出

[ 本帖最後由 chiefumpire 於 2008-11-6 08:40 編輯 ]

TOP