Go Back   CodingForums.com > :: Client side development > JavaScript programming

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 10-18-2012, 11:41 AM   PM User | #1
JayDerk
New to the CF scene

 
Join Date: Oct 2012
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
JayDerk is an unknown quantity at this point
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!
JayDerk is offline   Reply With Quote
Old 10-18-2012, 12:14 PM   PM User | #2
Philip M
Supreme Master coder!

 
Philip M's Avatar
 
Join Date: Jun 2002
Location: London, England
Posts: 17,036
Thanks: 197
Thanked 2,411 Times in 2,389 Posts
Philip M has a spectacular aura aboutPhilip M has a spectacular aura aboutPhilip M has a spectacular aura about
<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.
Philip M is offline   Reply With Quote
Old 10-18-2012, 12:57 PM   PM User | #3
JayDerk
New to the CF scene

 
Join Date: Oct 2012
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
JayDerk is an unknown quantity at this point
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.
JayDerk is offline   Reply With Quote
Old 10-18-2012, 01:47 PM   PM User | #4
Logic Ali
Regular Coder

 
Logic Ali's Avatar
 
Join Date: Sep 2010
Location: London
Posts: 959
Thanks: 0
Thanked 198 Times in 193 Posts
Logic Ali will become famous soon enoughLogic Ali will become famous soon enough
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.
Logic Ali is online now   Reply With Quote
Old 10-18-2012, 04:54 PM   PM User | #5
JayDerk
New to the CF scene

 
Join Date: Oct 2012
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
JayDerk is an unknown quantity at this point
Thanks for the help.

I think we're going to get it re-written.
JayDerk is offline   Reply With Quote
Reply

Bookmarks

Tags
browsers, chrome, code, html, javascript

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 03:04 PM.


Advertisement
Log in to turn off these ads.