Context Root of Local Host is not working in Internet Explorer 11 version

Hi, My local host (http://localhost:8080/) is working fine with Internet Explorer 11 (IE11) version. But context root (http://localhost:8080/context-root) is not working??

While opening the product through IE11 the http://localhost:8080/context-root, its not showing any page, it's simply showing blank page. In that there is showing below two errors

SCRIPT1003: Expected ':'

File: context.js, Line: 1980, Column: 50


{
						iframe = $('<iframe src="' + jsFalse + '" name="' + name + '" style="display:none"></iframe>');
						iframe.addClass('iframe-transport');
						form.attr('accept-charset', 'utf-8');
						$("body").append(iframe);
						iframe.append(form);
                        [b]iframe.bind("load", {form,collider} ,winLoader);[/b]
					}

Open in new window


The error was mentioned in bold. and Another error is:

SCRIPT5009: '$' is undefined

File: default.js, Line: 1, Column: 1


$(function () {
	context.start(context.view.Application);
});

Open in new window


But the same localhost cite is working fine with chrome and Mozilla. Can anyone help me on this. Thanks in advance
Boopathy SAsked:
Who is Participating?
 
MrunalCommented:
Here is alternative to arrow function:

<script>

        function sayHello() {

           var pairs = [{name:'Hydrogen', value: 'value1'}, {name:'', value: 'value1'}];
	   pairs.map(function(pair) { 
		alert((pair.name || 'dn') + '=' + (pair.value || 'dv')); 
           });
        }

        sayHello();

</script>

Open in new window

0
 
MrunalCommented:
Seems you are using jQuery.js and default.js files.

If jQuery is not included in web page then you have to include reference.

You have to add reference to jQuery file before referencing default.js file in your web page.
This will resolve your error:
SCRIPT5009: '$' is undefined


Also you can open developer toolbar (F12) and check if any other errors are there.
0
 
Boopathy SAuthor Commented:
Hi Mrunal. Thanks for your reply. jQuery file is referencing default.js. Actually the below errors only I'm getting first. Then only I'm getting the SCRIPT5009: '$' is undefined. Please see and guide me on this

SCRIPT1003: Expected ':'
File: context.js, Line: 1980, Column: 50

SCRIPT5009: '$' is undefined
File: default.js, Line: 1, Column: 1
0
Cloud Class® Course: Certified Penetration Testing

This CPTE Certified Penetration Testing Engineer course covers everything you need to know about becoming a Certified Penetration Testing Engineer. Career Path: Professional roles include Ethical Hackers, Security Consultants, System Administrators, and Chief Security Officers.

 
MrunalCommented:
ok.
Now tell me what you want to achieve with this line:

iframe.bind("load", {form,collider} ,winLoader);

if you want to call some function on iframe load event using jQuery, then syntax is:
$(jQuery_Object_Here).load(function() {
  // Handler for .load() called.
});

Open in new window


Also check event data which you are passing to load event 'winLoader'. This syntax is throwing error.

Try once without passing event data and check if you are getting same error. Actually, you should not.
0
 
Boopathy SAuthor Commented:
Hi Mrunal. Thanks. Now I'm getting another error after without passing the event data

SCRIPT1002: Syntax error
File: context.js, Line: 21039, Column: 55

 
var value = this.get('pairs').map((pair) => (pair.name || '') + '=' + (pair.value || ''));

Open in new window


Error is on this above code. Please help me on this.
0
 
Boopathy SAuthor Commented:
Hi Mrunal. Please any update on this??
0
 
MrunalCommented:
Are you sure this is the line, which is throwing error?
Can you please share related code for this line like pairs definition ?
0
 
MrunalCommented:
Considering you are getting error at '=>'  arrow function declaration, you need to test it in supported browser.

Check here for supported browsers:

https://caniuse.com/#feat=arrow-functions

You can use alternative to arrow function, if you need to test on not supported browsers.
0
 
Boopathy SAuthor Commented:
Hi Mrunal. Thanks a lot. Its working well now.
0
 
Boopathy SAuthor Commented:
Thanks Mrunal
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.