Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6591413
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T17:25:12+00:00 2026-05-25T17:25:12+00:00

Usually I hear about code working under things apart from IE but Ive got

  • 0

Usually I hear about code working under things apart from IE but Ive got the opposite problem.

Here’s the link :

http://www.underagedriving.co.uk/ins/timeclick2.php

And a snapshot of the code that doesnt kick any errors under IE but wont play ball with anything else (Opera, iPhone Safari, Chrome, FF)

I know its going to be something daft but having worked on this all day (Im not a proper coder) when it wasnt playing ball my eyes kinda glazed over .

Any help appreciated pointing me in the right direction 🙂

Thanks, Rik

<html>
<head>

<script type="text/javascript">

var arr = new Array();                                  // Create our array
var convexisting = " ";                                 // Create a blank variable we check later

if (!Array.prototype.indexOf)                               // IE8 and below
{ 
    Array.prototype.indexOf = function(elt /*, from*/) 
    { 
        var len = this.length >>> 0; 

        var from = Number(arguments[1]) || 0; 
        from = (from < 0) 
            ? Math.ceil(from) 
            : Math.floor(from); 
        if (from < 0) 
        from += len; 

        for (; from < len; from++) 
        { 
        if (from in this && 
            this[from] === elt) 
            return from; 
        } 
        return -1; 
    }; 
}   

function toggleimg(itemname)
{
    if (document.getElementById(itemname).src == 'http://www.underagedriving.co.uk/ins/yellow.gif')     // If its yellow that means its not set
    {
        document.getElementById(itemname).src = 'http://www.underagedriving.co.uk/ins/blue.gif';    // Change colour to blue
        arr.push(itemname);                                         // Add item to array
        }
    else
    {
        document.getElementById(itemname).src = 'http://www.underagedriving.co.uk/ins/yellow.gif';  // If its already blue, deselect it by turning yellow
        arr.splice(arr.indexOf(itemname), 1);                               // Remove it from array

    }   
}

function checkform(form)                                            // On submit fix the array to send to PHP
{
    form.availabilityarray.value = arr.join(",");                   // Concat our array data in a CSV string to submit via the form
        return true ;                                   // Allow submitting of the form data
}

function preprocess()                                   // Has to be a function after body load
{
        // If array ready to be processed

    if (convexisting != " ")                            // Check our test var is not blank
    {
        var arr = convexisting.split(",");                  // Split our CSV data for the grid back into an array
        for (var i = 0; i < arr.length; i++) toggleimg(arr[i]);         // For each entry in array run toggleimg
    }
}   

</script>

<body onload="javascript:preprocess();">

<form name="claimform" method="POST" action="http://www.underagedriving.co.uk/ins/timeclick2.php" enctype="multipart/form-data" onsubmit="return checkform(this);">

<table width="700" cellspacing=0 cellpadding=0 border=0>
<tr>
<td width="200">&nbsp;</td><td width="500"><img src='hours.gif' border=0></td>
</tr>    

