Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New Coder
    Join Date
    Feb 2004
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts

    MouseOver text on slide images

    Please help me add in code that allow Mouse-Over image would
    display the file name of that image (but not full path).

    Thx

    ======Code=========

    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html;">
    <title>Andrew 1st Month</title>
    <link rel="stylesheet" href="http://www.jasonanhkhoa.com/HTML/AndrewStyle01.css" type="text/css">

    <script type="text/javascript">
    <!--
    var imgarray = new Array();
    imgarray[imgarray.length] = new Array("http://www.jasonanhkhoa.com/Images/Andrew/2004/1stMonth/Andrew013004_08.jpg","");
    imgarray[imgarray.length] = new Array("http://www.jasonanhkhoa.com/Images/Andrew/2004/1stMonth/Andrew013004_09.jpg","");
    imgarray[imgarray.length] = new Array("http://www.jasonanhkhoa.com/Images/Andrew/2004/1stMonth/Andrew013004_10.jpg","");
    function nextimg(){

    num=(num==imgarray.length-1)?0:num+1;
    document.getElementById("change").src=imgarray[num][0];
    document.getElementById("discription").replaceChild(document.createTextNode(imgarray[num][1]), document.getElementById("discription").firstChild);}


    function previmg(){

    num=(num==0)?imgarray.length-1:num-1;
    document.getElementById("change").src=imgarray[num][0];
    document.getElementById("discription").replaceChild(document.createTextNode(imgarray[num][1]), document.getElementById("discription").firstChild);}


    function rotateimg(){

    if(n==1){

    nextimg();

    window.setTimeout("rotateimg()",time_delay);}}


    function cycleimg(){

    n=(n==0)?1:0;
    document.getElementById("cycle").value=(n==1)?"Stop Cycling Images":"Start Cycling Images";
    document.getElementById("prev").disabled=(n==1)?true:false;
    document.getElementById("next").disabled=(n==1)?true:false;

    if(n==1){window.setTimeout("rotateimg()",time_delay);}}

    //--></script>

    </head>

    <body>

    <center><BOLD><FONT FACE="ThaHuong 1.1" size=5 color=Blue>
    <div id="discription">Andrew 1st Month</div>
    <form id="control">
    <img src="http://www.jasonanhkhoa.com/Images/Andrew/2004/1stMonth/Andrew012604_01.jpg" border="0" id="change"></a><br>
    <input type="button" id="prev" class="but" onclick="previmg();" value="Previous Image">
    <input type="button" id="next" class="but" onclick="nextimg();" value="Next Image">
    <input type="button" id="cycle" class="but" onclick="cycleimg();" value="Start Cycling Images">

    </form>
    </center>
    </body>
    In The Name of Love!

  • #2
    Senior Coder
    Join Date
    Jun 2002
    Location
    Nashua, NH
    Posts
    1,724
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Set title attribute of the image element to whatever string you would like to pop up.
    Vladdy | KL
    "Working web site is not the one that looks the same on common graphical browsers running on desktop computers, but the one that adequately delivers information regardless of device accessing it"

  • #3
    New Coder
    Join Date
    Feb 2004
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts
    hello Vladdy
    Please give sample, I have tried "alt=nnnn" many places in the code but it would not show. If I set ALT in <IMG> within the FORM
    then it would show same ALT text for all images.

    Thx
    Last edited by Q2004; 02-09-2004 at 05:40 PM.
    In The Name of Love!


  •  

    Posting Permissions

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