Forum Moderators: open
I have the following code in a .JS file:
document.writeln('<a href=\"http://www.education.com\" TARGET=\"_BLANK\" TITLE=\"For an online directory of distance graduate programs, click here!\"> Click here!</a>');
It works perfectly...
I would like to add a mouseover command to it, i.e.:
onMouseOver="window.status='Click here now to visit Education.com!';return true" OnMouseOut="window.status='';return true"
I've used the correct slashes in the right places. However, it doesn't work; probably because I'm trying to place Javascript within Javascript.
How can I place the onMouseOver command in the code at the top of this page?
Thank you very much :)
The following version works - it was just a question of your single quotation marks closing the writeIn before you were finished.
document.writeln('<a href="http://www.education.com" TARGET="_BLANK" TITLE="For an online directory of distance graduate programs, click here!" onMouseOver="window.status=' + "'Click here now to visit Education.com!'" + ';return true" OnMouseOut="window.status=' + "''" + ';return true"> Click here!</a>');