Explorer syntax error

Error 0 Line 1 Ie Syntax Error Code 0 Line 1 errors can freeze or crash your computer and may lead to possible malware infections. Follow these easy steps to fix your Runtime Errors errors quickly and simply.

This article features error number Code 0 Line 1, commonly known as Ie Syntax Error Code 0 Line 1 described as Error 0 Line 1: Internet Explorer has encountered a problem and needs to close. We are sorry for the inconvenience.

About Runtime Code 0 Line 1

Runtime Code 0 Line 1 happens when Internet Explorer fails or crashes whilst it’s running, hence its name. It doesn’t necessarily mean that the code was corrupt in some way, but just that it did not work during its run-time. This kind of error will appear as an annoying notification on your screen unless handled and corrected. Here are symptoms, causes and ways to troubleshoot the problem.

Definitions (Beta)

Here we list some definitions for the words contained in your error, in an attempt to help you understand your problem. This is a work in progress, so sometimes we might define the word incorrectly, so feel free to skip this section!

  • Error code — An error code is a value returned to provide context on why an error occurred
  • Explorer — Windows Explorer is the file manager and navigation tool that exists in Microsoft Windows operating systems
  • Internet explorer — Internet Explorer commonly abbreviated to IE or MSIE is a web browser developed by Microsoft and is included as part of Microsoft Windows.
  • Syntax — Syntax refers to the actual language elements and symbols themselves
  • Syntax error — A syntax error occurs when a program does not follow the syntactical rules of the programming language.

Symptoms of Code 0 Line 1 — Ie Syntax Error Code 0 Line 1

Runtime errors happen without warning. The error message can come up the screen anytime Internet Explorer is run. In fact, the error message or some other dialogue box can come up again and again if not addressed early on.

There may be instances of files deletion or new files appearing. Though this symptom is largely due to virus infection, it can be attributed as a symptom for runtime error, as virus infection is one of the causes for runtime error. User may also experience a sudden drop in internet connection speed, yet again, this is not always the case.

Fix Ie Syntax Error Code 0 Line 1 (Error Code 0 Line 1)
(For illustrative purposes only)

Causes of Ie Syntax Error Code 0 Line 1 — Code 0 Line 1

During software design, programmers code anticipating the occurrence of errors. However, there are no perfect designs, as errors can be expected even with the best program design. Glitches can happen during runtime if a certain error is not experienced and addressed during design and testing.

Runtime errors are generally caused by incompatible programs running at the same time. It may also occur because of memory problem, a bad graphics driver or virus infection. Whatever the case may be, the problem must be resolved immediately to avoid further problems. Here are ways to remedy the error.

Repair Methods

Runtime errors may be annoying and persistent, but it is not totally hopeless, repairs are available. Here are ways to do it.

If a repair method works for you, please click the upvote button to the left of the answer, this will let other users know which repair method is currently working the best.

Please note: Neither ErrorVault.com nor it’s writers claim responsibility for the results of the actions taken from employing any of the repair methods listed on this page — you complete these steps at your own risk.

Method 1 — Close Conflicting Programs

When you get a runtime error, keep in mind that it is happening due to programs that are conflicting with each other. The first thing you can do to resolve the problem is to stop these conflicting programs.

  • Open Task Manager by clicking Ctrl-Alt-Del at the same time. This will let you see the list of programs currently running.
  • Go to the Processes tab and stop the programs one by one by highlighting each program and clicking the End Process buttom.
  • You will need to observe if the error message will reoccur each time you stop a process.
  • Once you get to identify which program is causing the error, you may go ahead with the next troubleshooting step, reinstalling the application.

Method 2 — Update / Reinstall Conflicting Programs

Using Control Panel

  • For Windows 7, click the Start Button, then click Control panel, then Uninstall a program
  • For Windows 8, click the Start Button, then scroll down and click More Settings, then click Control panel > Uninstall a program.
  • For Windows 10, just type Control Panel on the search box and click the result, then click Uninstall a program
  • Once inside Programs and Features, click the problem program and click Update or Uninstall.
  • If you chose to update, then you will just need to follow the prompt to complete the process, however if you chose to Uninstall, you will follow the prompt to uninstall and then re-download or use the application’s installation disk to reinstall the program.

Using Other Methods

  • For Windows 7, you may find the list of all installed programs when you click Start and scroll your mouse over the list that appear on the tab. You may see on that list utility for uninstalling the program. You may go ahead and uninstall using utilities available in this tab.
  • For Windows 10, you may click Start, then Settings, then choose Apps.
  • Scroll down to see the list of Apps and features installed in your computer.
  • Click the Program which is causing the runtime error, then you may choose to uninstall or click Advanced options to reset the application.

Method 3 — Update your Virus protection program or download and install the latest Windows Update

Virus infection causing runtime error on your computer must immediately be prevented, quarantined or deleted. Make sure you update your virus program and run a thorough scan of the computer or, run Windows update so you can get the latest virus definition and fix.

Method 4 — Re-install Runtime Libraries

You might be getting the error because of an update, like the MS Visual C++ package which might not be installed properly or completely. What you can do then is to uninstall the current package and install a fresh copy.

  • Uninstall the package by going to Programs and Features, find and highlight the Microsoft Visual C++ Redistributable Package.
  • Click Uninstall on top of the list, and when it is done, reboot your computer.
  • Download the latest redistributable package from Microsoft then install it.

Method 5 — Run Disk Cleanup

You might also be experiencing runtime error because of a very low free space on your computer.

  • You should consider backing up your files and freeing up space on your hard drive
  • You can also clear your cache and reboot your computer
  • You can also run Disk Cleanup, open your explorer window and right click your main directory (this is usually C: )
  • Click Properties and then click Disk Cleanup

Method 6 — Reinstall Your Graphics Driver

If the error is related to a bad graphics driver, then you may do the following:

  • Open your Device Manager, locate the graphics driver
  • Right click the video card driver then click uninstall, then restart your computer

Method 7 — IE related Runtime Error

If the error you are getting is related to the Internet Explorer, you may do the following:

  1. Reset your browser.
    • For Windows 7, you may click Start, go to Control Panel, then click Internet Options on the left side. Then you can click Advanced tab then click the Reset button.
    • For Windows 8 and 10, you may click search and type Internet Options, then go to Advanced tab and click Reset.
  2. Disable script debugging and error notifications.
    • On the same Internet Options window, you may go to Advanced tab and look for Disable script debugging
    • Put a check mark on the radio button
    • At the same time, uncheck the «Display a Notification about every Script Error» item and then click Apply and OK, then reboot your computer.

If these quick fixes do not work, you can always backup files and run repair reinstall on your computer. However, you can do that later when the solutions listed here did not do the job.

Other languages:

