# Mouseover Text - Popup Problem

**URL:** <https://forum.kirupa.com/t/mouseover-text-popup-problem/265879>\
**Category:** web dev\
**Created:** [July 14, 2008, 5:36am UTC](https://forum.kirupa.com/t/mouseover-text-popup-problem/265879 "2008-07-14T05:36:01Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![lacohido](https://avatars.discourse-cdn.com/v4/letter/l/e8c25b/32.png) [@lacohido](https://forum.kirupa.com/u/lacohido)\
**Post date:** [July 14, 2008, 5:36am UTC](https://forum.kirupa.com/t/mouseover-text-popup-problem/265879/1 "2008-07-14T05:36:01Z")

</div>

Hey Everyone-  
For some reason I’m can’t figure this out and I’m sure it’s simple. I must be rusty…

Anyway, I’ve been working with a javascript that makes text popup (in a seperate DIV) when you rollover a link.

This is in the header:

```auto
<script language="JavaScript">
<!--
function change(html){
description.innerHTML=html
}
//-->
</script>

```

This is the link code:

```auto
<a href="url goes here" onmouseover="javascript:change('This is description of the link')" onmouseout="javascript:change('')">Link Text Here</a>

```

This is the DIV where text pops-up:

```auto
<div id="description"></div>

```

* * *

So what I was wanting to do is put paragraph tags in the link code where I add a description like this:

```auto
<a href="url goes here" onmouseover="javascript:change('<p>I WANT A PARAGRAPH HERE</p><p>I WANT A SECOND PARAGRAPH HERE</p>')" onmouseout="javascript:change('')">Link Text Here</a>

```

* * *

So basically I want to have multiple paragraphs in the description area but javascript doesn’t like when i put the paragraph tags in  
Is there a way around this?

Thanks You Much  
Cheers  
-Landon

---

<div class="post-metadata">

**Author:** ![actionAction](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/actionaction/32/3987_2.png) [@actionAction](https://forum.kirupa.com/u/actionAction)\
**Post date:** [July 14, 2008, 7:42am UTC](https://forum.kirupa.com/t/mouseover-text-popup-problem/265879/2 "2008-07-14T07:42:07Z")

</div>

What do you mean when you say “javascript doesn’t like when I put the paragraph tags in”? JS doesn’t really care if you are injecting a p (or any other) tag into your page using innerHTML, it is perfectly acceptable. Is this working at all? Has it worked yet? Does it stop working when you use the p tag? Please elaborate. Thanks! 🙂

Also, I noticed you are not using document.getElementById(‘description’).innerHTML = html, are you getting your div object elsewhere? This may be the cause of your problem.
