Backbone.js, IE 8 and Win 7 - backbone.js

Just started to work in backbone.js and asp.net. The code is working fine in Firefox and the same code is not working in IE 8. Do I need to config something to make it work in IE 8?
Console.log works only in Firefox, not sure where to see the logged messsage in IE8 (already using the developer tool of IE 8).
Thanks

In IE 8 you can go to the "Script" tab (you'll see it on the left where there's HTML, CSS, Script, and Profiler tabs) and the console is on the right hand side in that tab.
And the answer to your first question is no, there's nothing special for Backbone.js and IE, you probably have some JavaScript that is perfectly standards compliant and of course, IE 8 doesn't like it.
For example, don't end a list with a trailing comma:
{
"something" : "value",
"other" : "different value",
}
would be fine in Firefox, not-so-much in IE.
Good luck.

I ran into this on my last project. Items like the one mentioned by John can be flagged by running your code through jslint. The trailing comma was my biggest offender
You can use http://www.jslint.com/ and cut down on some of the errors and warning that are not related to running in IE.

Related

Ext Post converts characters in IE11

I noticed that in IE11 and Edge (but not Chrome), Extjs6 is encoding my jsonData in a strange way. If I do a POST with the string '‎8‎/‎17‎/‎2016 13:07:00' as one of the jsonData parameters, it will pass '\u200e8\u200e/\u200e17\u200e/\u200e2016 13:07:00' in the request body.
I also noticed that if I enter Ext.JSON.encode('‎8‎/‎17‎/‎2016 13:07:00') into the console that it converts the string in the same way. I suspect that Extjs is using IE's encoder (since Chrome works), so it is really an IE issue and not an Extjs issue. Can you please explain why this happens and if there is a format that will not convert improperly for my POST?
There is a simple mistake here as far as i think.
Do
Ext.JSON.encode("8/17/2016 13:07:00")
instead of
Ext.JSON.encode('8/17/2016 13:07:00')
then it will take it as the string that you want.
And ya one more thing, this issue will be in latest chrome version also.
Once I discovered the issue is with toLocaleDateString(), then I found this post which answered the question:
ToLocaleDateString() changes in IE11
Instead of Ext.encode(new Date('2016-08-17T06:37:00').toLocaleDateString()), use Ext.encode(new Date('2016-08-17T06:37:00').toLocaleDateString().replace(/\u200E/g, ''))

Why does angularjs interpolation fail in IE 11?

I have a simple directive that creates a toolbar from an array of tool objects
<div ng-repeat="tool in tb.tools">
<button id="{{tool.name}}" class="btn"
aa-tool-button="tb.state.selectedTool"
ng-click="tb.toggleSelected(tool)"
style="background-color:{{tool.color}}">
{{tool.caption}}
</button>
</div>
In Chrome, Firefox, Safari and Edge this works fine. But the button color isn't being interpolated in IE 11. The interpolation is failing for some reason. This is what shows up in the IE element inspector:
resulting in an empty style tag and default gray buttons.
Can anyone suggest a reasonable workaround for this?
This looks ugly, better use:
ng-style="{'background-color': tool.color}"
works fine
In short, avoid "{{value}}" syntax entirely.
Interpolation/Transclusion, in general, don't seem to work with Internet Explorer 10 and 11, at least in Angular version 1.5.5. It may have been fixed in a subsequent version.
The work around is to use ng attributes instead of using interpolation, and ng-bind (creating a span to bind too if needed) for generic text injection. These are probably best practice anyway.
Having debugged it, the underlying cause seems to be that ultimately j-query is used to set the text value of the node, which works fine with most browsers, as the text node is either implicitly present, or automatically created, but these versions of IE require a text node to be explicitly created first. A newer version of j-query may address this (we're using 2.2).
Further information can be found here:
https://github.com/angular-ui/ui-router/issues/615
https://github.com/angular/angular.js/issues/5025

Viewing an array and tuple in Xcode 6.3 Playground

Prior to Xcode 6.3 when I clicked the Quick Look icon on the left in Playground file, it showed the array along with item indexes. Now it shows only "X elements" text and nothing else. Same thing happened with tuples. It's quite annoying since not always all elements fit in the sidebar. How to fix this?
This seems to be happening with Xcode Version 6.3.2 (6D2105). Occasionally I even get a blank Quicklook pane, so it seems there may be a bug with the Quicklook feature. I have submitted a bug report to Apple (21135520)

(ExtJS 4.x) Mask not showing in IE 8

I have a wait massage that is being shown to cover the page until the call is done with database and it doesn't work in IE 8, though it works for FF, the code I am using is
panel.body.mask('Loading. Please wait...', 'x-mask-loading');
and when it finishes the call i make it dissapear by
panel.body.unmask();
this works in FF however in IE it doesn't do any effects, but the forms are submitted.
Try this, one google search away, first hit.
http://www.sencha.com/forum/showthread.php?89107-doesnt-display-masking-panel-in-IE8

Paragraph character in URL?

I just ran across this an Google App Engine article that uses that funny backwards 'P' character in some URL's (look near the top of the first code box). You know that character that your high school English teacher used to mark new paragraphs (which I've learned, thanks to Wikipedia, is called a "pilcrow").
I've never seen this in a URL. So which is it?
This has a standard specific meaning which is ...
This is a typo, it should be ...
This is something that somebody at Google just made up. What they might mean is ...
What character? I'm seeing things.
&para is in the URL which forms part of the html escape sequence ¶, i.e. ¶. It is odd browser behavior that, given the escape sequence is not complete (missing ;), Chrome is still rendering the symbol. The escape sequence itself has just not been escaped correctly in the snippet I believe..
What happens is that the page contains the sequence &para some browsers (Chrome at least) interpret that as if it was ¶ the escape code for the symbol ¶. Funny browser behaviour, but the page should not have contained raw ampersands.
Escaping everything properly and dealing with divergent browser behavior is a pain: Accidental HTML entities in urls.
The odd thing in this case is that &param should not be recognized by the browser as &para and then m.
My shot... rendering bug.
IE - shows it
Chrome - Shows it
FireFox - Displays the correct & symbol (used in URLS+parameters)
Checked source with the 3 browsers, and they all show the & char.

Resources