Jump to content

one line


westman

Recommended Posts

i have an error in one line of javascript code...

  $("#whatisit").html('<a href="#" title="chat" onclick="return false" onmousedown="javascript:togglechat('"+chat+"');"><img src="chat.png" alt="chat" width="44" height="40" /></a>').show();

the problem is '"+chat+"'what do i put there?

Link to comment
Share on other sites

You can't use double quotes with an event call that uses double quotes as opening and closing, try

$("#whatisit").html('<a href="#" title="chat" onclick="return false" onmousedown="javascript:togglechat('+chat+');"><img src="chat.png" alt="chat" width="44" height="40" /></a>').show();

Link to comment
Share on other sites

togglechat('+chat+') = i can not see the imagetogglechat(chat) = i can see the image but togglechat will not runtogglechat(\''+chat+'\') = i can not see the imagetogglechat() = i can see the image but togglechat will not run still not working :(

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...