Wie beheben Fehler 0 Zeile 1 (Dh Syntaxfehlercode 0 Zeile 1) — Fehler 0 Zeile 1: Internet Explorer hat ein Problem festgestellt und muss geschlossen werden. Wir entschuldigen uns für die Unannehmlichkeiten.
Come fissare Errore 0 Riga 1 (Ad es. Codice errore sintassi 0 Riga 1) — Errore 0 Riga 1: Internet Explorer ha riscontrato un problema e deve essere chiuso. Ci scusiamo per l’inconveniente.
Hoe maak je Fout 0 Regel 1 (Dwz syntaxisfoutcode 0 regel 1) — Fout 0 Regel 1: Internet Explorer heeft een probleem ondervonden en moet worden afgesloten. Excuses voor het ongemak.
Comment réparer Erreur 0 Ligne 1 (C’est-à-dire code d’erreur de syntaxe 0 ligne 1) — Erreur 0 Ligne 1 : Internet Explorer a rencontré un problème et doit se fermer. Nous sommes désolés du dérangement.
어떻게 고치는 지 오류 0 라인 1 (즉, 구문 오류 코드 0 행 1) — 오류 0 줄 1: Internet Explorer에 문제가 발생해 닫아야 합니다. 불편을 끼쳐드려 죄송합니다.
Como corrigir o Erro 0 Linha 1 (Ou seja, código de erro de sintaxe 0, linha 1) — Erro 0 Linha 1: O Internet Explorer encontrou um problema e precisa fechar. Lamentamos o inconveniente.
Hur man åtgärdar Fel 0 Rad 1 (Dvs syntaxfelkod 0 rad 1) — Fel 0 rad 1: Internet Explorer har stött på ett problem och måste stängas. Vi är ledsna för besväret.
Как исправить Ошибка 0, строка 1 (Т.е. код синтаксической ошибки 0, строка 1) — Ошибка 0 Строка 1: Возникла ошибка в приложении Internet Explorer. Приложение будет закрыто. Приносим свои извинения за неудобства.
Jak naprawić Błąd 0 Wiersz 1 (Tj. Kod błędu składni 0 Wiersz 1) — Błąd 0 Wiersz 1: Internet Explorer napotkał problem i musi zostać zamknięty. Przepraszamy za niedogodności.
Cómo arreglar Error 0 Línea 1 (Es decir, código de error de sintaxis 0, línea 1) — Error 0 Línea 1: Internet Explorer ha detectado un problema y debe cerrarse. Lamentamos las molestias.

The Author About The Author: Phil Hart has been a Microsoft Community Contributor since 2010. With a current point score over 100,000, they’ve contributed more than 3000 answers in the Microsoft Support forums and have created almost 200 new help articles in the Technet Wiki.

Follow Us: Facebook Youtube Twitter

Recommended Repair Tool:

This repair tool can fix common computer problems such as blue screens, crashes and freezes, missing DLL files, as well as repair malware/virus damage and more by replacing damaged and missing system files.

STEP 1:

Click Here to Download and install the Windows repair tool.

STEP 2:

Click on Start Scan and let it analyze your device.

STEP 3:

Click on Repair All to fix all of the issues it detected.

DOWNLOAD NOW

Compatibility

Requirements

1 Ghz CPU, 512 MB RAM, 40 GB HDD
This download offers unlimited scans of your Windows PC for free. Full system repairs start at $19.95.

Article ID: ACX04949EN

Applies To: Windows 10, Windows 8.1, Windows 7, Windows Vista, Windows XP, Windows 2000

Speed Up Tip #88

Upgrading your GPU:

Upgrade your computer’s graphics card (GPU) to enjoy a boosted performance even with an outdated CPU. Installing a new GPU is an easy task. The process only involves 3 steps: pulling out the old graphics card, inserting the new one, installing the needed drivers — and then you are off and running.

Click Here for another way to speed up your Windows PC

Icon Ex Номер ошибки: Ошибка 0 Line 1
Название ошибки: Ie Syntax Error Code 0 Line 1
Описание ошибки: Ошибка 0 Line 1: Возникла ошибка в приложении Internet Explorer. Приложение будет закрыто. Приносим извинения за неудобства.
Разработчик: Microsoft Corporation
Программное обеспечение: Internet Explorer
Относится к: Windows XP, Vista, 7, 8, 10, 11

Обзор «Ie Syntax Error Code 0 Line 1»

Эксперты обычно называют «Ie Syntax Error Code 0 Line 1» «ошибкой времени выполнения». Программисты работают через различные уровни отладки, пытаясь убедиться, что Internet Explorer как можно ближе к безошибочным. К сожалению, инженеры являются людьми и часто могут делать ошибки во время тестирования, отсутствует ошибка 0 Line 1.

Ошибка 0 Line 1, рассматриваемая как «Ie Syntax Error Code 0 Line 1», может возникнуть пользователями Internet Explorer в результате нормального использования программы. Когда это происходит, конечные пользователи программного обеспечения могут сообщить Microsoft Corporation о существовании ошибки 0 Line 1 ошибок. Затем Microsoft Corporation нужно будет исправить эти ошибки в главном исходном коде и предоставить модифицированную версию для загрузки. Чтобы исправить такие ошибки 0 Line 1 ошибки, устанавливаемое обновление программного обеспечения будет выпущено от поставщика программного обеспечения.

Как триггеры Runtime Error 0 Line 1 и что это такое?

Сбой во время запуска Internet Explorer или во время выполнения, как правило, когда вы столкнетесь с «Ie Syntax Error Code 0 Line 1». Три распространенные причины, по которым ошибки во время выполнения, такие как всплывающее окно ошибки 0 Line 1:

Ошибка 0 Line 1 Crash — Ошибка 0 Line 1 является хорошо известной, которая происходит, когда неправильная строка кода компилируется в исходный код программы. Обычно это происходит, когда Internet Explorer не может обработать данные в удовлетворительной форме и поэтому не может получить ожидаемый результат.

Утечка памяти «Ie Syntax Error Code 0 Line 1» — при утечке памяти Internet Explorer это может привести к медленной работе устройства из-за нехватки системных ресурсов. Возможные искры включают сбой освобождения, который произошел в программе, отличной от C ++, когда поврежденный код сборки неправильно выполняет бесконечный цикл.

Ошибка 0 Line 1 Logic Error — «логическая ошибка», как говорят, генерируется, когда программное обеспечение получает правильный ввод, но генерирует неверный вывод. Неисправный исходный код Microsoft Corporation может привести к этим проблемам с обработкой ввода.

Ie Syntax Error Code 0 Line 1 проблемы часто являются результатом отсутствия, удаления или случайного перемещения файла из исходного места установки Internet Explorer. Возникновение подобных проблем является раздражающим фактором, однако их легко устранить, заменив файл Microsoft Corporation, из-за которого возникает проблема. Помимо прочего, в качестве общей меры по профилактике и очистке мы рекомендуем использовать очиститель реестра для очистки любых недопустимых записей файлов, расширений файлов Microsoft Corporation или разделов реестра, что позволит предотвратить появление связанных с ними сообщений об ошибках.

Распространенные сообщения об ошибках в Ie Syntax Error Code 0 Line 1

Типичные ошибки Ie Syntax Error Code 0 Line 1, возникающие в Internet Explorer для Windows:

  • «Ошибка в приложении: Ie Syntax Error Code 0 Line 1»
  • «Ie Syntax Error Code 0 Line 1 не является приложением Win32.»
  • «Ie Syntax Error Code 0 Line 1 должен быть закрыт. «
  • «Файл Ie Syntax Error Code 0 Line 1 не найден.»
  • «Ie Syntax Error Code 0 Line 1 не может быть найден. «
  • «Ошибка запуска в приложении: Ie Syntax Error Code 0 Line 1. «
  • «Ie Syntax Error Code 0 Line 1 не выполняется. «
  • «Отказ Ie Syntax Error Code 0 Line 1.»
  • «Ошибка в пути к программному обеспечению: Ie Syntax Error Code 0 Line 1. «

