Solved

onMouseOver="self.status= Question

Posted on 2004-10-29
896 Views
Last Modified: 2008-03-03
I am sure this is an extremely easy question but I am having difficulty getting the below Javascript code work correctly.  I am trying to setup some dynanic links on my website and I want them to look and work just like the static links but I am getting a lot of Javascript errors.

The snippet of actual html is below.  The first link is a header while the second is a static link.  My dynamic link is the third parargraph and it is giving me the errors.

         <table>
          <tr>
(1)      <td height="20">
          <font face="verdana, arial, helvetica, sans-serif" size="1" color="#ADB1AE"><b>GENERAL INFO</b></font></td>
          </tr>
         
          <tr>
         <td height="20">
(2)     <a href="http://www.sovereignfunding.com/index.html" class="left">Home</a></td>
          </tr>
         
            <tr>
            <td height="20">
            <font face="verdana, arial, helvetica, sans-serif" size="1" color="#ADB1AE">
(3)        <script type="text/javascript" language="JavaScript1.2">
            <a href="http://www.sovereignfunding.com/index.html" onMouseOver="self.status='Our Philosophy'; return true;"
            onMouseOut="self.status='';">
            Our Philosophy</A> </tr>
           </script>
            <tr>

The fully functionning page is here: http://www.sovereignfunding.com/index.html (All static links on the left)
The test page is here:  http://www.sovereignfunding.com/index1.html => You will see that the Our Philosophy is missing underneath the Home Link.  I simpy want it to look like the other links but be dynamic.

Looking forward to hearing from anyone who can help.

Sincerely,

David Springer
SovereignFunding.com
0
Question by:d_springer
    9 Comments
     
    LVL 36

    Expert Comment

    by:Zyloch
    I'd like to say that using font tag is now deprecated, but to each their own

    You want this:

    <tr>
                <td height="20">
                <font face="verdana, arial, helvetica, sans-serif" size="1" color="#ADB1AE">
    (3)       <a href="http://www.sovereignfunding.com/index.html" onmouseover="self.status='Our Philosophy';return true;"
                onmouseout="self.status='';return true;">
                Our Philosophy</A> </tr>
                <tr>
    0
     
    LVL 33

    Expert Comment

    by:sajuks
    pardon my ignorance, but what do you want to do ? do you want to show something like a dsiplay on mouse over ?
            <script type="text/javascript" language="JavaScript1.2">
                <a href="http://www.sovereignfunding.com/index.html" onMouseOver="self.status='Our Philosophy'; return true;"
                onMouseOut="self.status='';">
                Our Philosophy</A> </tr>
               </script>
    should be
    <a href="http://www.sovereignfunding.com/index.html" title='Our Philosophy'; return true;" > Our Philosophy</A> </tr>
    0
     
    LVL 31

    Expert Comment

    by:GwynforWeb
     take out script tag as suggested, (you also have a </tr> instead of </td>)

          <tr>
              <td>
                <a href="http://www.sovereignfunding.com/index.html" onMouseOver="self.status='Our Philosophy'; return true;"
                 onMouseOut="self.status='';">
                 Our Philosophy</A>
               </td>
           <tr>

    but you may want to try this, a tooltip shows up

            <a href="http://www.sovereignfunding.com/index.html" title='Our Philosophy'>Our Philosophy</A>
               

    0
     
    LVL 31

    Expert Comment

    by:GwynforWeb
    oh sorry Sajuks I should have read your post more carefully. :-(

    d_springer , ignore my post
    0
     

    Author Comment

    by:d_springer
    GwynforWeb,

    Please view my test page here: http://www.sovereignfunding.com/index1.html

    That got rid of my errors but the link "Our Philosophy" doesn't look like all of the rest of the links?

    How do I fix that?

    Thanks in advance!!!

    David Springer
    SovereignFunding.com
    0
     
    LVL 31

    Accepted Solution

    by:
    you are missing the style class out

          <tr>
              <td>
                <a href="http://www.sovereignfunding.com/index.html" onMouseOver="self.status='Our Philosophy'; return true;"
                 onMouseOut="self.status='';" class=left>
                 Our Philosophy</A>
               </td>
           <tr>
    0
     
    LVL 31

    Expert Comment

    by:GwynforWeb
    cool, I see you have changed it :-)
    0
     
    LVL 31

    Expert Comment

    by:GwynforWeb
    ah you have it set it o a normal link, setting as above will give 'Our Philosophy' in the status bar
    0
     

    Author Comment

    by:d_springer
    GwynforWeb,

    Thanks a Million!

    David
    0

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone. Privacy Policy Terms of Use

    Featured Post

    Course: Foundations of Front-End Development

    Jump-start a lucrative career in front-end web development, with zero previous coding experience required. This course covers the basic programming concepts and languages required for creating engaging websites from scratch.

    No!  Not that kind of date. :-)  That wasn't meant to be a pick up line. This article is about displaying dates in different formats regardless of the browser being used.  If you let the browser's JavaScript engine format a date object for you, t…
    In my daily work (mainly using ASP.net), I need to write a lot of JavaScript code. One of the most repetitive tasks I do are the jQuery Ajax calls. You know: (CODE) I don't know if for you it's the same, but for me is soooo tedious to write the …
    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…

    875 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

    Need Help in Real-Time?

    Connect with top rated Experts

    12 Experts available now in Live!

    Get 1:1 Help Now