2011-04-14 66 views
0

只是想知道什麼問題可能是爲什麼我無法訪問prod端的jquery ui自動完成文件夾。爲什麼jquery ui自動完成文件夾無法訪問

我一直在開發中使用這個小部件,它完美的工作。然而,當我部署它,我得到的錯誤說,jquery.ui.core.js,jquery.ui.widget.js,jquery.ui.position.js,jquery.ui.all.css和jquery.ui.autocomplete .js找不到:「找不到404對象」。

這是我引用這些文件:

<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.5.2/jquery.min.js"></script> 
<script type="text/javascript" src="/folder1/folder2/jquery-ui-1.8.10.custom/development-bundle/ui/jquery.ui.core.js"></script> 
<script type="text/javascript" src="/folder1/folder2/jquery-ui-1.8.10.custom/development-bundle/ui/jquery.ui.widget.js"></script> 
<script type="text/javascript" src="/folder1/folder2/jquery-ui-1.8.10.custom/development-bundle/ui/jquery.ui.position.js"></script> 
<script type="text/javascript" src="/folder1/folder2/jquery-ui-1.8.10.custom/development-bundle/ui/jquery.ui.autocomplete.js"></script> 

<link rel="stylesheet" href="/folder1/folder2/jquery-ui-1.8.10.custom/development-bundle/themes/base/jquery.ui.all.css"> 

用Firebug,這些分別是響應和請求頭:

HTTP/1.1 404 Object Not Found 
Server: Microsoft-IIS/5.0 
Date: Thu, 14 Apr 2011 08:22:27 GMT 
Connection: close 
Content-Length: 4040 
Content-Type: text/html 

GET /folder1/folder2/jquery-ui-1.8.10.custom/development-bundle/ui/jquery.ui.core.js HTTP/1.1 
Host: (hostname) 
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.9.2.16) Gecko/20110319 Firefox/3.6.16 
Accept: */* 
Accept-Language: en-us,en;q=0.5 
Accept-Encoding: gzip,deflate 
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7 
Keep-Alive: 115 
Connection: keep-alive 
Referer: (referrer) 
Cookie: (cookies) 

我使用ColdFusion MX 6.1。是否存在許可或託管問題?我在這裏沒有任何想法。請幫忙。謝謝。

回答

0

我得到了這個工作,最後。我做的是我得到了jquery-ui-1.8.10.custom文件夾以外的所有文件夾。也就是說,我現在沒有/folder1/folder2/jquery-ui-1.8.10.custom/development-bundle/ui/jquery.ui.core.js,而不是/ folder1/folder2/development-bundle/ui/jquery。 ui.core.js.

我仍然不明白爲什麼無法找到文件夾名稱jquery-ui-1.8.10.custom。如果有人知道爲什麼請告訴我。謝謝!

0

當您在src地址之前使用「/」時,實際上是在告訴「folder1」位於您的web服務器的根文件夾中(即Apache中的WWW) 因此,如果「folder1」只是一個文件夾位於與您的代碼文件相同的路徑中,您應該使用:

src="folder1/folder2/jquery-ui-1.8.10.custom/development-bundle/ui/jquery.ui.core.js" 
+0

其實這是我的絕對路徑。 folder1位於根文件夾中。所以這真的很奇怪。我什至嘗試把jquery-ui-1.8.10.custom下的HTML文件,仍然沒有找到! :( – danielle 2011-04-15 01:43:59