[Javascript] Re-assign URL of swapped image

Rodney Myers rodney at aflyingstart.net
Wed Jul 2 11:09:54 CDT 2003


if(stringA.indexOf(stringB)>-1)
THEN stringA CONTAINS stringB

hth
Rodney


Thierry Lavallée wrote:

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

-- 
PS. If you have to answer routine email queries 
from your sites or mailings then you will find 
the simple-to-use BizAutomator invaluable.
http://www.BizAutomator.co.uk












More information about the Javascript mailing list