SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Guru
    Join Date
    Dec 2008
    Posts
    692
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    displayig the data on mouseover of a link

    var content=new Array()
    //change the array below to the text associated with your links Expand or contract the array, depending on how many links you have
    content[0]='<br><big><b>Menus and navigation systems</b></big><br>Click here for DHTML scripts that help enhance your site\'s navigability, such as collapsible menus, sliding menu bars etc.'
    content[1]='<br><big><b>Special document effects</b></big><br>With the advent of DHTML, webpages are one step closer to its cousin, TV, in terms of special effects...'
    content[2]='<br><big><b>Scrollers</b></big><br>Up until now, adding a scroller or tickertape to your website usually meant using a slow Java applet. Not anymore. Click here for DHTML scrollers that accomplish the same task with minimal download time.'
    content[3]='<br><big><b>Image effects</b></big><br>Add lightweight effects to your existing images using these scripts. Make them fly, light up, turn static, all without paying the cost of slow downloading time.'
    content[4]='<br><big><b>Links and buttons</b></big><br>Add tooltips to your text links, rollover effects to your form buttons, keyboard features to your document, and more.'
    content[5]='<br><big><b>Dynamic clocks and dates</b></big><br>Time is never static, so why should your time script be? Enter for DHTML scripts that actually understand this simple truth.'
    content[6]='<br><big><b>Text animations</b></big><br>Text have been silent for too long- DHTML promises to free them, with flying text, typing text, dragable text, and more.'
    content[7]='<br><big><b>Browser window</b></big><br>Click here scripts related to the browser window and frames.'
    content[8]='<br><big><b>Other</b></big><br>All scripts that don\'t comfortably fit in any of the above categories go here...'


    i have the following links

    <a href="../dynamicindex1/index.html" onMouseover="changetext(content[0])"><small>Menus
    and Navigation Systems</small></a><br>
    <a href="../dynamicindex3/index.html" onMouseover="changetext(content[1])"><small>Special&nbsp;document
    effects</small></a><br>
    <a href="../dynamicindex2/index.html" onMouseover="changetext(content[2])"><small>Scrollers</small></a><br>
    <a href="../dynamicindex4/index.html" onMouseover="changetext(content[3])"><small>Image
    effects</small></a><br>
    <a href="index.html" onMouseover="changetext(content[4])"><small>Links and buttons</small></a><br>
    <a href="../dynamicindex6/index.html" onMouseover="changetext(content[5])"><small>Dynamic
    Clocks and dates</small></a><br>
    <a href="../dynamicindex10/index.html" onMouseover="changetext(content[6])"><small>Text
    animations</small></a><br>
    <a href="../dynamicindex8/index.html" onMouseover="changetext(content[7])"><small>Browser
    Window</small></a><br>
    <a href="../dynamicindex11/index.html" onMouseover="changetext(content[8])"><small>Other</small></a>

    when the mouse moves over first link it shld display content[0]
    second link it shld display content[1]... & so on..

    how do i do with javascript

  2. #2
    rajug.replace('Raju Gautam'); bronze trophy Raju Gautam's Avatar
    Join Date
    Oct 2006
    Location
    Kathmandu, Nepal
    Posts
    4,013
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I think you are trying for tool tip. See this
    http://www.walterzorn.com/tooltip/tooltip_e.htm
    Mistakes are proof that you are trying.....
    ------------------------------------------------------------------------
    PSD to HTML - SlicingArt.com | Personal Blog | ZCE - PHP 5

  3. #3
    SitePoint Guru
    Join Date
    Dec 2008
    Posts
    692
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ya its tooptip text but detailed . i tried with the link but i get some invalid arguments error

  4. #4
    rajug.replace('Raju Gautam'); bronze trophy Raju Gautam's Avatar
    Join Date
    Oct 2006
    Location
    Kathmandu, Nepal
    Posts
    4,013
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by svibuk View Post
    ya its tooptip text but detailed . i tried with the link but i get some invalid arguments error
    There are lots of examples in the page. Please look on them and try yourself. Until you show us how you have done so far, we cannot say the answer that which causing the error.
    Mistakes are proof that you are trying.....
    ------------------------------------------------------------------------
    PSD to HTML - SlicingArt.com | Personal Blog | ZCE - PHP 5

  5. #5
    SitePoint Guru
    Join Date
    Dec 2008
    Posts
    692
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    var content=new Array()
    //change the array below to the text associated with your links Expand or contract the array, depending on how many links you have
    content[0]='<br><big><b>Menus and navigation systems</b></big><br>Click here for DHTML scripts that help enhance your site\'s navigability, such as collapsible menus, sliding menu bars etc.'
    content[1]='<br><big><b>Special document effects</b></big><br>With the advent of DHTML, webpages are one step closer to its cousin, TV, in terms of special effects...'
    content[2]='<br><big><b>Scrollers</b></big><br>Up until now, adding a scroller or tickertape to your website usually meant using a slow Java applet. Not anymore. Click here for DHTML scrollers that accomplish the same task with minimal download time.'
    content[3]='<br><big><b>Image effects</b></big><br>Add lightweight effects to your existing images using these scripts. Make them fly, light up, turn static, all without paying the cost of slow downloading time.'
    content[4]='<br><big><b>Links and buttons</b></big><br>Add tooltips to your text links, rollover effects to your form buttons, keyboard features to your document, and more.'
    content[5]='<br><big><b>Dynamic clocks and dates</b></big><br>Time is never static, so why should your time script be? Enter for DHTML scripts that actually understand this simple truth.'
    content[6]='<br><big><b>Text animations</b></big><br>Text have been silent for too long- DHTML promises to free them, with flying text, typing text, dragable text, and more.'
    content[7]='<br><big><b>Browser window</b></big><br>Click here scripts related to the browser window and frames.'
    content[8]='<br><big><b>Other</b></big><br>All scripts that don\'t comfortably fit in any of the above categories go here...'



    function regenerate(){
    window.location.reload()
    }
    function regenerate2(){
    if (document.layers){
    appear()
    setTimeout("window.onresize=regenerate",450)
    }
    }

    function changetext(whichcontent){

    if (document.all||document.getElementById){
    cross_el=document.getElementById? document.getElementById("descriptions"):document.all.descriptions
    cross_el.innerHTML='<font face="Verdana"><small>'+whichcontent+'<font></small>'
    }
    else if (document.layers){
    document.d1.document.d2.document.write('<font face="Verdana"><small>'+whichcontent+'</small></font>')
    document.d1.document.d2.document.close()
    }

    }

    function appear(){
    document.d1.visibility='show'
    document.getElementById("showdiv").style.visibility ='block'
    }

    window.onload=regenerate2











    i have the following links

    <a href="../dynamicindex1/index.html" onMouseover="changetext(content[0])"><small>Menus
    and Navigation Systems</small></a><br>
    <a href="../dynamicindex3/index.html" onMouseover="changetext(content[1])"><small>Special&nbsp;document
    effects</small></a><br>
    <a href="../dynamicindex2/index.html" onMouseover="changetext(content[2])"><small>Scrollers</small></a><br>
    <a href="../dynamicindex4/index.html" onMouseover="changetext(content[3])"><small>Image
    effects</small></a><br>
    <a href="index.html" onMouseover="changetext(content[4])"><small>Links and buttons</small></a><br>
    <a href="../dynamicindex6/index.html" onMouseover="changetext(content[5])"><small>Dynamic
    Clocks and dates</small></a><br>
    <a href="../dynamicindex10/index.html" onMouseover="changetext(content[6])"><small>Text
    animations</small></a><br>
    <a href="../dynamicindex8/index.html" onMouseover="changetext(content[7])"><small>Browser
    Window</small></a><br>
    <a href="../dynamicindex11/index.html" onMouseover="changetext(content[8])"><small>Other</small></a>




    <ilayer id="d1" width="200" height="200" visibility="hide">

    <layer id="d2" width="300" height="200">
    <div id="descriptions" style="text-align:left;">



    <br/>


    </div>

    </layer>
    </ilayer>



    this works fine iwth IE but problem with FF


    with teh examples from recent links which u provided


    <a href="../dynamicindex1/index.html" onmouseover="HideMaster();Tip('u r text detailes here');" onmouseout="UnTip()" ><small>Menus
    and Navigation Systems</small></a><br>

    bu t for this i get invalid argument error


Bookmarks

Posting Permissions

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