I have a small pop-up window that I want to only pop-up when the user moves his mouse over a certain block of text. Currently this block of text is also a link.
I am using the script I found here:
What I'd like to do is put the html that makes the pop-up window (the part in Step 2 in the link above) in a function, and call it in the text's onmouseover property. Ex: <a href="demoPage.asp" onmouseover="Description(2)">
I don't really know how to write the javaScript so that it will have the html tags in there to create it though. I tried to do something like
<script language="JavaScript" type="text/javascript">
function Description(number){
if (number > 1)
{
</script>
Then the HTML code here...
<script language="JavaScript" type="text/javascript">
}
}
</script>
But that doesn't work. Is there a way I can accomplish this?
I am using the script I found here:
What I'd like to do is put the html that makes the pop-up window (the part in Step 2 in the link above) in a function, and call it in the text's onmouseover property. Ex: <a href="demoPage.asp" onmouseover="Description(2)">
I don't really know how to write the javaScript so that it will have the html tags in there to create it though. I tried to do something like
<script language="JavaScript" type="text/javascript">
function Description(number){
if (number > 1)
{
</script>
Then the HTML code here...
<script language="JavaScript" type="text/javascript">
}
}
</script>
But that doesn't work. Is there a way I can accomplish this?