PDA

View Full Version : Resolved line breaks in dhtmltooltip



joon
01-12-2009, 02:56 AM
<html>

<head>
<style type="text/css">

#dhtmltooltip{

OMITTED

}

</style>
</head>

<body>

<div id="dhtmltooltip"></div>

<script type="text/javascript">

/***********************************************
* Cool DHTML tooltip script- Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
***********************************************/

- OMITTED -

document.onmousemove=positiontip

</script>


<a href="http://www.javaSciprtKit.com"
onMouseover="ddrivetip('JavaScriptKit.com JavaScript tutorials', 'yellow', 250)";
onMouseout="hideddrivetip()">LINK1</a>

<a href="http://www.javaSciprtKit.com" onMouseover="ddrivetip('JavaScriptKit.com

JavaScript tutorials', 'yellow', 250)";
onMouseout="hideddrivetip()">LINK2</a>

</body>
</html>The code above is from http://www.dynamicdrive.com/dynamicindex5/dhtmltooltip.htm .

On the bottom of the code above there are two links, i.e. link1 and link2.

Link1 works fine but Link2 which has line breaks in the text doesn't work fine.

Is there any way to make it fine with linebreaks?

jscheuer1
01-12-2009, 03:16 AM
Please post a link to the page on your site that contains the problematic code so we can check it out.

Nile
01-12-2009, 03:27 AM
This is because you have to concatenate new lines in:


<a href="http://www.javaSciprtKit.com"
onMouseover="ddrivetip('JavaScriptKit.com JavaScript tutorials', 'yellow', 250)";
onMouseout="hideddrivetip()">LINK1</a>

<a href="http://www.javaSciprtKit.com" onMouseover="ddrivetip('JavaScriptKit.com'+

'JavaScript tutorials', 'yellow', 250)";
onMouseout="hideddrivetip()">LINK2</a>

That should work.
If you were aiming to make line breaks, use <br />.

joon
01-12-2009, 05:05 AM
Please post a link to the page on your site that contains the problematic code so we can check it out.I like to put the code into http://dot.kr .
Since my problem of the code above is not solved, I didn't put the code into http://dot.kr yet.

By the way, my test code of it is at http://dot.kr/x-test/09.cfm .




If you were aiming to make line breaks, use <br />.
<br> works. Thank you.

Nile
01-12-2009, 01:04 PM
Glad to help Joon!
It seems your topic is solved... Please set the status to resolved.. To do this:
Go to your first post ->
Edit your first post ->
Click "Go Advanced" ->
Then in the drop down next to the title, select "RESOLVED"