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

  • SEARCH
  • Home
  • 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 4615480
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T01:50:45+00:00 2026-05-22T01:50:45+00:00

I wrote this script awhile back and have modified it to use css sprites

  • 0

I wrote this script awhile back and have modified it to use css sprites to cut down on images. Everything works perfect in ie9 and ff4, however, I noticed it will not show in ie7/ie8… It must be a css or js problem, but I certainly cannot see anything that would be preventing the older ie’s from displaying the code…

I have included the entire contents below in a ‘test’ page which includes everything… if someone can point me out to why this is not working in ie7 or ie8 I would be very grateful!

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<style type="text/css">    
#social16 {height:16px;font-size:13px; color:#0066ff; font-weight:bold;}
#sb16 {margin: 0px; padding:0px; height:16px; display: inline;line-height:16px;}
#sb16 li {list-style-type:none;float:left;padding:0 5px 0 0;}
#sb16 li a {background:url(social.png);background-repeat:no-repeat;display: block;height: 16px;width:16px;}
#sb16 li a.item0 {background-position:0px 0px;}
#sb16 li a.item1 {background-position:-16px 0px;}
#sb16 li a.item2 {background-position:-32px 0px;}
#sb16 li a.item3 {background-position:-48px 0px;}
#sb16 li a.item4 {background-position:-64px 0px;}
#sb16 li a.item5 {background-position:-80px 0px;}
#sb16 li a.item6 {background-position:-96px 0px;}
</style>
</head>
<body>
<div id="social16"></div>
<script type="text/javascript">
(function(){

var sites = [
        ['Send to Facebook', 'http://www.facebook.com/sharer.php?u={url}&amp;t={title}'],
        ['Tweet This', 'http://twitter.com/share?text={title}&amp;url={url}'],
        ['Send to StumbleUpon', 'http://www.stumbleupon.com/submit?url={url}&amp;title={title}'],
        ['Digg This', 'http://digg.com/submit?phase=2&amp;url={url}&amp;title={title}'],
        ['Send to GoogleBuzz', 'http://www.google.com/buzz/post?message={title}&amp;url={url}'],        
        ['Send to Reddit', 'http://reddit.com/submit?url={url}&amp;title={title}'],
        ['Email to Friends', 'mailto:?subject={title}&amp;body={url}'],
    ];

var url = encodeURIComponent(location.href),
    url = url.replace( "#", "" ),
    title = encodeURIComponent(document.title),
    html = '<ul id="sb16"><li>Share this ... </li>';

for (var i = 0, len = sites.length; i < len; i++) {
    var site = sites[i],
    link = site[1].replace('{url}', url).replace('{title}', title);

    html += '<li><a class="item' + i + '" href="#" title="' + site[0] + '" onclick="window.open(\'' + link + '\')"></a></li>';
}

html += '</ul>';

document.getElementById("social16").innerHTML=(html);

})();
</script>
</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-22T01:50:46+00:00Added an answer on May 22, 2026 at 1:50 am

    You have a comma after the last element of sites:

    var sites = [
        //...
        ['Email to Friends', 'mailto:?subject={title}&amp;body={url}'],
        // -----------------------------------------------------------^
    ];
    

    IE6 and IE7 don’t like that. This usually shows up as a null at the end of the array and you end up with a null where you don’t expect one.

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

Sidebar

Related Questions

So I wrote this short script (correct word?) to download the comic images from
This script I wrote works perfect on IE! It works on Chrome and FireFox
This is a crude korn shell script that someone else wrote. I don't know
I wrote this code I have these errors Cannot implicitly convert type x.Program.TreeNode' to
If I wrote this code: typeof(myType).TypeHandle Would it use reflection? How much different from:
Hi guys I wrote this code and i have two errors. Invalid rank specifier:
I wrote this sh script here. What it suppose to be doing is it
I wrote this script to find all files/directories to which $WWWUSER has write permissions.
I'm trying to write a python script that packages our software. This script needs
I need to write a java script. This is supposed to validate if the

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.