Обычно ошибки Ie Syntax Error Code 0 Line 1 с Internet Explorer возникают во время запуска или завершения работы, в то время как программы, связанные с Ie Syntax Error Code 0 Line 1, выполняются, или редко во время последовательности обновления ОС. Важно отметить, когда возникают проблемы Ie Syntax Error Code 0 Line 1, так как это помогает устранять проблемы Internet Explorer (и сообщать в Microsoft Corporation).

Эпицентры Ie Syntax Error Code 0 Line 1 Головные боли

Заражение вредоносными программами, недопустимые записи реестра Internet Explorer или отсутствующие или поврежденные файлы Ie Syntax Error Code 0 Line 1 могут создать эти ошибки Ie Syntax Error Code 0 Line 1.

В первую очередь, проблемы Ie Syntax Error Code 0 Line 1 создаются:

  • Недопустимая (поврежденная) запись реестра Ie Syntax Error Code 0 Line 1.
  • Файл Ie Syntax Error Code 0 Line 1 поврежден от вирусной инфекции.
  • Вредоносное удаление (или ошибка) Ie Syntax Error Code 0 Line 1 другим приложением (не Internet Explorer).
  • Другое программное обеспечение, конфликтующее с Internet Explorer, Ie Syntax Error Code 0 Line 1 или общими ссылками.
  • Internet Explorer (Ie Syntax Error Code 0 Line 1) поврежден во время загрузки или установки.

Продукт Solvusoft

Загрузка
WinThruster 2022 — Проверьте свой компьютер на наличие ошибок.

Совместима с Windows 2000, XP, Vista, 7, 8, 10 и 11

Установить необязательные продукты — WinThruster (Solvusoft) | Лицензия | Политика защиты личных сведений | Условия | Удаление

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and
privacy statement. We’ll occasionally send you account related emails.

Already on GitHub?
Sign in
to your account

Comments

@danail-vasilev

I’m submitting a…


[ ] Regression (a behavior that used to work and stopped working in a new release)
[x ] Bug report  
[ ] Feature request
[ ] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question

Current behavior

I cannot open the project in IE11. The following error is thrown — SCRIPT1002: Syntax error main.bundle.js

I have done the following steps after investigating the issue a couple of hours:

  1. Enabled polyfills
  2. Added shims to index.html — https://npmcdn.com/angular2/es6/dev/src/testing/shims_for_IE.js
  3. Set __Zone_enable_cross_context_check property to true in index.html file.
  4. Set es5 in tsconfig files.

Expected behavior

Minimal reproduction of the problem with instructions

A fully runnable sample is available here — https://github.com/danail-vasilev/test-ng2-ie11
Just clone the repo and run:
npm install
npm start

What is the motivation / use case for changing the behavior?

Environment


Angular version: X.Y.Z


Browser:
- [ ] Chrome (desktop) version XX
- [ ] Chrome (Android) version XX
- [ ] Chrome (iOS) version XX
- [ ] Firefox version XX
- [ ] Safari (desktop) version XX
- [ ] Safari (iOS) version XX
- [x] IE version 11
- [ ] Edge version XX
 
For Tooling issues:
- Node version: XX  
- Platform:  

Others:

@chuckjaz

  1. The shim file you are using is from a deprecated package which was deprecated early in the development of Angular.
  2. There is no reason you need to use this as the shims for IE 10 and 11 are enabled in you project.
  3. The error is a script parse error which shouldn’t be the same in every browser not just in IE 11

Can you try reproducing this without including the out-of-date and deprecated shim?

@danail-vasilev

@chuckjaz

I could not reproduce the issue given the repository because it gives me the error:

ERROR in ./node_modules/css-loader?{"sourceMap":false,"importLoaders":1}!./node_modules/postcss-loader?{"ident":"postcss"}!./node_modules/bootstrap/dist/css/bootstrap.min.css
Module build failed: BrowserslistError: Unknown browser major

I compiled the example directly with ngc using:

./node_modules/.bin/ngc -p src/tsconfig.app.json 

This emits:

import { NgModule } from '@angular/core';
import { RouterModule } from '@angular/router';
export var routes = [
    { path: '', redirectTo: '/', pathMatch: 'full' },
    { path: '**', redirectTo: '' }
];
var AppRoutingModule = /** @class */ (function () {
    function AppRoutingModule() {
    }
    AppRoutingModule.decorators = [
        { type: NgModule, args: [{
                    imports: [RouterModule.forRoot(routes)],
                    exports: [RouterModule]
                },] },
    ];
    /** @nocollapse */
    AppRoutingModule.ctorParameters = function () { return []; };
    return AppRoutingModule;
}());
export { AppRoutingModule };
//# sourceMappingURL=app-routing.module.js.map

which does not contain the let or class references.

From this it looks like an issue in the angular cli or one of its delegated tools, not ngc or TypeScript.. Can you report this to https://github.com/angular/angular-cli?

@mhevery

closing as not reproducible.

@danail-vasilev

Hi Guys,
The issue is still reproducible ! Please find my comments and a fully runnable sample that showcases the problem below.

  1. The compiler error reproduced by chuckjaz is caused by an issue with the cli and bootstrap 4.0.0. More information is also available here.
  2. I have also updated this package’s version swimlane/ngx-datatable»: «^11.1.7»
  3. To reproduce the issue you should also change «target»: «es5» to «target»: «es6» in tsconfig.json, tsconfig.app.json and tsconfig.spec.json files.
  4. A new fully runnable sample that reproduces the issue is available in this repo — test-ng2-ie11-v2
  5. If I use «target»: «es5» the issue is resolved but I get the following issue with this code (snapshot):

Type ‘Map<string, boolean>’ is not an array type or a string type.

export function toggleBoolProperty(map: Map<string, boolean>) { for (const [key, value] of map) { this[key] = value; } }

So, can we make this project working with target es6 in IE11 ?

Thank you for your time and efforts !

@danail-vasilev

Also I got this error (image) in IE11:

SCRIPT5011: Can’t execute code from a freed script

Although I have added the following code, suggested by your team (here) to the polyfills.ts file:
(window as any).__Zone_enable_cross_context_check = true; import 'zone.js/dist/zone'; // Included with Angular CLI.

@trotyl

If I use «target»: «es5» the issue is resolved but I get the following issue with this code

--downlevelIteration flag is required for using for...of against non-array iterables.

@JiaLiPassion

@danail-vasilev , to work in IE11, you need to build with es5 target. And I run your sample , with es5 target, everything work fine.

@danail-vasilev

Thank you guys !

  1. Ok, I will set the target to es5, however, is there any documentation or a note to use es5 target for IE 11 ? Can you add this information to the polyfills.ts file because it is related to IE 11 as well ?
  2. Regarding for..of, I can use the downlevelIteration flag or foreach — map.forEach((value: boolean, key: string) => { this[key] = value; });
  3. And regarding the SCRIPT5011: Can't execute code from a freed script issue, do you know why the fix/workaround doesn’t take effect ?

@JiaLiPassion

@danail-vasilev .

About SCRIPT5011: Can't execute code from a freed script, I just can’t reproduce, I didn’t set the flag, and I also opened IE developer tools, nothing happened.

@danail-vasilev

