Javascript Drop Down Menu Issue. Replacing Text of the Menu

Discussion in 'Javascript' started by Ivann, Jul 22, 2008.

  1. Ivann

    Ivann Guest

    Hi All,

    I have a javascript/css menut that i have which i start when the html
    page loads.

    <script type="text/javascript">cssdropdown.startchrome("chromemenu")</
    script>
    ***THIS IS IN THE BODY*****

    What i am trying to do is replace the text inside of a div <a> link.
    So that i Translate the text into spanish. When the user hovers on
    this 'Attractions' it brings up the menu below. But after i make the
    javascript function call below it swaps the text with the new one
    below in spanish, but no longer have the drop down menu below. Do i
    need to make the function call to restart the javascript menu again?

    <A rel="attractions" onclick="loadxmlfile(load); return false;"
    href="#">
    Attractions

    </A>


    <div id="attractions" class="dropmenudiv" >

    <li>
    <A href="attractions.html" onclick="loadxmlfile('english/
    attractions.xml'); return false;" >
    View All
    </A>
    </li>


    Here are my javascript functions.

    function translateesp(){

    document.getElementById("attractionsli").innerHTML = '<A
    rel="attracions" onclick="loadxmlfile(\'espanol/attractions.xml\');
    return false;" href="#">Attraciones </A>';

    document.getElementById("attractions").innerHTML ='<li><A
    href="attractions.html" onclick="loadxmlfile(\'espanol/attractions.xml
    \'); return false;" >Ver Todas</A></li>';


    }
     
    Ivann, Jul 22, 2008
    #1
    1. Advertising

  2. Ivann

    Ivann Guest

    Ivann, Jul 22, 2008
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. SirPoonga
    Replies:
    2
    Views:
    793
    Ben Strackany
    Jan 7, 2005
  2. weiwei
    Replies:
    0
    Views:
    1,040
    weiwei
    Jan 5, 2007
  3. msimmons
    Replies:
    0
    Views:
    507
    msimmons
    Jul 16, 2009
  4. Replies:
    5
    Views:
    288
  5. Replies:
    3
    Views:
    304
Loading...

Share This Page