Computing.Net > Forums > Programming > JavaScript, PATH ISSUE

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

JavaScript, PATH ISSUE

Reply to Message Icon

Name: NooK
Date: November 8, 2007 at 05:21:40 Pacific
OS: XP PRO
CPU/Ram: 2.26GHz
Product: Asus Clone
Comment:

Hello,

Currently I'm running a JavaScript on a website that provides an image roll-over, the script uses 3 images. I can get the script to work fine when the images are placed in the root directory, this is how the script was intially setup.

This clutters my root, so I've been trying to change the JS Script to display the images from a different directory. Usually this task isn't too hard. But i've been having problems changing the directories; the script is below.

<head>
<script language="JavaScript">

</script>
</head>

Then this is where the paths are set, right now this is set to the default root.

img src="homebutton1.gif" alt="Home" name="img3" width="100" height="33" border="0" id="img3" onMouseDown="FP_swapImg(1,0,/*id*/'img3',/*url*/'homebutton3.gif')" onMouseUp="FP_swapImg(0,0,/*id*/'img3',/*url*/'homebutton2.gif')" onMouseOver="FP_swapImg(1,0,/*id*/'img3',/*url*/'homebutton2.gif')" onMouseOut="FP_swapImg(0,0,/*id*/'img3',/*url*/'homebutton1.gif')" fp-style="fp-btn: Embossed Tab 9; fp-font: Agency FB; fp-font-style: Bold; fp-font-size: 16; fp-font-color-normal: #0000FF; fp-font-color-hover: #FFFFFF; fp-bgcolor: #800000; fp-transparent: 1" fp-title="Home">


Ive tried

(1,0,/*id*/'img3',/*url*/images/menutabs/'homebutton3.gif'

also tried

(1,0,/*id*/'img3',/*url*/*images*/*menutabs*/'homebutton3.gif'

and....

(1,0,/*id*/'img3',/*url*images*menutabs*/'homebutton3.gif'

Im just guessing here, so if someone could send me the right way. This shouldn't be that hard.



Sponsored Link
Ads by Google

Response Number 1
Name: Razor2.3
Date: November 9, 2007 at 04:55:47 Pacific
Reply:

I'm just going to take a blind stab at this, as you never bothered to post this FP_swapImg(var, var, var, var) function.

Try (1,0,/*id*/'img3',/*url*/'/images/menutabs/homebutton3.gif' or (1,0,/*id*/'img3',/*url*/'images/menutabs/homebutton3.gif'


0

Response Number 2
Name: NooK
Date: November 12, 2007 at 15:39:25 Pacific
Reply:

(1,0,/*id*/'img3',/*url*/'images/menutabs/homebutton3.gif'

CANT BELIEVE I DIDN'T TRY THAT! THANKS!


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: JavaScript, PATH ISSUE

JavaScript ; setTimeout issue www.computing.net/answers/programming/javascript-settimeout-issue/7214.html

Generate list of network interfaces www.computing.net/answers/programming/generate-list-of-network-interfaces/13159.html

Batch in Folder in Zip www.computing.net/answers/programming/batch-in-folder-in-zip/17290.html