1

在他们的程序员去世后,我继承了一位客户。他们有 4 个商业网站运行我认为是我在 Google 上找到的 Adob​​e Go Live 代码。

只要所有 .asp 脚本和图像目录都在 Web 的根目录之外,它就可以完美地工作。我需要将“商店”脚本移动到“商店”子目录下。当我运行根目录中的默认页面时,按钮会出现,其中包含图标。当我单击 asp 位于“商店”目录下的页面的其中一个按钮时,这些按钮中都没有图像了。我对Javascript一无所知。我敢肯定,对于知道它的人来说,这是一个快速的愚蠢修复。任何帮助,将不胜感激。

附加信息:我已将错误缩小到需要更改图像所在目录的路径。如果我将图像目录复制到每个子目录下,它就可以正常工作。我真的不希望系统上的每张图片都有 4 个副本。

在此先感谢,这是部分示例源代码

<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>
4

1 回答 1

1

如果您将所有引用替换为buttons//buttons/在前面添加一个斜杠)它应该适用于子目录中的页面。

所以

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*/'button',/*URL*/'/buttons/hp2.gif',/*URL*/'/buttons/hp2.gif',/*URL*/'','Home     Page');

<img src="buttons/hmc1.gif" width="96" height="18" name="button3" border="0"     alt="Button3AltText"></a>

会成为

<img src="/buttons/hmc1.gif" width="96" height="18" name="button3" border="0"     alt="Button3AltText"></a>

等等。您只需要一个buttons位于主机根目录的目录。

您的编辑器应该有办法“全部替换”以减少应用这些更改的痛苦。

于 2009-01-30T20:59:14.923 回答