Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

problems with strings stored in arrays

Status
Not open for further replies.

UCENwebster

Programmer
Jun 7, 2002
18
US
Hi, I'm having a mickeymouse problem here--

I'm trying to use an array to store the names of several images I want to use. But when I use the array in a function call, it doesn't work--

When I do this it's ok, the picture swaps like it's supposed to:

{
MM_swapImage( 'imgHandle' , '', 'folder/picture.gif' , 1 );
}

But when I do this instead, the image doesn't display (just shows an X)--

{
spots[index] = "folder/picture.gif";

MM_swapImage( 'imgHandle', '' , spots[index], 1);
}

where spots is the array i'm using.

It seems that whenever I use a variable string of any sort in place of the actual string contsant, then I get the error. Maybe it's a problem with that function (it's from Dreamweaver). This problem has been stumping me for a week. Someone please help me!!! :-(
 
Inside MM_swapImage function in first line put and alert and see if the third variable is being received correctly. If yes then its the function problem. It looks good to me with your scriopt but i think that its the problem with function. Badrinath Chebbi
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top