Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Web Programming > JavaScript > Javascript How-To
|
Javascript How-To Ask your "How do I do this with Javascript?" questions here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Javascript How-To section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 16th, 2007, 05:10 PM
Authorized User
 
Join Date: Feb 2007
Posts: 51
Thanks: 3
Thanked 0 Times in 0 Posts
Default How To PopUp Text Message within <li>

Hello,
I am assuming that there is a simple way to popup text message when rolling over an entry in an html list. I assume javascript is the way to go. For instance, if I have a list:
<ol>
<li>Line 1</li>
<li>Line 2</li>
<li>Line 3</li>
<li>Line 4</li>
</ol>

I understand that if I were to do some facsimile to below:


<ol>
<li onmouseover="someJsFunction(message 1)">Line 1</li>
<li onmouseover="someJsFunction(message 2)">Line 2</li>
<li onmouseover="someJsFunction(message 3)">Line 3</li>
<li onmouseover="someJsFunction(message 4)">Line 4</li>
</ol>

My question is what would be a simple way to accomplish this popup text message based upon which line in the list is hovered over. Again, I am assuming a javascript solution is best, but will entertain anything. Thanks in advance.

 
Old February 18th, 2007, 09:07 PM
Friend of Wrox
 
Join Date: Jan 2004
Posts: 1,870
Thanks: 12
Thanked 20 Times in 20 Posts
Send a message via AIM to mat41
Default

No exactley JS however this will o it for you:

<ol>
 <li title="Some first item text">Line 1</li>
 <li title="Some Second item text">Line 2</li>
 <li title="Some third item text">Line 3</li>
 <li title="Some fourth item text">Line 4</li>
</ol>

Wind is your friend
Matt





Similar Threads
Thread Thread Starter Forum Replies Last Post
Formating <li> as per xml using xslt 1.0 tims XSLT 9 May 12th, 2008 01:30 AM
<li></li> issue Adam H-W CSS Cascading Style Sheets 1 November 5th, 2007 06:41 AM
create <ul> with alternating class on <li> element Brian Campbell XSLT 2 November 3rd, 2006 06:07 PM
Problem with text-decoration in cascaded <li> setesteve CSS Cascading Style Sheets 6 January 7th, 2005 10:53 AM
color attribute with <li> econophil HTML Code Clinic 2 August 31st, 2004 02:22 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.