rsines
02-08-2008, 03:23 PM
I know this is a dumb question for those that are experienced in writing JavaScripts, but to a novice like myself it seems impossible.
I have tried for the past three days, and all I get is one error after another.
The following line works as is:
calendarString += '<td align=\"center\" valign=\"center\"><a href=\"javascript:changedate(\'return\')\"><b>Today<\/b><\/a><\/td>';
How can the above line be changed to use images instead of text?
onMouseOver="on.jpg"
onMouseOut="off.jpg"
onClick=" "
I found this works also (I figured it out after making this post):
calendarString += '<td align=\"center\" valign=\"center\"><a href=\"#\" onMouseOver=\"document.myVar.src=\'on\.jpg\';\" onMouseOut=\"document.myVar.src=\'off\.jpg\';\" onClick=\"changedate(\'return\')\"><img name=\"myVar\" src=\"off\.jpg\"\/><\/a><\/td>';
I have tried for the past three days, and all I get is one error after another.
The following line works as is:
calendarString += '<td align=\"center\" valign=\"center\"><a href=\"javascript:changedate(\'return\')\"><b>Today<\/b><\/a><\/td>';
How can the above line be changed to use images instead of text?
onMouseOver="on.jpg"
onMouseOut="off.jpg"
onClick=" "
I found this works also (I figured it out after making this post):
calendarString += '<td align=\"center\" valign=\"center\"><a href=\"#\" onMouseOver=\"document.myVar.src=\'on\.jpg\';\" onMouseOut=\"document.myVar.src=\'off\.jpg\';\" onClick=\"changedate(\'return\')\"><img name=\"myVar\" src=\"off\.jpg\"\/><\/a><\/td>';