javascript - How can I make iconimages that are present in the root directory page also appear in another directory? -


After their programmer died, I inherited a customer. They have 4 commercial sites running I believe that the Adobe Live Live code I have found on Google

it works perfectly until all. Esp script and image directories are away from the root directory of the web. I needed to move the 'store' script under a 'store' subdirectory. When I run the original page which is in the root directory, the icons are shown in those buttons. When I click the buttons for a page Click on one where the asp 'store' lives under the directory, so none of the buttons have the image. I know nothing about javascript. I'm sure someone knows that it's a quick dumb fix. Any help would be appreciated.

Additional information: I have narrowed the bug below under the path in the directory where the images are located, needs to be replaced. If I copy the directory of the images under each sub directory, then it works fine. I really would not want to make 4 copies of every picture on the system.

Thanks in advance and here is a partial sample source code

  & lt; HEAD & gt; & Lt; Script src = "js_files / primary.js" & gt; & Lt; / Script & gt; & Lt; Csactiondict & gt; & Lt; Script & gt; & Lt ;! - CSInit [CSInit.length] = New Array (CSILoad, / * CMP * / 'Button', / * URL * / 'Button / hp2.gif', / * URL * / 'Button /hp2.gif',/* URL * / '', 'Home Page'); CSInit [CSInit.length] = new array (CSILoad, / * CMP * / 'button2', / * URL * / 'button / mv1.gif', / * URL * / 'button / mv2.gif', / * URL * / '', 'But ton 2 text'); CSINit [CSInit.length] = new array (CSILoad, / * CMP * / 'button3', / * url * / 'button / save1gif', / * url * / 'button / save2gif', / * Url * / '', 'b uttons3sText'); // -> & Lt; / Script & gt; & Lt; / Csactiondict & gt; & Lt; / HEAD> & Lt; Body & gt; & Lt; Csobj w = "96" h = "18" t = "button" st = "home page" ht = "button / hp2.gif" & gt; & Lt; Returns CSIShow (/ * CMP * / 'Button', 1) "Onmouse =" Return SSISV (/ * CMP * / 'Button', 0) "OnClick =" Return CeSbutton Returns () "& Gt; & Lt; Img src = "button / hp2.gif" width = "96" height = "18" name = "button" border = "0" alt = "home page" & gt; & Lt; / A & gt; & Lt; / Csobj & gt; & Lt; Br> & Lt; Img height = "2" width = "108" src = "image / spacer.gif" border = "0" alt = "spacer" & gt; & Lt; Br> & Lt; Csobj w = "96" h = "18" t = "button" st = "button 1 text" ht = "button / hmc2.gif" & gt; & Lt; Acycl = "link 1 asbes" onmouseover = "return CSIShow (/ * CMP * / 'button 35', 1)" on-house = "return CSISview (/ * CMP * / 'button 35', 0)" onclick = "Return Csbutton Returns ()" & gt; & Lt; Img src = "button / hmc1.gif" width = "96" height = "18" name = "button3" border = "0" alt = "button 3 alittlext" & gt; & Lt; / A & gt; & Lt; / Csobj & gt; & Lt; Br> & Lt; Img height = "8" width = "108" src = "image / spacer gif" range = "0" alt = "spacer" & gt; & Lt; Br> & Lt; Csobj w = "96" h = "18" t = "button" st = "link2text" ht = "button / mv2.gif" & gt; & Lt; "On-homeout =" return CSISwash (/ * CMP * / 'button2', 0) "onclic = "Return Csbutton Returns ()" & gt; & Lt; IMG src = "Button / MV1 Gif" width = "96" height = "18" name = "button2" border = "0" alt = "button 2 text" & gt; & Lt; / A & gt; & Lt; / Csobj & gt; & Lt; / Body & gt;  

If you select button / with all the references < Code> / button / (Add a slash in front) It should work for the pages in the subdirectory.

CSINit [CSInit.length] = New Array (CSOLOD, / * CMP * / 'Button', / * Url * / 'Button / HP2. Gif ', / * url * /' button / hp 2.gif ', / * url * /' ',' home page ');

  CSInit [CSInit.length] = new array (CSILoad, / * CMP * / 'button', / * url * / '/ buttons /hp2.gif',/*URL*/'/buttons/hp2.gif',/*URL*/ '', 'Home Page');  

and

  & lt; Img src = "button / hmc1.gif" width = "96" height = "18" name = "button3" border = "0" alt = "button 3 alittlext" & gt; & Lt; / A & gt;  

  and  button 3 alittlext  

And so on in the root of the host you will only need a button directory.

In order to make these changes less painful, your editor should have a "change to all" method.


Comments