The forums have permanently moved to forum.kirupa.com. This forum will be kept around in read-only mode for archival purposes. To learn how to continue using your existing account on the new forums, check out this thread.


Results 1 to 3 of 3

Thread: Javascript

  1. #1

    Javascript

    If anybody knows the javascript which writes description to a specified area of webpage, of a link, as soon as we bring the mouse pointer over the link.


    Thanks in advance

  2. #2
    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
     <head>
      <title>JS Test</title>
      <script type="text/javascript">
      <!-- For Example 1 -->
       function showDescription(ourDesc){
         document.showDesc.fullDesc.value = ourDesc;
       }
    
      <!-- For Example 2 -->
       function showDescriptionA(ourDesc){
         document.getElementById('anotherFullDesc').innerHTML = ourDesc;
       }
      </script>
     </head>
     <body>
      <!-- Example 1 -->
      <form name="showDesc">
       <textarea name="fullDesc"></textarea>
      </form>
      <a href="http://www.google.com" onmouseover="showDescription('Visit Google')"; onmouseout="showDescription('')" title="Google">Google</a>
    
      <!-- Example 2 -->
      <div id="anotherFullDesc">&nbsp;</div>
      <a href="http://www.google.com" onmouseover="showDescriptionA('Again Visit Google')"; onmouseout="showDescriptionA('&nbsp;')" title="Google">Google</a>
    
    
     </body>
    </html>
    Not sure where you want to write a description to so here's 2 (simple) examples. The first example writes to a textarea field and the second to a DIV using getElementById.
    Γνώθι Σεαυτόν

  3. #3
    Quote Originally Posted by Ankou
    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
     <head>
      <title>JS Test</title>
      <script type="text/javascript">
      <!-- For Example 1 -->
       function showDescription(ourDesc){
         document.showDesc.fullDesc.value = ourDesc;
       }
    
      <!-- For Example 2 -->
       function showDescriptionA(ourDesc){
         document.getElementById('anotherFullDesc').innerHTML = ourDesc;
       }
      </script>
     </head>
     <body>
      <!-- Example 1 -->
      <form name="showDesc">
       <textarea name="fullDesc"></textarea>
      </form>
      <a href="http://www.google.com" onmouseover="showDescription('Visit Google')"; onmouseout="showDescription('')" title="Google">Google</a>
    
      <!-- Example 2 -->
      <div id="anotherFullDesc">&nbsp;</div>
      <a href="http://www.google.com" onmouseover="showDescriptionA('Again Visit Google')"; onmouseout="showDescriptionA('&nbsp;')" title="Google">Google</a>
    
    
     </body>
    </html>
    Not sure where you want to write a description to so here's 2 (simple) examples. The first example writes to a textarea field and the second to a DIV using getElementById.
    I GOT IT,Thanks alot for that..

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Home About kirupa.com Meet the Moderators Advertise

 Link to Us

 Credits

Copyright 1999 - 2012