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 Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Syntax issue - quotation marks? 1

Status
Not open for further replies.

sera

Technical User
Jun 29, 2000
360
US
I have a simple js syntax question.

Here is the code with the trouble spot highlighted red!


var image_name = zoom_0.jpg;

document.write('<IMG id=IMG1 src= + image_name + useMap=#zoom_2 border=0 ></img>');

//for some reason this does not recognize image_name. If I just
//replace the variable with the real image_name (not a variable)
//this code works. I am assuming my problem is quotation marks but
//I cannot figure out how to add them.
 
document.write('<IMG id=IMG1 src=' + image_name + ' useMap=#zoom_2 border=0 ></img>'); ---------------------------------------
wmail.jpg


someone knowledge ends where
someone else knowledge starts
 
Well that seems to work! It isn't doing what it is supposed to but that is not your fault (it's mine) so I will give you a big fat juicy star for your speedy reply.
Thanks,
Sera
 
Hey it does work...I have said it before my computer is possessed! If I could give you a million stars I would.
Sera
 
possessed ! [lol] happy that helped ! ---------------------------------------
wmail.jpg


someone knowledge ends where
someone else knowledge starts
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top