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 4 of 4
  1. #1
    New Coder
    Join Date
    Apr 2009
    Posts
    12
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Arrow next and previous links not working in firefox

    hi i have an image gallery but the next and previous link does not work in firefox.
    if someone could give me some help it would be very much appreciated.
    here is the code:-
    ------------------------------------------------------------------------

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <HTML>



    <head>

    <title></title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

    <link rel="stylesheet" type="text/css" href="../css/gallery.css">

    <script type="text/javascript">
    var currentImage = 1;

    function LoadGallery(picNum, captionText)
    {
    var footer = document.getElementById("footer");
    // get the array of all <a> elements in the footer:
    var links = footer.getElementsByTagName("a");
    // and unclick (change color back to normal) of the current link:
    links[currentImage].style.color = "#ffffff";

    // then change which is current image
    currentImage = picNum; // save current picture number
    // and change color of new current link:
    links[currentImage].style.color = "#ff9900";

    // rest the same
    var picture = document.getElementById("portraits1");
    if (picture.filters)
    {
    picture.style.filter="blendTrans(duration=1)";
    picture.filters.blendTrans.Apply();
    }
    picture.src = "../images/Portraits/" + picNum + ".jpg";
    if (picture.filters)
    {
    picture.filters.blendTrans.Play();
    }
    document.getElementById("topbar").innerHTML = captionText;

    return false; // cancel the click
    }

    function moveBy(what)
    {
    // where is user asking us to move to??
    var moveTo = currentImage + what;
    if ( moveTo < 1 || moveTo > 20 ) return; // can't move too far left or right

    var footer = document.getElementById("footer");
    // get the array of all <a> elements in the footer:
    var links = footer.getElementsByTagName("a");
    // and then click on that link:
    links[moveTo].click( );

    return false; // cancel the click
    }
    </script>




    <script type="text/JavaScript">
    function activate(link){
    if(document.getElementById)
    document.getElementById(link).focus();
    else if (document.all)
    document.all(link).focus();
    }
    </script>





    </head>




    <body onload="activate('act');">

    <!-- Begin Wrapper -->
    <div id="wrapper">



    <!-- Begin Left Column -->
    <div id="topbar" class="center"><a href="1.jpg">Pop Music Quiz - Esquire (UK)
    </a> </div>



    <div id="content_holder">


    <div id="content_box2"><img src="../images/Portraits/1.jpg" name="portraits1" width="666" height="450" id="portraits1"> </div>


    <div id="footer" align="center">
    <a href="#" onclick="return moveBy(-1)">&lt;</a>&nbsp;&nbsp;

    <a href="#" id="act" onfocus="this.style.color='ff9900'" onblur="this.style.color=''"
    onclick="return LoadGallery(1,'Pop Music Quiz - Esquire (UK)')">1</a>
    - <a href="#" onclick="return LoadGallery(2,'Ronnie Wood - Personal')">2</a>
    - <a href="#" onclick="return LoadGallery(3,'Denys Lasdun - Guardian Review')">3</a>
    - <a href="#" onclick="return LoadGallery(4,'Sam West - Guardian Review')">4</a>
    - <a href="#" onclick="return LoadGallery(5,'Alan Lamb - Brown Shipley Bank ')">5</a>
    - <a href="#" onclick="return LoadGallery(6,'Tony Blair Vís Gordon Brown - FT ')">6</a>
    - <a href="#" onclick="return LoadGallery(7,'Bruce Willis - Times Eye')">7</a>
    - <a href="#" onclick="return LoadGallery(8,'The Thick Of It - Guardian Guide')">8</a>
    - <a href="#" onclick="return LoadGallery(9,'President Mugabe - Personal')">9</a>
    - <a href="#" onclick="return LoadGallery(10,'Conrad Black - FT')">10</a>
    - <a href="#" onclick="return LoadGallery(11,'Ricardo Mutti - Independent')">11</a>
    - <a href="#" onclick="return LoadGallery(12,'Gordon Brown and Alistair Darling - GQ')">12</a>
    - <a href="#" onclick="return LoadGallery(13,'Mickey Rourke - Jack')">13</a>
    - <a href="#" onclick="return LoadGallery(14,'Brits and Germans - Legal Business')">14</a>
    - <a href="#" onclick="return LoadGallery(15,'Orphan Pamuk - Guardian Guide')">15</a>
    - <a href="#" onclick="return LoadGallery(16,'Jude Law - Independent ')">16</a>
    - <a href="#" onclick="return LoadGallery(17,'Yasser Arafat - Personal')">17</a>
    - <a href="#" onclick="return LoadGallery(18,'Graham Greene - Guardian Review ')">18</a>
    - <a href="#" onclick="return LoadGallery(19,'Russian Presidents - FT')">19</a>
    - <a href="#" onclick="return LoadGallery(20,'Wacko Jacko - Personal')">20</a>
    &nbsp;&nbsp;<a href="#" onclick="return moveBy(+1)">&gt;</a>
    &nbsp;&nbsp;<a href="../../index.html" target="_parent">[ home ]</a> </div>
    </div>


    </div>
    <!-- End Wrapper -->

    </body>
    </html>

  • #2
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,801
    Thanks
    160
    Thanked 2,216 Times in 2,203 Posts
    Blog Entries
    1
    Check for any errors in your code using Firebug.
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)

  • #3
    New Coder
    Join Date
    Apr 2009
    Posts
    12
    Thanks
    4
    Thanked 0 Times in 0 Posts
    I believe onclick is not supported by firefox, is there an alternative ???

  • #4
    Regular Coder
    Join Date
    Feb 2009
    Location
    Wheeling, IL
    Posts
    358
    Thanks
    5
    Thanked 62 Times in 60 Posts
    Quote Originally Posted by cscwebmaster View Post
    I believe onclick is not supported by firefox, is there an alternative ???
    News to me. I've used it more than once and it has worked quite well.
    The way to success is to assume that there are no impossible things. After all, if you think something is impossible, you will not even try to do it.

    How to ask smart questions?


  •  

    Tags for this Thread

    Posting Permissions

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