[Javascript] Re-assign URL of swapped image

Thierry Lavall=?ISO-8859-1?B?6Q==?=e thierry at 8p-design.com
Wed Jul 2 10:34:31 CDT 2003


Hi all
I still have a question concerning this.
I would like to do this in a more simple way and drop the URL part.

This is current code:
  if(document['Cover'].src ==
"http://www.8p-design.com/bummis/images/product/Covers/BummiCotton_Cows_M.jp
g") {
    winURL = 
"http://www.8p-design.com/Bummis/images/product/Covers/BummiCotton_Cows_L.jp
g";

I would like it just verify the name of the image rather than whole path.
As in something like:
if(document['Cover'].src CONTAINS "BummiCotton_Cows_M.jpg")

Is this possible?
What should I replace CONTAINS to?

Thanks!
-- 
Thierry



More information about the Javascript mailing list