View Full Version : Alternate content = image PATH?
04-30-2004, 06:38 PM
This is the code I have. It works great.
I'd appreciate any help I can get!
var alternateContent ="<img src=\"golf.gif\" />";
Need it to point to:
04-30-2004, 07:23 PM
Is that a relative or absolute location? Like from the directory your code is in, is there a mPromo directory there or is mPromo in the root or what? you may need to use ./mPromo or ../../mPromo or something....
But yea, you can just replace golf.gif with the location of the other golf.gif
Probably doesn't help much, but we need that info from you..
04-30-2004, 08:15 PM
Thank you for your reply, Sadiq.
It doesn't seem that simple.
I already used the ../ for the directory path before, but it seems to be a problem with the code.
Normally, in HTML the link would look like this:
="<img src=\"./mPromo/o5-2004/golf.gif\" />";
I believe it's because of the way it has to write the script.
Example : " is written as "\
and > is written as />
I don't know how to write / for the backslash in the directory path.
I think this is my problem. I don't even know if it's ASP or what.
04-30-2004, 08:35 PM
Ok, you don't have to use the dbl-quotes. Try incorporating single-quotes:
var alternateContent = "<img src='./mPromo/05-2004/golf.gif'>";
Let me know how that works out for you.
04-30-2004, 08:47 PM
I'll try it. Thank you very much for your help.
04-30-2004, 09:07 PM
Actually, upon further inspection, it wasn't the code after all, it had to do with another piece of the code and alternate browser code. I was changing the wrong snippet.
Thanks again for your help. The single quotes work just fine.
Powered by vBulletin® Version 4.2.2 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.