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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T11:36:43+00:00 2026-05-11T11:36:43+00:00

I get Error Object Expected on line 1, char 1 (where-ever this is) on

  • 0

I get Error ‘Object Expected’ on line 1, char 1 (where-ever this is) on my script here in IE7. It works fine in Firefox, and the error console prints nothing.

I tried multiple ways to call my function but none works:

<a href='javascript:doit()'>Turingmaschine starten</a> <a href='#' onclick='doit()'>Turingmaschine starten</a> 

What could be the problem?

<script type='text/javascript' language='JavaScript'>  var state; var index; var program; var data;  const S=0; const X=1; const S2=2; const X2=3; const M=4; const E='SE';  function doit() {     state=document.getElementById('stat').value;     program = document.getElementById('prog').value.split('\n');     index = document.getElementById('dat').value.indexOf('Z')>>1;     data = document.getElementById('dat').value.replace(/Z,/, '').split(',');      for (var i = 0; i<program.length; i++)     {         program[i]=program[i].split(',');     }      while(state!=E)     {         var i;         for (i = 0; i<program.length; i++)         {             if (program[i][S]==state && program[i][X]==data[index])             {                 state = program[i][S2];                 data[index] = program[i][X2]                 index+= parseInt(program[i][M]);                  data.splice(index,0,'Z');                  if (data[data.length-1]!='*')                 {                     data.push('*');                 }                 if (data[0]!='*')                 {                     data.unshift('*');                     index++;                 }                 document.getElementById('out').value+=state+': '+data+'\r\n';                  data.splice(index,1);                  break;             }         }          if (i==program.length)             break;     }      document.getElementById('out').value+='Done.\r\n'; }  </script> 
  • 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. 2026-05-11T11:36:43+00:00Added an answer on May 11, 2026 at 11:36 am

    Const is not supported by IE. It is specific to Firefox and Opera 9.0+. Also, if you post what this code is for, perhaps we can help refactor it.

    https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Statements/const#Description

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

Sidebar

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.