internet-explorer-8

How to add non-enumerable property in JavaScript for IE8?

我只是一个虾纸丫 提交于 2019-12-12 22:41:09
问题 Is there a way to add "hidden" non-enumerable properties to a JavaScript object that works cross-browser? For most modern browsers, you can do: Object.defineProperty(obj, '__id__', { enumerable: false, value: id++ }); For some older non-IE browsers that don't have Object.defineProperty , you can use the __proto__ hack. None of those, however, work for IE. Is there a way to accomplish this in IE8 (would be cool if IE7 too, but not necessary)? The main goal is to be able to add tracker

pageX pageY not working in IE8 if i add <!DOCTYPE html>

醉酒当歌 提交于 2019-12-12 21:27:03
问题 Hey guys i have the following script which gives me cursor position when i move the mouse . this script works fine in chrome,FF and even in IE 8(without !doctype html ) if add !DOCTYPE html to the html page. it gives me object doesnt support this property error. and the below given line is causing the problem document.captureEvents(Event.MOUSEMOVE); How can i fix this problem with !DOCTYPE html included in IE 8. window.onload = init; function init() { if (window.Event) { document

Javascript Save CSV file in IE 8/IE 9 without using window.open()

感情迁移 提交于 2019-12-12 20:18:40
问题 I need to download a csv file using javascript in IE 8 and IE9.I tried using window.open(). Here is my code: var URI = 'data:text/csv;charset=utf-8,'; var fileName = "text.csv"; var testlink = window.open("about:blank", "_blank"); testlink.document.write(fileData); //fileData has contents for the file testlink.document.close(); testlink.document.execCommand('SaveAs', false, fileName); testlink.close(); This opens a new window and prompts to save the file.After saving the file,it returns back

Javascript Message Out of Stack Space in IE8

落爺英雄遲暮 提交于 2019-12-12 19:58:05
问题 I'm using Breeze 1.4.1, Internet Explorer 8, and ASP.NET MVC 4 Web API. I received the following message when querying: Query failed: Metadata import failed for localhost:port/breeze/Data/Metadata; Unable to process returned metadata:Out of stack space It works on firefox/chrome. Any suggestions on a workaround? Unfortunately I am stuck with IE8 for production code. 回答1: Have you reviewed the Breeze supported browsers page? It describes certain shims that are necessary if you use IE8. In

Debugging Visual Studio 2010/IE 8 - Unable to start program - Element not found

旧巷老猫 提交于 2019-12-12 18:35:08
问题 When trying to debug an MVC2 app in VS2010 using IE 8, I sometimes get the following error (port number changes). Unable to Start program 'http://localhost:55853/' Element not found It is really difficult to find the problem as it seems to be totally random. Has anyone else come across this problem? 回答1: Tools > Internet Options > Advanced Under the Browsing Section --- Uncheck the "Disable Script Debugging (Internet Explorer) 回答2: if you had to add the DWORD TabProcGrowth to your registry in

IE8 does not submit hidden input in form

不打扰是莪最后的温柔 提交于 2019-12-12 18:34:56
问题 I found this form in a project and it works fine in Chrome but not in Internet Explorer. IE8 does submit the form as POST but does not send the hidden input: <form name="logout_frm" id="logout" action="index.php" method="post"> <label>Logout</label> <input type="hidden" name="logout" value="1" /> <input type="submit" name="logoutBtn" value="logout" /> </form> This is the raw data I get from fiddle2 also WebForms Tab is empty: POST https://example.com/index.php HTTP/1.1 Accept: application/x

Drop-down list in IE8 using <select> truncates option text [duplicate]

那年仲夏 提交于 2019-12-12 18:17:36
问题 This question already has answers here : Closed 7 years ago . Possible Duplicate: fix size drop down with long text in options (restricted view in IE) Drop-down lists do not work properly on IE8. Options with long text are truncated. Firefox and Chrome work fine and adjust the list window according to the longest option's text. The following HTML is an example: <html> <body> <select STYLE="width: 150px" onchange="javascript:window.open(this.value)"> <option value="week1.html">option 1</option

IE8 negative margin issue

你说的曾经没有我的故事 提交于 2019-12-12 17:08:42
问题 I have a layout issue in IE8 only where a negative margin does strange things. I have tried to use some of the fixes I have found in this forum, but to no avail. It is Friday night after all! The page is here: http://community.thelandtrust.org.uk/wordpress/ The culprit is the search field on the right hand side, which has a negative margin to allow the button to sit over it on the same line. It works fine in all but IE8. In IE8, with a right margin of -80px the button is over the field but

IE8 inserting text to textarea problem

余生颓废 提交于 2019-12-12 16:44:59
问题 I have some code to insert tags to textarea (for Internet Explorer). But I have problem with IE8. If there is lots of text and I try to insert text somewhere in the end - it's scrolled up. Code: <script type="text/javascript"> function bold() { var text1 = document.getElementById('text1'); var sel = ''; if (document.selection) { sel = document.selection.createRange(); sel = sel.text; } if(sel) { text1.focus(); document.selection.createRange().text = '<strong>' + sel + '</strong>'; } } <

jquery adding click event to dynamically created element

故事扮演 提交于 2019-12-12 15:37:37
问题 i have the need to add a click event to a list item i create dynamically after the DOM has loaded. I'm using ; $("#ListDiv li").live("click",function(event){ do something...... }); however when the element is loaded on the page and i click it i get nothing. This works fine in Firefox but not in IE8. I also tried jquery livequery and deleagte but neither worked. I tried debugging with IE8 developer tools but the method is never reached 回答1: Use .delegate or .live and make sure you bind once