Hi @JiaLiPassion,
Please find my comments below:

  1. It is strange that the issue is not reproduced on your side when you open the console and the flag is not set. I have tested this behavior on my personal and work PC and it is reproduced on both machines. My current IE11 version is — this. On my colleague’s PC, however, is reproduced another issue — something with a security exception (including the current one as well).
  2. I have found something interesting — when I set directly the __Zone_enable_cross_context_check property to true in the index.html file the issue doesn’t seem to occur. If I use, however, the approach with setting it to (window as any) in the polyfills.ts file it doesn’t take effect. Do you know why is that happening ? Also why do you use (window as any) ?
  3. So, as per the issue discussion, I have concluded the following:
  • The problem occurs only when you open the console in IE11 and it doesn’t break the functionality.
  • If you just don’t want to see the exception during development you can set the __Zone_enable_cross_context_check property to true but in production it shouldn’t be set in order to avoid performance issue.
    If that is the case you can mention that in the comment of the fix that has just been merged.
    Thank you !

@JiaLiPassion

@danail-vasilev , please try the below settings.

there will be websocket to connect angular web app with angular dev server, and every time refresh IE page, there will be a new web socket was created.

and in IE, the maximum websocket connections are 6 by default, https://msdn.microsoft.com/ja-jp/library/ee330736%28v=vs.85%29.aspx?f=255&MSPPError=-2147217396.
so error occurs, you can change the number by modify the registry.

HKEY_CURRENT_USERSoftwarePoliciesMicrosoftInternet ExplorerMainFeatureControlFEATURE_WEBSOCKET_MAXCONNECTIONSPERSERVER
and add a key, iexplore.exe(REG_DWORD) modify the value to 2~128.

I just modify to 50, and the error gone.

@danail-vasilev

Hi @JiaLiPassion,
Thank you for your investigation! I am with Windows10 and I couldn’t find the FEATURE_WEBSOCKET_MAXCONNECTIONSPERSERVER property in the regedit. I have searched in the following places as well as used the searching tool:

  1. HKEY_CURRENT_USER | HKEY_LOCAL_MACHINESoftwarePoliciesMicrosoftInternet ExplorerMainFeatureControl
  2. HKEY_CURRENT_USER | HKEY_LOCAL_MACHINESoftwareMicrosoftInternet ExplorerMainFeatureControl

Maybe I should manually add the key/value but anyway… can you please comment point 2 and confirm point 3 from my previous post ?
Thank you !

@mhevery

OK it seems like we are getting into the realm of technical support. We are trying to keep this repo for issue with angular, so I am going to close this again.

@JiaLiPassion

@danail-vasilev , about the registry, by default, it not exists, so you need to create the keys yourself, I also tried those settings in Windows 10.

And about the point3 .

So, as per the issue discussion, I have concluded the following:
The problem occurs only when you open the console in IE11 and it doesn’t break the functionality.
If you just don’t want to see the exception during development you can set the __Zone_enable_cross_context_check property to true but in production it shouldn’t be set in order to avoid performance issue.
If that is the case you can mention that in the comment of the fix that has just been merged.
Thank you !

in fact, there are several issues related with IE.

  1. if you compile the project with target -> es6, IE will not work and throw error like Syntax error.
  2. if you open developer tools and without set the __Zone_enable_cross_context_check flag, the error like Can't execute code from a freed script may occur. in this case, you should set the flag to true in polyfill, it will have some performance impact so you should only do this in dev mode.
  3. About the error SecurityError, I believe this is the websocket error with dev server. so you should try the registry way.

I would like to make a PR to add those information as trouble shooting in aio document (I am not sure it is the right place) later.

@abbymrs

@JiaLiPassion
Hi, in my tsconfig.json, the target is set to es5, but still got the error of syntax error in 0.***.chunk.js.
When i click on the error link, was navigated to the line with «class a{constructor(e){....}}«, so it seems the webpack not compile all ts to es5, may i know how to solve this issue? Thank you.

@trotyl

@abbymrs It’s not likely come from Angular. Possibly some of your 3rd-party library is publishing es2015 code directly.

@abbymrs

@trotyl Thank you. Fixed by npm install -D @types/third-party lib name, and add third party lib name to types array in tsconfig.app.json && .angular-cli.json script array.

@ekumari

I am also facing the running issue with IE11. I already uncommented required import statement from polyfills. It is not working for me. I am getting an error in the vendor.js
«const ucs2encode = array => String.fromCodePoint(array);» Does anyone faced the same issue.

yifeidesu, andreagentili, antonkallenberg, KristiyanVachev, marekdano, blained3, jjuli93, pschulzk, bricepepin, fadak0828, and 3 more reacted with thumbs up emoji

@abbymrs

@sebastiankr

I am facing the same issue. The culprit seems to be punycode@2.1.1 included by @angular-devkit.
This is my dependency tree:

eang@0.0.0
| Reactive components for Angular with customizable UX themes
+-- @angular-devkit/build-angular@0.6.8
|   | Angular Webpack Build Facade
|   | git+https://github.com/angular/devkit.git
|   | https://github.com/angular/devkit
|   +-- ajv@6.4.0
|   |   | Another JSON Schema Validator
|   |   | git+https://github.com/epoberezkin/ajv.git
|   |   | https://github.com/epoberezkin/ajv
|   |   `-- uri-js@3.0.2
|   |     | An RFC 3986/3987 compliant, scheme extendable URI/IRI parsing/validating/resolving library for JavaScript.
|   |     | git+ssh://git@github.com/garycourt/uri-js.git
|   |     | https://github.com/garycourt/uri-js
|   |     `-- punycode@2.1.1
|   |       A robust Punycode converter that fully complies to RFC 3492 and RFC 5891, and works on nearly all JavaScript platforms.
|   |       git+https://github.com/bestiejs/punycode.js.git
|   |       https://mths.be/punycode

@ekumari

@andreagentili

Yes after adding punnycode. It worked for me. Thanks

Hi @ekumari and @sebastiankr, can you share with us how you did fix the problem with punycode? I have the same problem and tried to solve it using @abbymrs’s solution but it just didn’t work, I still got the
const ucs2encode = array => String.fromCodePoint(...array); error in IE11.

I tried:

  • npm install punycode
  • copy in a local directory the punycode.d.ts file found on github (since I cant’t install any @types/punycode from repo, npm says «not found»)
  • changed angular.json to add punycode.js to global scripts
  • added punycode to tsconfig.app.ts types
  • added punycode.d.ts path in tsconfig.json

I still get IE11 errors for arrow operator.

How did you solve it?


Edit: I confirm that in my case the problem is with punycode library containing offending es6 statements which are not transpiled to es6, specifically:

  • arrow operator
  • … operator
  • for (const currentValue of input) {…} which yields «const not initialized» error
    I tried to fake ES5 transpilation by manually patching the local library files.

Edit: This issue of angular/angular-cli might be useful.


Edit: after further investigation, I spotted that punycode is even a dependency of markdown-it package. So markdown-it was fetching into vendor.js codebase some es6 constructs which are present in punycode@2.1.1. Removing markdown-itdependency did the job.

@angular-automatic-lock-bot

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

Quite some time ago I encountered this error the first time, to be honest i can not even remember when it was. But I do know it was Windows 7 and Internet Explorer fully updated, together with the current Java runtime environment that gave me the problem, but I am getting ahead of myself.

