Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Web Programming > JavaScript > Javascript
| Search | Today's Posts | Mark Forums Read
Javascript General Javascript discussions.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Javascript 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
  #1 (permalink)  
Old November 20th, 2006, 01:54 PM
Friend of Wrox
Points: 1,075, Level: 12
Points: 1,075, Level: 12 Points: 1,075, Level: 12 Points: 1,075, Level: 12
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2005
Location: , , United Kingdom.
Posts: 244
Thanks: 3
Thanked 4 Times in 4 Posts
Default Showing text from mouseover event

Hello,
      I have an img inside a table and i would like when the mouse is over it to display inside one of the <td>. can i do it by labelling the <td> like <td name=text1> and then in the mouseover do something like <img src="*.gif" onmouseover="document.text1.write('what i want to go here!')> is that possible?? anyother suggestions plz, also its need to disspear on the mouseout event. thanks to any one who can help


------------------------------------------------
Apocolypse2005
Always ready and waiting to help!
__________________
Apocolypse2005, I'm a programmer - of sorts.
  #2 (permalink)  
Old November 21st, 2006, 12:51 AM
Friend of Wrox
 
Join Date: Oct 2004
Location: delhi, delhi, India.
Posts: 553
Thanks: 0
Thanked 1 Time in 1 Post
Send a message via MSN to vinod_yadav1919 Send a message via Yahoo to vinod_yadav1919
Default

Hi Apocolypse2005!!!
Hope this will help you
<script>
function ShowMsg(textVal)
{
document.getElementById("msgid").innerHTML=textVal
}
function ClearMsg()
{
document.getElementById("msgid").innerHTML=""
}
</script>
<table>
<tr>
<td><img src="bg.gif" onmouseOver="ShowMsg('This is Test')" onmouseOut="ClearMsg()">
</td>

<td id="msgid">
</td>
</tr>
</table>

Cheers :)

vinod
  #3 (permalink)  
Old November 21st, 2006, 11:17 PM
Friend of Wrox
 
Join Date: Jun 2003
Location: High Wycombe, UK, United Kingdom.
Posts: 344
Thanks: 0
Thanked 1 Time in 1 Post
Default

there is an example at http://www.greggriffiths.org if you hover over any of the blue ovals the text appears in the middle.
  #4 (permalink)  
Old November 22nd, 2006, 02:04 PM
Friend of Wrox
Points: 1,075, Level: 12
Points: 1,075, Level: 12 Points: 1,075, Level: 12 Points: 1,075, Level: 12
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2005
Location: , , United Kingdom.
Posts: 244
Thanks: 3
Thanked 4 Times in 4 Posts
Default

This has got to be one of the best response i have ever had on this forum, thank you very much! they both were really helpfull!



------------------------------------------------
Apocolypse2005
Always ready and waiting to help!


Similar Threads
Thread Thread Starter Forum Replies Last Post
Webmenu - add mouseover to display text ismailc ASP.NET 2.0 Basics 0 September 18th, 2008 07:47 AM
Getting Object Expected error on mouseover event nrlahoti ASP.NET 2.0 Professional 10 March 15th, 2008 11:30 AM
How to show gif image on mouseover event of button arshad mahmood ASP.NET 1.0 and 1.1 Basics 2 September 14th, 2006 12:15 AM
text in messagebox in not showing (.net 2003) prasant.swain VS.NET 2002/2003 1 January 10th, 2006 09:04 AM
text area showing LineFeed CariageReturns lcsgeek Classic ASP Databases 3 November 11th, 2003 02:02 PM





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