I inherited a customer after their programmer passed away. They have 4 commercial sites running what I believe is Adobe Go Live code from what I’ve found on Google.
程序员去世后我继承了一位客户。他们有4个商业网站运行我认为是我在Google上发现的Adobe Go Live代码。
This works perfectly as long as all .asp scripts and the images directory is off the web’s root directory. I needed to move the ‘store’ scripts under a ‘store’ sub directory. When I run the default page that is in the root directory the buttons appear with icons in them. When I click one of the buttons for a page where the asp lives under the ‘store’ directory, none of the buttons have images in them anymore. I know Nothing about Javascript. I’m sure for someone who know it this is a quick dumb fix. Any help would be appreciated.
只要所有.asp脚本和images目录都不在Web的根目录下,这就可以正常工作。我需要将'store'脚本移到'store'子目录下。当我运行根目录中的默认页面时,按钮会显示图标。当我单击其中一个按钮的某个页面,其中asp位于“store”目录下时,没有任何按钮在其中有图像。我对Javascript一无所知。我敢肯定有人知道这是一个快速的愚蠢修复。任何帮助,将不胜感激。
Additional Information: I've narrowed the bug down to the path to the directory where the images are located need to change. If I copy the images directory under each of the sub directories, it works fine. I would really prefer not to have 4 copies of every picture on the system.
附加信息:我已经将错误缩小到图像所在目录的路径需要更改。如果我复制每个子目录下的images目录,它可以正常工作。我真的不希望系统上的每张图片都有4份。
Thanks in advance and here’s a partial sample source code
在此先感谢,这是一个部分示例源代码
<HEAD>
<script src="js_files/primary.js"></script>
<csactiondict>
<script><!--
CSInit[CSInit.length] = new Array (CSILoad,/*CMP*/'button',/*URL*/'buttons/hp2.gif',/*URL*/'buttons/hp2.gif',/*URL*/'','Home Page');
CSInit[CSInit.length] = new Array (CSILoad,/*CMP*/'button2',/*URL*/'buttons/mv1.gif',/*URL*/'buttons/mv2.gif',/*URL*/'','But ton2Text');
CSInit[CSInit.length] = new Array (CSILoad,/*CMP*/'button3',/*URL*/'buttons/sev1.gif',/*URL*/'buttons/sev2.gif',/*URL*/'','B uttons3sText');
// --></script>
</csactiondict>
</HEAD>
<BODY>
<csobj w="96" h="18" t="Button" st="Home Page" ht="buttons/hp2.gif">
<a href="#" onmouseover="return CSIShow(/*CMP*/'button',1)" onmouseout="return CSIShow (/*CMP*/'button',0)" onclick="return CSButtonReturn()"><img src="buttons/hp2.gif" width="96" height="18" name="button" border="0" alt="Home Page"></a>
</csobj>
<br>
<img height="2" width="108" src="images/spacer.gif" border="0" alt="Spacer">
<br>
<csobj w="96" h="18" t="Button" st="Button1Text" ht="buttons/hmc2.gif"><a href="Link1.asp" onmouseover="return CSIShow(/*CMP*/'button35',1)" onmouseout="return CSIShow(/*CMP*/'button35',0)" onclick="return CSButtonReturn()">
<img src="buttons/hmc1.gif" width="96" height="18" name="button3" border="0" alt="Button3AltText"></a>
</csobj>
<br>
<img height="8" width="108" src="images/spacer.gif" border="0" alt="Spacer">
<br>
<csobj w="96" h="18" t="Button" st="Link2Text" ht="buttons/mv2.gif"><a href="Link2.asp" onmouseover="return CSIShow(/*CMP*/'button2',1)" onmouseout="return CSIShow(/*CMP*/'button2',0)" onclick="return CSButtonReturn()"><img src="buttons/mv1.gif" width="96" height="18" name="button2" border="0" alt="Button2Text"></a></csobj>
</BODY>
1 个解决方案
#1
If you replace all references to buttons/
with /buttons/
(add a slash at the front) it should work for pages in subdirectories.
如果替换所有对buttons / with / buttons /的引用(在前面添加斜杠),它应该适用于子目录中的页面。
so
CSInit[CSInit.length] = new Array (CSILoad,/*CMP*/'button',/*URL*/'buttons/hp2.gif',/*URL*/'buttons/hp2.gif',/*URL*/'','Home Page');
would become
CSInit[CSInit.length] = new Array (CSILoad,/*CMP*/'button',/*URL*/'/buttons/hp2.gif',/*URL*/'/buttons/hp2.gif',/*URL*/'','Home Page');
and
<img src="buttons/hmc1.gif" width="96" height="18" name="button3" border="0" alt="Button3AltText"></a>
would become
<img src="/buttons/hmc1.gif" width="96" height="18" name="button3" border="0" alt="Button3AltText"></a>
and so on. You would only need one buttons
directory at the root of the host.
等等。您只需要在主机的根目录下有一个按钮目录。
Your editor should have a way to "Replace All" to make applying these changes less painful.
您的编辑应该有一种“全部替换”的方法,以减少应用这些更改的痛苦。
#1
If you replace all references to buttons/
with /buttons/
(add a slash at the front) it should work for pages in subdirectories.
如果替换所有对buttons / with / buttons /的引用(在前面添加斜杠),它应该适用于子目录中的页面。
so
CSInit[CSInit.length] = new Array (CSILoad,/*CMP*/'button',/*URL*/'buttons/hp2.gif',/*URL*/'buttons/hp2.gif',/*URL*/'','Home Page');
would become
CSInit[CSInit.length] = new Array (CSILoad,/*CMP*/'button',/*URL*/'/buttons/hp2.gif',/*URL*/'/buttons/hp2.gif',/*URL*/'','Home Page');
and
<img src="buttons/hmc1.gif" width="96" height="18" name="button3" border="0" alt="Button3AltText"></a>
would become
<img src="/buttons/hmc1.gif" width="96" height="18" name="button3" border="0" alt="Button3AltText"></a>
and so on. You would only need one buttons
directory at the root of the host.
等等。您只需要在主机的根目录下有一个按钮目录。
Your editor should have a way to "Replace All" to make applying these changes less painful.
您的编辑应该有一种“全部替换”的方法,以减少应用这些更改的痛苦。