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 9188403
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T19:59:51+00:00 2026-06-17T19:59:51+00:00

I have a webpage that I recently changed that works great on all browsers

  • 0

I have a webpage that I recently changed that works great on all browsers except for IE7. On IE7 I see the following:

SCRIPT1014: Invalid character blah.html, line 1 character 1

Screenshot:

enter image description here

I’ve reviewed the code several times and nothing sticks out. I know its a javascript error, but I can’t pinpoint where.

The frustrating part is not knowing where to look (line 1 character 1) and the error being vague.

  • 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-06-17T19:59:53+00:00Added an answer on June 17, 2026 at 7:59 pm

    Error in a Nutshell

    The problem was a javascript error inside a string in a call to window.setTimeout.

    More Detail

    The string in window.setTimeout([string], [int]) is executed as an eval, so it caused a javascript error during execution, which for me happened to be during the window onload event.

    Why did the error say “Invalid Character”?

    Because I used a # instead of a $ to start a jquery command. The javascript compiler didn’t know what to do with # so it threw an error.

    Why did the error report being on line 1 character 1?

    Since the string in the window.setTimeout is executed as an eval, the error was reported on line 1 character 1 – which finally makes sense!

    Sample html to replicate issue

    Here is a sample page I created demonstrating the issue:

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <title>Test Page</title>
        <script src="http://code.jquery.com/jquery-1.9.0.min.js"></script>
    </head>
    <body>
        <h1>Test Page</h1>
        <script type="text/javascript">
            $(document).ready(function(){
                window.setTimeout("#('#sdfl');", 1000);
            });
        </script>
    </body>
    </html>
    

    Resolution

    I accidentally used a # instead of a $ for a jquery command in the eval string. This is actually legacy code, so I refactored it to call a specific function rather than invoke an eval on a string (evil) so it now looks more like:

    window.setTimeout(function(){
          $('#sdfl');
       }, 1000);
    

    Note that with this change that finding the original error would’ve been much easier as it would’ve given a specific line and character number relative to the page rather than the eval string.

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

Sidebar

Related Questions

I have a webpage that activates a print job on a printer. This works
I have a webpage that is transferring A stylesheet as a text/plain MIME type.
I have a webpage that when landed on, will detect a user's physical location
I have a webpage that retrieves data (via ajax/php) and shows it in an
I have a webpage that redirects to another webpage like this: http://www.myOtherServer.com/Sponsor.php?RedirectPage=http://mylink.com/whereIwasgoingtogo.html Then the
I have a webpage that displays a very large list of data. Since this
I have a webpage that I don't have the ability to change the underlying
I have a webpage that displays a calendar, and I want to change the
I have a webpage that contains a form, and i need to refresh the
I have a webpage that has 3 file inputs. There are specific fields on

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.