Problem description:

  • Using Internet Explorer, Windows 7 and Java Runtime Environment – all updated to latest editions on completely clean installations
  • On all webpages loading Java the following error message appears twice (x2, two times, 2 times).
    Title: “Microsoft JScript compilation er…”.
    Error message: “Syntax error”.

Extra bonus information:

  • I have experienced this problem on Windows 7 with and without service packs, Internet Explorer 8 and 9
  • Usually the problem appears from “birth” with default settings
  • Settings in Internet Explorer for showing errors, debugging scripts, etc. are all set to default i.e. not to anoy the user
  • The error always comes two times and has absolutely no usefull information
  • The Java application works fine without any errors, the only error is the actual message about the error and yes it is realy anoying

So to continue… I trawled thru endless suggestions for how to fix this problem the first time I had the problem and I believe I was at page 3 in Google before I found something that finally worked. The solution is incredibly simple and apparently seems to have absolutely nothing to do with the problem or Java. But what realy anoyed me was that I later had this problem on my new IBM laptop, with everything completely fresh installed, and I could not remember the fix! and again it took me forever to find the solution. So this time I am writing a blog about it, so I can find the solution next time I forget it. I also assume the problem comes due to Java trying to use this setting but fails – I have no idea who has the actual problem, Windows, IE or Java, but it puzzles me the problem still exists this long after I first saw it.

Solution:

  • In Internet Explorer -> Tools -> Internet Options -> Connections -> LAN Settings
  • Clear the checkbox in “Automatically detect settings”

