By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
464,641 Members | 1,098 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 464,641 IT Pros & Developers. It's quick & easy.

tooltip display problem

P: 2,476
sory for repetition ...

i sent this question before ...
but i lost that forum

i want to display a tooltip using title attribute ...

title = "text1\ntext2"

\n does not work
i want the replacement character for \n
Feb 13 '07 #1
Share this Question
Share on Google+
3 Replies

Expert Mod 15k+
P: 16,027
This shouldn't work. In any case, why should you need it? If the text is too long, the browser should automatically put a newline. If it doesn't, it shouldn't be so long.

If you really want newlines, use a special tooltip instead of title, e.g. overlib.
Feb 13 '07 #2

Expert 100+
P: 1,208
Expand|Select|Wrap|Line Numbers
  2. <a href="blah.html" title="" id="tmp">Testing</a>
  3. <script>
  4. document.getElementById("tmp").setAttribute("title", "this is a test\nof not only 2 lines\nbut 3 lines :P");
  5. </script>

simple elegant yaya it sucks but it works!
Feb 13 '07 #3

P: 2,476
thanx for ur reply..

realllllyyyyyyyyyyyyyyyy lot of thanx
Feb 14 '07 #4

Post your reply

Sign in to post your reply or Sign up for a free account.