Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

show alt text, or tooltip

Posted on 2006-05-04
7
Medium Priority
?
663 Views
Last Modified: 2012-06-21
I have an html page with a javascript function that that displays images inline, and also another function that whne the user clicks on the image a bigger image is opened (provided by EE)  what I would like to know is, how can text can be shown one the mouse passes over the image?

the text i want to display is "Click image to enlarge"

Thank you in advance.



<html xmlns="http://www.w3.org/1999/xhtml">
 <head>
  <meta http-equiv="content-type" content="text/html;charset=utf-8" />
  <title>Radar</title>
  <link class="header" href="stylePage.css" rel="stylesheet" type="text/css" media="all" />

  <script language="javascript">

  function newWindow(filename) {
         window.open (filename, 'bw', 'toolbar=yes, directories=yes, location=yes, status=yes, menubar=yes, resizable=yes, scrollbars=yes, width=1024, height=728');
    }
   function changeImage(filename, clickLink)
   {
        document.mainimage.src = filename;
        document.mainimage.onclick = function () { newWindow(clickLink);}
   }
</script>
 </head>
 <body leftmargin="0" marginheight="0" marginwidth="0" topmargin="0" >
  <div class="header">MAPS</div>
  <table width="100%" border="0" cellspacing="1" cellpadding="2">
   <tr>
    <td class="radars"><a href="javascript:changeImage('http://files.world.com/max_s.jpg', 'http://www.world.com/Global/category.asp?c=6264');" class="radars">Doppler</a></td>
    <td class="radars"><a href="javascript:changeImage('http://files.world.com/w_desktop_images/metro_nexrad_tracks.jpg', 'http://www.world.com/global/link.asp?l=123654');" class="radars">Metro</a></td>
    <td class="radars"><a href="javascript:changeImage('http://files.world.com/w_desktop_images/sandmtn_nexrad_tracks.jpg', 'http://www.world.com/global/link.asp?l=119747');" class="radars">Sand NEXRAD </a></td>
    <td class="radars"><a href="javascript:changeImage('http://files.world.com/w_desktop_images/rad_tracks.jpg', 'http://www.world.com/global/link.asp?l=119847');" class="radars">NEXRAD</a></td>
   </tr>
   <tr>
    <td align="center" width="1"><img src="images/spacer.gif" alt="" height="240" width="1" border="0"></td>
    <td colspan="4" align="center">
    <img id="mainmap" src="http://files.world.com/max_s.jpg" name="mainimage" border="0" onclick="window.open('http://www.world.com/Global/category.asp?c=5550');" /><br><font size="1">Click to enlarge</font></td>
   </tr>
 </table>
 </body>


</html>
0
Comment
Question by:itortu
  • 4
  • 3
7 Comments
 
LVL 63

Expert Comment

by:Zvonko
ID: 16609984
Like this:
<img id="mainmap" src="http://files.world.com/max_s.jpg" name="mainimage" border="0" onclick="window.open('http://www.world.com/Global/category.asp?c=5550');" alt="Click to enlarge"/>

0
 

Author Comment

by:itortu
ID: 16610047
that only works using IE isn't rigth?

Thank you.
0
 

Author Comment

by:itortu
ID: 16610050
what would be the solution for FF as well?
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 63

Accepted Solution

by:
Zvonko earned 400 total points
ID: 16610069
For FF you need title=
    <img id="mainmap" src="http://files.world.com/max_s.jpg" name="mainimage" border="0" onclick="window.open('http://www.world.com/Global/category.asp?c=5550');" alt="Click to enlarge" title="Click to enlarge"/>

0
 
LVL 63

Expert Comment

by:Zvonko
ID: 16610084
The title= produces tooltip in IE and FF.
The alt= is only placeholder before image arives. In IE it is also used for tooltip/title.

0
 

Author Comment

by:itortu
ID: 16610106
excellent!

thank you very much.

0
 
LVL 63

Expert Comment

by:Zvonko
ID: 16610112
You are welcome.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The task A number given should be formatted for easy reading by separating digits into triads. Format must be made inline via JavaScript, i.e., frameworks / functions are not welcome. So let’s take a number like this “12345678.91¿ and format i…
Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Suggested Courses

580 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question