<tr><td align='right'> Fri 07/10/2011 &nbsp; </td><td><a href="javascript:void(0)" onclick="javascript:toggleimg('20111007row05col00');"><img src='yellow.gif' name='20111007row05col00' border=0></a><a href="javascript:void(0)" onclick="javascript:toggleimg('20111007row05col01');"><img src='yellow.gif' name='20111007row05col01' border=0></a><a href="javascript:void(0)" onclick="javascript:toggleimg('20111007row05col02');"><img src='yellow.gif' name='20111007row05col02' border=0></a><a href="javascript:void(0)" onclick="javascript:toggleimg('20111007row05col03');"><img src='yellow.gif' name='20111007row05col03' border=0></a><a href="javascript:void(0)" onclick="javascript:toggleimg('20111007row05col04');"><img src='yellow.gif' name='20111007row05col04' border=0></a><a href="javascript:void(0)" onclick="javascript:toggleimg('20111007row05col05');"><img src='yellow.gif' name='20111007row05col05' border=0></a><a href="javascript:void(0)" onclick="javascript:toggleimg('20111007row05col06');"><img src='yellow.gif' name='20111007row05col06' border=0></a><a href="javascript:void(0)" onclick="javascript:toggleimg('20111007row05col07');"><img src='yellow.gif' name='20111007row05col07' border=0></a><a href="javascript:void(0)" onclick="javascript:toggleimg('20111007row05col08');"><img src='yellow.gif' name='20111007row05col08' border=0></a><a href="javascript:void(0)" onclick="javascript:toggleimg('20111007row05col09');"><img src='yellow.gif' name='20111007row05col09' border=0></a><a href="javascript:void(0)" onclick="javascript:toggleimg('20111007row05col10');"><img src='yellow.gif' name='20111007row05col10' border=0></a><a href="javascript:void(0)" onclick="javascript:toggleimg('20111007row05col11');"><img src='yellow.gif' name='20111007row05col11' border=0></a><a href="javascript:void(0)" onclick="javascript:toggleimg('20111007row05col12');"><img src='yellow.gif' name='20111007row05col12' border=0></a><a href="javascript:void(0)" onclick="javascript:toggleimg('20111007row05col13');"><img src='yellow.gif' name='20111007row05col13' border=0></a><a href="javascript:void(0)" onclick="javascript:toggleimg('20111007row05col14');"><img src='yellow.gif' name='20111007row05col14' border=0></a><a href="javascript:void(0)" onclick="javascript:toggleimg('20111007row05col15');"><img src='yellow.gif' name='20111007row05col15' border=0></a><a href="javascript:void(0)" onclick="javascript:toggleimg('20111007row05col16');"><img src='yellow.gif' name='20111007row05col16' border=0></a><a href="javascript:void(0)" onclick="javascript:toggleimg('20111007row05col17');"><img src='yellow.gif' name='20111007row05col17' border=0></a><a href="javascript:void(0)" onclick="javascript:toggleimg('20111007row05col18');"><img src='yellow.gif' name='20111007row05col18' border=0></a><a href="javascript:void(0)" onclick="javascript:toggleimg('20111007row05col19');"><img src='yellow.gif' name='20111007row05col19' border=0></a><a href="javascript:void(0)" onclick="javascript:toggleimg('20111007row05col20');"><img src='yellow.gif' name='20111007row05col20' border=0></a><a href="javascript:void(0)" onclick="javascript:toggleimg('20111007row05col21');"><img src='yellow.gif' name='20111007row05col21' border=0></a><a href="javascript:void(0)" onclick="javascript:toggleimg('20111007row05col22');"><img src='yellow.gif' name='20111007row05col22' border=0></a><a href="javascript:void(0)" onclick="javascript:toggleimg('20111007row05col23');"><img src='yellow.gif' name='20111007row05col23' border=0></a></td></tr>
<tr><td align='right'> Sat 08/10/2011 &nbsp; </td><td><a href="javascript:void(0)" onclick="javascript:toggleimg('20111008row06col00');"><img src='yellow.gif' name='20111008row06col00' border=0></a><a href="javascript:void(0)" onclick="javascript:toggleimg('20111008row06col01');"><img src='yellow.gif' name='20111008row06col01' border=0></a><a href="javascript:void(0)" onclick="javascript:toggleimg('20111008row06col02');"><img src='yellow.gif' name='20111008row06col02' border=0></a><a href="javascript:void(0)" onclick="javascript:toggleimg('20111008row06col03');"><img src='yellow.gif' name='20111008row06col03' border=0></a><a href="javascript:void(0)" onclick="javascript:toggleimg('20111008row06col04');"><img src='yellow.gif' name='20111008row06col04' border=0></a><a href="javascript:void(0)" onclick="javascript:toggleimg('20111008row06col05');"><img src='yellow.gif' name='20111008row06col05' border=0></a><a href="javascript:void(0)" onclick="javascript:toggleimg('20111008row06col06');"><img src='yellow.gif' name='20111008row06col06' border=0></a><a href="javascript:void(0)" onclick="javascript:toggleimg('20111008row06col07');"><img src='yellow.gif' name='20111008row06col07' border=0></a><a href="javascript:void(0)" onclick="javascript:toggleimg('20111008row06col08');"><img src='yellow.gif' name='20111008row06col08' border=0></a><a href="javascript:void(0)" onclick="javascript:toggleimg('20111008row06col09');"><img src='yellow.gif' name='20111008row06col09' border=0></a><a href="javascript:void(0)" onclick="javascript:toggleimg('20111008row06col10');"><img src='yellow.gif' name='20111008row06col10' border=0></a><a href="javascript:void(0)" onclick="javascript:toggleimg('20111008row06col11');"><img src='yellow.gif' name='20111008row06col11' border=0></a><a href="javascript:void(0)" onclick="javascript:toggleimg('20111008row06col12');"><img src='yellow.gif' name='20111008row06col12' border=0></a><a href="javascript:void(0)" onclick="javascript:toggleimg('20111008row06col13');"><img src='yellow.gif' name='20111008row06col13' border=0></a><a href="javascript:void(0)" onclick="javascript:toggleimg('20111008row06col14');"><img src='yellow.gif' name='20111008row06col14' border=0></a><a href="javascript:void(0)" onclick="javascript:toggleimg('20111008row06col15');"><img src='yellow.gif' name='20111008row06col15' border=0></a><a href="javascript:void(0)" onclick="javascript:toggleimg('20111008row06col16');"><img src='yellow.gif' name='20111008row06col16' border=0></a><a href="javascript:void(0)" onclick="javascript:toggleimg('20111008row06col17');"><img src='yellow.gif' name='20111008row06col17' border=0></a><a href="javascript:void(0)" onclick="javascript:toggleimg('20111008row06col18');"><img src='yellow.gif' name='20111008row06col18' border=0></a><a href="javascript:void(0)" onclick="javascript:toggleimg('20111008row06col19');"><img src='yellow.gif' name='20111008row06col19' border=0></a><a href="javascript:void(0)" onclick="javascript:toggleimg('20111008row06col20');"><img src='yellow.gif' name='20111008row06col20' border=0></a><a href="javascript:void(0)" onclick="javascript:toggleimg('20111008row06col21');"><img src='yellow.gif' name='20111008row06col21' border=0></a><a href="javascript:void(0)" onclick="javascript:toggleimg('20111008row06col22');"><img src='yellow.gif' name='20111008row06col22' border=0></a><a href="javascript:void(0)" onclick="javascript:toggleimg('20111008row06col23');"><img src='yellow.gif' name='20111008row06col23' border=0></a></td></tr>
<tr><td align='right'> Sun 09/10/2011 &nbsp; </td><td><a href="javascript:void(0)" onclick="javascript:toggleimg('20111009row07col00');"><img src='yellow.gif' name='20111009row07col00' border=0></a><a href="javascript:void(0)" onclick="javascript:toggleimg('20111009row07col01');"><img src='yellow.gif' name='20111009row07col01' border=0></a><a href="javascript:void(0)" onclick="javascript:toggleimg('20111009row07col02');"><img src='yellow.gif' name='20111009row07col02' border=0></a><a href="javascript:void(0)" onclick="javascript:toggleimg('20111009row07col03');"><img src='yellow.gif' name='20111009row07col03' border=0></a><a href="javascript:void(0)" onclick="javascript:toggleimg('20111009row07col04');"><img src='yellow.gif' name='20111009row07col04' border=0></a><a href="javascript:void(0)" onclick="javascript:toggleimg('20111009row07col05');"><img src='yellow.gif' name='20111009row07col05' border=0></a><a href="javascript:void(0)" onclick="javascript:toggleimg('20111009row07col06');"><img src='yellow.gif' name='20111009row07col06' border=0></a><a href="javascript:void(0)" onclick="javascript:toggleimg('20111009row07col07');"><img src='yellow.gif' name='20111009row07col07' border=0></a><a href="javascript:void(0)" onclick="javascript:toggleimg('20111009row07col08');"><img src='yellow.gif' name='20111009row07col08' border=0></a><a href="javascript:void(0)" onclick="javascript:toggleimg('20111009row07col09');"><img src='yellow.gif' name='20111009row07col09' border=0></a><a href="javascript:void(0)" onclick="javascript:toggleimg('20111009row07col10');"><img src='yellow.gif' name='20111009row07col10' border=0></a><a href="javascript:void(0)" onclick="javascript:toggleimg('20111009row07col11');"><img src='yellow.gif' name='20111009row07col11' border=0></a><a href="javascript:void(0)" onclick="javascript:toggleimg('20111009row07col12');"><img src='yellow.gif' name='20111009row07col12' border=0></a><a href="javascript:void(0)" onclick="javascript:toggleimg('20111009row07col13');"><img src='yellow.gif' name='20111009row07col13' border=0></a><a href="javascript:void(0)" onclick="javascript:toggleimg('20111009row07col14');"><img src='yellow.gif' name='20111009row07col14' border=0></a><a href="javascript:void(0)" onclick="javascript:toggleimg('20111009row07col15');"><img src='yellow.gif' name='20111009row07col15' border=0></a><a href="javascript:void(0)" onclick="javascript:toggleimg('20111009row07col16');"><img src='yellow.gif' name='20111009row07col16' border=0></a><a href="javascript:void(0)" onclick="javascript:toggleimg('20111009row07col17');"><img src='yellow.gif' name='20111009row07col17' border=0></a><a href="javascript:void(0)" onclick="javascript:toggleimg('20111009row07col18');"><img src='yellow.gif' name='20111009row07col18' border=0></a><a href="javascript:void(0)" onclick="javascript:toggleimg('20111009row07col19');"><img src='yellow.gif' name='20111009row07col19' border=0></a><a href="javascript:void(0)" onclick="javascript:toggleimg('20111009row07col20');"><img src='yellow.gif' name='20111009row07col20' border=0></a><a href="javascript:void(0)" onclick="javascript:toggleimg('20111009row07col21');"><img src='yellow.gif' name='20111009row07col21' border=0></a><a href="javascript:void(0)" onclick="javascript:toggleimg('20111009row07col22');"><img src='yellow.gif' name='20111009row07col22' border=0></a><a href="javascript:void(0)" onclick="javascript:toggleimg('20111009row07col23');"><img src='yellow.gif' name='20111009row07col23' border=0></a></td></tr>
<tr><td> <hr </td></tr>
</table>

<input type="hidden" name="availabilityarray" value="">
<input type="submit" value="Submit Hours">

</form>

</body>
</html>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T17:25:13+00:00Added an answer on May 25, 2026 at 5:25 pm

    The name= attribute is meaningless on the <img> tags. If what you actually want is an id, then set the id= explicitly.

    You may want to familiarize yourself with the jQuery JS library. It makes a lot of tasks like this much easier.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I hear the term virtual adapter from time to time. But not exactly sure
Usually I tend to install things via the package manager, for unixy stuff. However,
I hear all this stuff about bazaar being slower than git. I haven't used
Usually I don't care about the value of the item in the set, I
Usually i just use a dictionay for key value pairs but I am expectig
I always hear the word token, eg. request a token. I usually replace that
Usually when I'm creating indexes on tables, I generally guess what the Fill Factor
Usually Flash and Flex applications are embedded on in HTML using either a combination
Usually when I need to fork in C, I do something like this: pid_t
Usually when I build a site, I put all the CSS into one file,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.