Thats it!

  • Remove From My Forums
  • General discussion

  • Hi,

    I’m seeing

    SCRIPT1002: Syntax error

    leftpane.aspx, line 1 character 30

    in my aspx page in IE10. I don’t see any issues in IE9 or previous versions.

    Below I have posted the aspx source code. Am I missing anything here? Please help me.

    Thanks

    <%@ Page language="c#" AutoEventWireup="false" %>
    
    <%@Import Namespace="System.Globalization"%>
    <%@Import Namespace="System.Resources"%>
    <%@Import Namespace="System.Reflection"%>
    
    <%
        Assembly a = Assembly.Load("WebClientResources");
        ResourceManager rm = new ResourceManager("WebClientResources", a);     
    %>
    
    <!DOCTYPE html>
    	<HEAD>
    		<META NAME="GENERATOR" Content="Microsoft FrontPage 5.0">
    		<SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript" SRC="scripts/menu.js"></SCRIPT>
    		<LINK REL="stylesheet" HREF="webclient.css">
    			<TITLE></TITLE>
    <SCRIPT LANGUAGE="javascript">
    
    var ALL_PATHS = '<%=rm.GetString("ALL_PATHS")%>';
    var NETWORK_VIEW = '<%=rm.GetString("NETWORK_VIEW")%>';
    var FOLDER_VIEW = '<%=rm.GetString("FOLDER_VIEW")%>';
    var ACCESS_EVENTS = '<%=rm.GetString("ACCESS_EVENTS")%>';
    var ADVANCED_SEARCH = '<%=rm.GetString("ADVANCED_SEARCH")%>';
    var ADVANCED = '<%=rm.GetString("ADVANCED")%>';
    var POINT_TYPES = '<%=rm.GetString("POINT_TYPES")%>';
    var AREAS = '<%=rm.GetString("AREAS")%>';
    var ACCESS_DIST_EVENTS = '<%=rm.GetString("ACCESS_DISTRIBUTION_EVENTS")%>';
    var NEW_PERSON = '<%=rm.GetString("NEW_PERSON")%>';
    var NEW_REPORT = '<%=rm.GetString("NEW_REPORT")%>';
    var TOGGLE_CONTENTS = '<%=rm.GetString("SHOW/HIDE_CONTENTS")%>';
    var ALL_OBJECTS = '<%=rm.GetString("ALL_OBJECTS")%>';
    var CX_WEBS = '<%=rm.GetString("WEB_PAGES")%>';
    var EVENT_VIEWS = '<%=rm.GetString("EVENT_VIEWS")%>';
    var GRAPHICS = '<%=rm.GetString("GRAPHICS")%>';
    var GROUPS = '<%=rm.GetString("GROUPS")%>';
    var PERSONNEL = '<%=rm.GetString("PERSONNEL")%>';
    var POINTS = '<%=rm.GetString("POINTS")%>';
    var REPORTS = '<%=rm.GetString("REPORTS")%>';
    var SCHEDULES = '<%=rm.GetString("SCHEDULES")%>';
    var SHOWALL = '<%=rm.GetString("SHOW_ALL")%>';
    var VIDEO = '<%=rm.GetString("VIDEO")%>';
    var DOORS = '<%=rm.GetString("DOORS")%>';
    var TRENDLOGS = '<%=rm.GetString("TREND_LOGS")%>';
    var LOOPS = '<%=rm.GetString("LOOPS")%>';
    var USER = '<%=rm.GetString("USER")%>';
    
    
    var ANALOG_INPUT = '<%=rm.GetString("ANALOGINPUT")%>';
    var ANALOG_OUTPUT = '<%=rm.GetString("ANALOGOUTPUT")%>';
    var ANALOG_VALUE = '<%=rm.GetString("ANALOGVALUE")%>';
    var BINARY_INPUT = '<%=rm.GetString("BINARYINPUT")%>';
    var BINARY_OUTPUT = '<%=rm.GetString("BINARYOUTPUT")%>';
    var BINARY_VALUE = '<%=rm.GetString("BINARYVALUE")%>';
    var MULTISTATE_INPUT = '<%=rm.GetString("MULTISTATEINPUT")%>';
    var MULTISTATE_OUTPUT = '<%=rm.GetString("MULTISTATEOUTPUT")%>';
    var MULTISTATE_VALUE = '<%=rm.GetString("MULTISTATEVALUE")%>';
    var INFINITY_INPUT = '<%=rm.GetString("INFINITYINPUT")%>';
    var INFINITY_OUTPUT = '<%=rm.GetString("INFINITYOUTPUT")%>';
    var INFINITY_NUMERIC = '<%=rm.GetString("INFINITYNUMERIC")%>';
    var INFINITY_DATETIME = '<%=rm.GetString("INFINITYDATETIME")%>';
    var INFINITY_STRING = '<%=rm.GetString("INFINITYSTRING")%>';
    var SELECT_AT_LEAST_ONE = '<%=rm.GetString("MUST_HAVE_ONE_POINT_TYPE_SELECTED")%>';
    var REFRESH = '<%=rm.GetString("REFRESH")%>';
    
    var True = true;
    var False = false;
    
    var bShowingMenu = false;
    var bExploreMode = false;
    
    var bNetworkView = false;
    var bFolderView = false;
    var bAllView = true;
    
    var winMain = window.top;
    
    var bSplitEditorPage = false;
    
    var sFilterType = ALL_OBJECTS;
    var sCustomFilter = '';
    
    var AccessEventsLink = '<%=Session["ACCESSEVENTS"]%>';
    var AccessDistEventsLink = '<%=Session["ACCESSDISTEVENTS"]%>';
    var AreasLink = '<%=Session["AREAS"]%>';
    
    ///////////////////////////////////////////////////////////////////////
    // Preload Images
    
    var imgArrowUp = new Image();
    imgArrowUp.src = "images/arrow_up.gif";
    
    var imgArrowDown = new Image();
    imgArrowDown.src = "images/arrow_down.gif";
    
    ///////////////////////////////////////////////////////////////////////
    var fExplore = <%=(bool)Session["EXPLORE"] %>;
    
    function doLoad(){
    	
    	writeMenus();	
    	
    	if(fExplore)		
    		DoExplore();
    	else
    		DoSearch();
    }
    
    ///////////////////////////////////////////////////////////////////////
    
    function DoTimeout(){
    	window.location.href="logOff.aspx?Type=Timeout";
    }
    
    //////////////////////////////////////////////////////////////////////
    
    function TogglePointsDiv(){
    
    	if(document.getElementById("PointsDiv").style.display == 'none'){	
    		document.getElementById("PointsDiv").style.display = '';
    	}else{
    		document.getElementById("PointsDiv").style.display = 'none';
    	}
    	
    	if(bExploreMode){
    		document.getElementById("PointsRefresh").style.display = '';
    	}
    	else{
    		document.getElementById("PointsRefresh").style.display = 'none';
    	}	
    }
    
    //////////////////////////////////////////////////////////////////////
    
    function SetFilter(sFilter){	
    	
    	var strClass = '';
    	var SubMenuHTML = '';
    	var s='';
    	var i=0;
    	
    	switch (sFilter){
    		case GRAPHICS:
    			strClass='142';
    			break;
    		case REPORTS:			
    			if(AccessDistEventsLink!=''){				
    				s = '<a href="' + AccessDistEventsLink + '" class="mainHeader3Link">' + ACCESS_DIST_EVENTS + '</a>';
    				++i;
    			}
    			if(AccessEventsLink!=''){
    				if(i>0) s += '<br>';
    				s += '<a href="' + AccessEventsLink + '" class="mainHeader3Link">' + ACCESS_EVENTS + '</a>';
    				++i;
    			}			
    			if(AreasLink!=''){
    				if(i>0) s += ' | ';
    				s += '<a href="' + AreasLink + '" class="mainHeader3Link">' + AREAS + '</a>';	
    				++i;			
    			}
    			
    			if(i>0) s += ' | ';
    			
    			var URL;
    			URL = window.top.NewReportPage + '?user=' + window.top.getCookie('USERNAME') + '&VD=' + window.top.VirDirName + '&Protocol=' + window.location.protocol ;
    		    s += '<a href="javascript:window.top.OpenEditor('' + URL + '', 0, 0, ' + ''' + NEW_REPORT + '');" class="mainHeader3Link">' + NEW_REPORT + '</a>';
    
    			SubMenuHTML = s;			
    			strClass='172,155';
    			break;
    		case SCHEDULES:
    			strClass='6,17';  //6=calendar, 17=schedule
    			SubMenuHTML=s;
    			break;
    		case EVENT_VIEWS:
    			strClass='164';
    			break;
    		case GROUPS:
    			strClass='11';
    			break;
    		case PERSONNEL:
    			strClass='137';
    			s = '<a href="javascript:window.top.OnNewPersonnelObject()" class="mainHeader3Link">' + NEW_PERSON + '</a>';
    			s += ' | <a href="javascript:window.top.DoAdvancedPersonnelSearch(true)" class="mainHeader3Link">' + ADVANCED_SEARCH + '</a>';
    			SubMenuHTML=s;
    			break;
    		case POINTS:			
    			strClass = window.top.getCookie("PointsFilter");
    			if(!strClass)
    				strClass = '0,1,2,3,4,5,13,14,19,257,259,260,261,263';			
    			s = '<a href="javascript:TogglePointsDiv()" class="mainHeader3Link">' + POINT_TYPES + '</a>';
    			SubMenuHTML=s;
    			break;
    		case USER:
    			strClass='141';
    			s = '<a href="javascript:window.top.OnNewUser()" class="mainHeader3Link">' + "New User" + '</a>';
    			SubMenuHTML=s;
    			break;			
    		case VIDEO:
    			strClass='171';
    			break;
    		case CX_WEBS:
    			strClass='241';
    			break;
    		case ALL_OBJECTS:
    			strClass = '';
    			break;
    		case DOORS:
    			strClass='266';
    			break;
    		case LOOPS:
    			strClass='12';
    			break;
    		case TRENDLOGS:
    			strClass='20';
    			break;
    		default:
    	}
    	
    	if(sFilter != POINTS)
    		document.getElementById("PointsDiv").style.display = 'none';
    		
    	winMain.setCookie("ClassFilter", strClass)
    	winMain.setCookie("FilterType", sFilter)
    	
    	//we need to tell the app to show the home page and not the 
    	//infinity controller's contents if it's a CXWeb filter
    		
    	if(!bExploreMode){ //search mode
    		var strQSParam = '';
    		if (sFilter == CX_WEBS) 
    			strQSParam = '?CXWebs=true&';
    		else
    			strQSParam = '?';
    					
    		ExploreNav(winMain.SearchPage + strQSParam + 'Filter=' + strClass + '&INC=Search&Type=QP&SearchPathID=' + window.top.getCookie("SearchFolderID"));
    		winMain.bShowingContentWindow=false;
    	}else{ // explore mode
    		var sPage;
    		var sFolderNetworkBacnetAll;
    		var url='<a class="mainHeader3Link" onclick="bAllView=true;bNetworkView=false;bFolderView=false;window.top.setCookie('BrowseType', 'All');" href="javascript:winMain.NavExplorePanes()">';
    		url += ALL_PATHS + '</a>&nbsp;&nbsp;';
    		url += '<a class="mainHeader3Link" onclick="bFolderView=true;bAllView=false;bNetworkView=false;window.top.setCookie('BrowseType', 'Folder');" href="javascript:winMain.NavExplorePanes()">';
    		url += FOLDER_VIEW + '</a>&nbsp;&nbsp;';
    		url += '<a class="mainHeader3Link" onclick="bNetworkView=true;bFolderView=false;bAllView=false;window.top.setCookie('BrowseType', 'Network');" href="javascript:winMain.NavExplorePanes()">';
    		url += NETWORK_VIEW + '</a>';
    			
    		if(SubMenuHTML) SubMenuHTML = '<hr>' + SubMenuHTML;
    		SubMenuHTML = url + SubMenuHTML;
    		
    		if(bNetworkView){
    			sPage=winMain.NetworkBrowsePage;
    			sFolderNetworkBacnetAll = "Network";
    		}
    		
    		if(bFolderView){
    			sPage=winMain.FolderBrowsePage;
    			sFolderNetworkBacnetAll = "Folder";
    		}
    		
    		if(bAllView){
    			sPage=winMain.AllPathBrowsePage;
    			sFolderNetworkBacnetAll = "All"
    		}
    		
    		document.frames["exploreIFrame"].location.href = "ExploreFrameset.htm";
    		winMain.bShowingContentWindow=false;
    		
    		if (sFilter == CX_WEBS) 
    			strQSParam = '?CXWebs=true&';
    		else
    			strQSParam = '?';
    		
    		var strQSParam = strQSParam + 'Filter=' + strClass;
    		
    		
    		
    		var idHi = window.top.getCookie("BrowseIdHi");
    		var idLo = window.top.getCookie("BrowseIdLo");
    		
    		if(idHi=='')
    			idHi = '0';
    		if(idLo=='')
    			idLo = '0';
    		
    		if(sFolderNetworkBacnetAll=="")
    			sFolderNetworkBacnetAll = getCookie("BrowseType");
    		
    		if(sFolderNetworkBacnetAll=="")
    			sFolderNetworkBacnetAll = "All";							
    	}
    	
    	SetSubMenu(SubMenuHTML);
    	sFilterType = sFilter;
    	document.getElementById("MainMenu").innerHTML = sFilter;
    }
    
    ///////////////////////////////////////////////////////////////////////
    
    function ToggleContents(){
    	var bShow = window.top.bShowingContentWindow;
    	window.top.HideWindow(bShow, "content");
    }
    
    ///////////////////////////////////////////////////////////////////////
    
    function ShowMenu(bShow){
    
    	bShowingMenu = bShow;
    	
    	if(bShow==true){
    		document.getElementById("MenuArrow").src = imgArrowUp.src;		
    		if(bExploreMode==false)
    			winMain.frames['leftpane'].frames['exploreIFrame'].document.getElementById('SearchComboDiv').style.display='none';
    		popOver(0,1,true);		
    	}
    	else {
    		popOut(0,1);
    		document.getElementById("MenuArrow").src = imgArrowDown.src;
    		if(bExploreMode==false)
    			winMain.frames['leftpane'].frames['exploreIFrame'].document.getElementById('SearchComboDiv').style.display='';
    	}		
    }
    
    function ToggleMenu(){		
    		ShowMenu(!bShowingMenu);		
    }
    
    ///////////////////////////////////////////////////////////////////////
    
    function ToggleView(DivName){
    	if(document.getElementById(DivName).style.display=='none')
    		document.getElementById(DivName).style.display=''
    	else
    		document.getElementById(DivName).style.display='none'
    }
    
    ///////////////////////////////////////////////////////////////////////
    
    function SetSubMenu(sHTML){	
    	document.getElementById("ExploreSubMenu").innerHTML = sHTML;	
    }
    
    ///////////////////////////////////////////////////////////////////////
    
    function DoSearch(){	
    	if(bShowingMenu) ShowMenu(false)
    	if(bExploreMode==true || fExplore==false){		
    		bExploreMode = false;
    		SetFilter(sFilterType);
    		document.getElementById("PointsRefresh").style.display = 'none';
    	}
    }
    
    ///////////////////////////////////////////////////////////////////////
    
    function DoExplore(){
    	
    	if(bShowingMenu) ShowMenu(false)
    	if(bExploreMode==false){			
    		bExploreMode = true;		
    	}
    	SetFilter(sFilterType);
    	document.getElementById("PointsRefresh").style.display = '';
    
    	// Pristine	- 02/12/2008 - Muthuraja I - Lines added for defect #18993 ('Wrong Explore and Search .gif files displayed after clicking Parent Path in Search pane)
    	//-------------------------Start---------------------------
    	var imgExploreOn = new Image();
            imgExploreOn.src = "images/browse_on.gif";
    
        var imgSearchOff = new Image();
        imgSearchOff.src = "images/search.gif";
        
        parent.frames['topmenu'].document.getElementById("searchImage").src = imgSearchOff.src;
        parent.frames['topmenu'].document.getElementById("exploreImage").src = imgExploreOn.src;		
        //-------------------------End------------------------------
    }
    
    ///////////////////////////////////////////////////////////////////////
    
    function ExploreNav( href ){
    	
    	document.frames["exploreIFrame"].document.body.style.cursor = "wait";
    	document.frames["exploreIFrame"].location.href = href;
    }
    
    ///////////////////////////////////////////////////////////////////////
    
    	var menu = new Array();
    	//var defOver = '#9DA4AA', defBack = '#9DA4AA';//
    	var defOver = '#558CBE', defBack = '#78a0c8';//
    	var defLength = 30;
    	menu[0] = new Array();
    	menu[0][0] = new Menu(true, '', 0, 0, 200, '', '', '', 'headerText');
    	menu[0][1] = new Item('', '#', '5', 26, 0, 1);
        menu[1] = new Array();
        menu[1][0] = new Menu(true, '', 0, 17, 260, defOver, defBack, 'itemBorder', 'itemText');
    	//Menu(isVert, popInd, x, y, width, overCol, backCol, borderClass, textClass)
    	<%=Session["MENU"]%>
    
    			</SCRIPT>
    	</HEAD>
    	<BODY leftmargin="0" topmargin="0" rightmargin="0" onload="doLoad()" vlink="#d7e6f0" alink="#ffffff"
    		class="mainHeader3">
    		<table class="mainHeader3" id="exploreTable" border="0" cellpadding="3" cellspacing="0"
    			height="100%" width="100%">
    			<tr>
    				<td id="exploreMenuTD" valign="middle" height="30" class="mainHeader2" nowrap>&nbsp;<span id="MainMenu" class="itemText"></span></td>
    				<td valign="middle" align="right" height="30" class="mainHeader2" nowrap><a href="javascript:ToggleMenu()"><IMG src="images/Arrow_Down.gif" id="MenuArrow" align="absMiddle" border="0"></a>&nbsp;&nbsp;</td>
    			</tr>
    			<tr>
    				<td id="exploreSubmenuTD" height="1" class="mainHeader3" colspan="2" align="center"
    					valign="middle"><span id="ExploreSubMenu"></span><SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript" SRC="Scripts/PointSelection.js"></SCRIPT><img src="images/1x1.gif"></td>
    			</tr>
    			<tr>
    				<td id="" colspan="2" class="mainHeader3" nowrap>
    					<iframe id="exploreIFrame" name="exploreIFrame" src="about:blank" height="100%"
    						style="WIDTH: 100%" frameborder="0" scrolling="yes"></iframe>
    				</td>
    			</tr>
    		</table>
    	</BODY>
    </HTML>
    

    I’m

    • Changed type

      Sunday, September 8, 2013 1:47 PM
      redirection

User1029168723 posted

hello 

IE shows syntax error on line:4 char:1 n i dont know how to remove it,

<%@
Page Language=»C#»
AutoEventWireup=»true»
CodeFile=»ReportGoogle.aspx.cs»
Inherits=»_Default» %>

<%@ Register
Assembly=»System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35″

Namespace=»System.Web.UI»
TagPrefix=»asp» %>


<!DOCTYPE
html PUBLIC
«-//W3C//DTD XHTML 1.0 Transitional//EN»
«http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd»>

<html xmlns:v=»urn:schemas-microsoft-com:vml»
xmlns=»http://www.w3.org/1999/xhtml»>

<head runat=»server»>

<title>tracking system</title>

<script
src=»http://maps.google.com/maps?file=api&amp;v=2&amp;key=ABQIAAAALgJTl-cA5x9I2Yn_apso8xTy6Ht-P5h47nFSnHiMEYJHGQ7rDxTETmU7fzSZGcOHiSZCRwCIra3_0Q»

type=»text/javascript»>

</script>


</head>

<body onload=»load2()»
onunload=»GUnload()»
style=»padding-right: 0px; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px»
id=»check»>


<form
id=»Form1″
runat=»server»>

<table
style=»width: 0px; border-top-style: none; border-right-style: none; border-left-style: none;

height: 0px; border-bottom-style: none»>

<tr>

<td
id=»map»
colspan=»2″
rowspan=»3″
style=»width: 500px; height: 500px»
valign=»top»>

…………………………

<asp:ScriptManager
runat=»server»
ID=»scriptManager»>

<Services>

<asp:ServiceReference
Path=»read_location.asmx»
/>

</Services>

<Scripts>

<asp:ScriptReference
Path=»javafuncReport.js»
/>

<asp:ScriptReference
Path=»read_location.asmx»
/>

</Scripts>


</asp:ScriptManager>

</form>


</body>

</html>

——————————-js file———————————-


var map;



var i;



var j;



var to;



var from;


function load2()

{

if (GBrowserIsCompatible()) {

map = new GMap2(document.getElementById(«map»));

map.addControl(new GMapTypeControl);


map.addControl(
new GLargeMapControl);map.setCenter(new GLatLng(48,34),10);

read_location.GetLocation(onSuccess,onError);

}

}

function call()

{

read_location.GetLocationReport(document.getElementById(«SFromYear»).value.toString(),document.getElementById(«SFromMonth»).value.toString(),document.getElementById(«SFromDay»).value.toString(),document.getElementById(«SFromHour»).value.toString(),document.getElementById(«SFromMinute»).value.toString(),document.getElementById(«SToYear»).value.toString(),document.getElementById(«SToMonth»).value.toString(),document.getElementById(«SToDay»).value.toString(),document.getElementById(«SToHour»).value.toString(),document.getElementById(«SToMinute»).value.toString(),onSuccessReport,onErrorReport);

}

//———————————————————————————————

function onSuccess(result){

var lon = result[0];


var s_lon=Math.floor(lon).toString()+» «;

var a_lon=Math.floor((lon-Math.floor(lon))*60);


s_lon=s_lon+a_lon.toString()+
«‘»;

var b_lon=((lon-Math.floor(lon))*60)-a_lon;


s_lon=s_lon+Math.floor(b_lon*60).toString()+
«»»;

var lat = result[1];

var s_lat=Math.floor(lat).toString()+» «;


var a_lat=Math.floor((lat-Math.floor(lat))*60);

s_lat=s_lat+a_lat.toString()+«‘»;


var b_lat=((lat-Math.floor(lat))*60)-a_lat;s_lat=s_lat+Math.floor(b_lat*60).toString()+«»»;

var speed=result[2];


var direction=result[3];

//—————————


var second=result[4];

var minute=result[5];


var hour=result[6];

var day=result[7];


var month=result[8];

var year=result[9];

//————————


var point =
new GLatLng(lat,lon);

var icon =
new GIcon();


var directionn;

icon.image = «image/carN.png»;


directionn=
«North»;

if(direction>22.5) {icon.image =
«image/carNE.png»; directionn=«North-East»;}


if(direction>67.5) {icon.image =
«image/carE.png»; directionn=«East»;}

if(direction>112.5){icon.image =
«image/carSE.png»; directionn=«South-East»;}


if(direction>157.5){icon.image =
«image/carS.png»; directionn=«South»;}

if(direction>202.5){icon.image =
«image/carSW.png»; directionn=«South-West»;}


if(direction>247.5){icon.image =
«image/carW.png»; directionn=«West»;}

if(direction>292.5){icon.image =
«image/carNW.png»; directionn=«North-West»;}


if(direction==0){icon.image =
«image/carStop.png»; directionn=«No-Direction»;}

//icon.shadow = «http://labs.google.com/ridefinder/images/mm_20_shadow.png»;


icon.iconSize = new GSize(30,30);

//icon.shadowSize = new GSize(22, 20);


icon.iconAnchor = new GPoint(6, 20);icon.infoWindowAnchor =
new GPoint(5, 1);

if(lat>0 && lon>0)

{

map.addOverlay(new GMarker(point, icon));


window.setTimeout(
function() { map.panTo(point);}, 100);

//———————————————————-


var time=hour.toString()+«:»;

if(minute<10){time=time+«0»;} time=time+minute.toString()+«:»;


if(second<10){time=time+«0»;} time=time+second.toString()+» «;

if(day<10) {time=time+«0»;} time=time+day.toString()+«.»;


if(month<10) {time=time+«0»;} time=time+month.toString()+«.»+year.toString();

document.getElementById(«info»).value=«Location: («+s_lat.toString()+«,»+s_lon.toString()+«)n»


+«Speed: «+speed.toString()+«nDirection: «+directionn.toString()+«nTime:
«
+time.toString();

}

else


{

document.getElementById(«info»).value=«No information is available for selected car.»;

}

}

//———————————————————————————————


function onError(result){alert(«error:1»);}

function onErrorReport(result){alert(«error:2»);}

function onErrorFor(result){alert(«error:3»);}

function delay(){alert(«Delay»);}


//———————————————————————————————

function onSuccessReport(result)

{

from=result[0];

to=result[1];


if(to-from>86400 || to-from<0) {alert(«Maximum interval is one day»);}


else

{ var source=from;while(source<to)

{

var des=source+3600;

alert(source);

setTimeout(«delay()»,60000);

read_location.GetLocationReportPoint(source.toString(),des.toString(),onSuccessFor,onErrorFor);

source=source+3600;

}

}

}

//———————————————————————————————-

function onSuccessFor(result)

{

i=0;


var lat0 = result[0];


var lon0 = result[1];while (result[i]>0)

{

var lat = result[i];


var s_lat=Math.floor(lat).toString()+» «;

var a_lat=Math.floor((lat-Math.floor(lat))*60);


s_lat=s_lat+a_lat.toString()+
«‘»;

var b_lat=((lat-Math.floor(lat))*60)-a_lat;


s_lat=s_lat+Math.floor(b_lat*60).toString()+
«»»;

var lon = result[i+1];

var s_lon=Math.floor(lon).toString()+» «;


var a_lon=Math.floor((lon-Math.floor(lon))*60);

s_lon=s_lon+a_lon.toString()+«‘»;


var b_lon=((lon-Math.floor(lon))*60)-a_lon;s_lon=s_lon+Math.floor(b_lon*60).toString()+«»»;

var speed=result[i+2];


var direction=result[i+3];

var second=result[i+4];


var minute=result[i+5];

var hour=result[i+6];


var day=result[i+7];

var month=result[i+8];


var year=result[i+9];

var polyline =


new GPolyline([new GLatLng(lat0,lon0),new GLatLng(lat,lon)],
«#FF0000», 2,1);

map.addOverlay(polyline);

var point =
new GLatLng(lat,lon);


window.setTimeout(
function() { map.panTo(point);}, 100);

var directionn;

directionn=«North»;


if(direction>22.5) {directionn=«North-East»;}

if(direction>67.5) {directionn=«East»;}


if(direction>112.5){directionn=«South-East»;}

if(direction>157.5){directionn=«South»;}


if(direction>202.5){directionn=«South-West»;}

if(direction>247.5){directionn=«West»;}


if(direction>292.5){directionn=«North-West»;}if(direction==0)
{directionn=
«No-Direction»;}

lon0=lon; lat0=lat;

i=i+10;

} }

Regards:Samira

Понравилась статья? Поделить с друзьями:
  • Explorer exe ошибка при выполнении приложения сервера windows 7
  • Explorer exe unknown hard error что делать
  • Explorer exe system error
  • Exploit is currently patched please wait for the developers to fix it как исправить
  • Ezviz ошибка 260023