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 5 of 5
  1. #1
    New to the CF scene
    Join Date
    Oct 2012
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    How do I fix this site?!! Click throughs work in IE but nothing else

    I need to fix www.rula.co.uk

    It currently works in IE but nothing else. I need it to work in chrome.

    The javascript has thrown me completely!

    From the assessment pages, users should be able to click an image and then "move on" to the next page but this is not happening.

    Any help greatly appreciated!

  • #2
    Supreme Master coder! Philip M's Avatar
    Join Date
    Jun 2002
    Location
    London, England
    Posts
    17,926
    Thanks
    203
    Thanked 2,531 Times in 2,509 Posts
    <SCRIPT LANGUAGE="javascript">
    <!--//

    This tells me that this is very old code.

    <script language=javascript> is long deprecated. Use <script type = "text/javascript"> instead (in fact also deprecated but still necessary for IE<9).The <!-- and //--> comment (hiding) tags have not been necessary since IE3 (i.e. since September 1997). If you see these in some published script it is a warning that you are looking at ancient and perhaps unreliable code.

    As this seems to be a commercial application you might consider paying a professional to bring the whole site up-to-date.

    "His lack of education is more than compensated for by his keenly developed moral bankruptcy." - Woody Allen - US movie actor, comedian, & director (1935 - )

    All the code given in this post has been tested and is intended to address the question asked.
    Unless stated otherwise it is not just a demonstration.

  • #3
    New to the CF scene
    Join Date
    Oct 2012
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks for that.

    Have you taken a look at the javascript?

    Do you know what I need to add to the if statement to make it recognise chrome?

    As far as I can see it only recognises IE and the old netscape.

  • #4
    Senior Coder Logic Ali's Avatar
    Join Date
    Sep 2010
    Location
    London
    Posts
    1,028
    Thanks
    0
    Thanked 207 Times in 202 Posts
    The problem seems to arise from misuse of document.getElementById.

    Start the error console in FireFox and press [Clear].

    Reload your page and you will see error messages relating to your pages similar this:

    TypeError: document.getElementById("icon4") is null
    Source File: http://www.rula.co.uk/rula_scripts.js
    Line: 260

    Find all the elements referenced, and give them an ID that matches their current name attribute.

  • #5
    New to the CF scene
    Join Date
    Oct 2012
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks for the help.

    I think we're going to get it re-written.


  •  

    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
    •