Click here to Skip to main content
12,943,742 members (55,534 online)

JavaScript

 
AnswerRe: Problem with IE 9 Pin
twseitex19-Oct-12 7:39
membertwseitex19-Oct-12 7:39 
Questionwindow.open not working inside frame in google chrome. Pin
Virjin Antony10-Oct-12 1:57
memberVirjin Antony10-Oct-12 1:57 
AnswerRe: window.open not working inside frame in google chrome. Pin
twseitex19-Oct-12 8:28
membertwseitex19-Oct-12 8:28 
AnswerRe: window.open not working inside frame in google chrome. Pin
saimimtiaz28-Oct-12 8:19
membersaimimtiaz28-Oct-12 8:19 
QuestionFileUpload Inside a Gridview ItemTemplate Pin
Member 79103609-Oct-12 19:25
memberMember 79103609-Oct-12 19:25 
AnswerRe: FileUpload Inside a Gridview ItemTemplate Pin
Mohibur Rashid9-Oct-12 21:22
memberMohibur Rashid9-Oct-12 21:22 
AnswerRe: FileUpload Inside a Gridview ItemTemplate Pin
kavittrivedi16-Oct-12 2:29
memberkavittrivedi16-Oct-12 2:29 
QuestionFile Upload in IE Pin
ziggyfish9-Oct-12 15:26
memberziggyfish9-Oct-12 15:26 
Hi,

In firefox, and chrome, I have a progress bar when someone uploads a file, however the same code doesn't work in IE (surprise surprise), it fails on:

var file = this.files[0];


My question is how do I do the equivalent for IE? Pointing me to the documentation would best.

code is:
function uploadImage(){
			$('#percent').progressbar({
				value: 0
			});
			$( "#dialog" ).dialog({
			resizable: false,
			height:150,
			modal: true,
			buttons: {
				Cancel: function() {
					if (xhr){
						xhr.abort();
						xhr = null;
					}
					$( this ).dialog( "close" );
				}
			}
			});
			document.getElementById('photo').addEventListener('change', function(e) {
				var file = this.files[0];
				var formdata = new FormData();
				formdata.append('file', file);
				xhr = new XMLHttpRequest();
				xhr.file = file; 
				xhr.addEventListener('progress', function(e) {
					var done = e.position || e.loaded, total = e.totalSize || e.total;
					$('#percent').progressbar('value', (Math.floor(done/total*1000)/10));
				}, false);
				if ( xhr.upload ) {
					xhr.upload.onprogress = function(e) {
						var done = e.position || e.loaded, total = e.totalSize || e.total;
						$('#percent').progressbar('value', (Math.floor(done/total*1000)/10));
 
					};
				}
				xhr.onreadystatechange = function(e) {
					if ( 4 == this.readyState ) {
						console.log(this);
						$('#src').val(this.responseText);
						$('#dialog').dialog('close');
						xhr = null;
					}
				};
				xhr.open('post', '/index/fileupload', true);
				xhr.send(formdata);
			}, false);
		}

AnswerRe: File Upload in IE Pin
twseitex19-Oct-12 8:31
membertwseitex19-Oct-12 8:31 
Questionbitwise operator question Pin
Roger Burke9-Oct-12 13:19
memberRoger Burke9-Oct-12 13:19 
AnswerRe: bitwise operator question Pin
ziggyfish9-Oct-12 15:31
memberziggyfish9-Oct-12 15:31 
Question“Object doesn't support property or method 'ready'” Pin
Rohit Kesharwani9-Oct-12 1:42
memberRohit Kesharwani9-Oct-12 1:42 
AnswerRe: “Object doesn't support property or method 'ready'” Pin
Graham Breach9-Oct-12 20:55
memberGraham Breach9-Oct-12 20:55 
QuestionTried Typescript? What's your first impressions? Pin
AlluvialDeposit5-Oct-12 2:01
memberAlluvialDeposit5-Oct-12 2:01 
AnswerRe: Tried Typescript? What's your first impressions? Pin
n.podbielski8-Oct-12 23:52
membern.podbielski8-Oct-12 23:52 
GeneralRe: Tried Typescript? What's your first impressions? Pin
Ravi Bhavnani11-Oct-12 9:00
memberRavi Bhavnani11-Oct-12 9:00 
AnswerRe: Tried Typescript? What's your first impressions? Pin
n.podbielski11-Oct-12 20:25
membern.podbielski11-Oct-12 20:25 
QuestionHow to resolve following specific bug in IE 10? Pin
Ambesha5-Oct-12 1:15
memberAmbesha5-Oct-12 1:15 
AnswerCrosspost Pin
Peter_in_27805-Oct-12 2:22
memberPeter_in_27805-Oct-12 2:22 
QuestionFind the selected radio button immediately using the 'this' variable in he javascript Pin
hiredotnet4-Oct-12 20:53
memberhiredotnet4-Oct-12 20:53 
AnswerRe: Find the selected radio button immediately using the 'this' variable in he javascript Pin
john-ph5-Oct-12 4:02
memberjohn-ph5-Oct-12 4:02 
QuestionPreventing Duplicate Form Submissions in JavaScript Pin
hiredotnet3-Oct-12 19:10
memberhiredotnet3-Oct-12 19:10 
QuestionUnit testing in JavaScript Pin
hiredotnet2-Oct-12 21:01
memberhiredotnet2-Oct-12 21:01 
AnswerRe: Unit testing in JavaScript Pin
Spiff Dog9-Oct-12 9:43
memberSpiff Dog9-Oct-12 9:43 
QuestionCreating a vertical auto-hide toolbar Pin
Chen Renjun26-Sep-12 17:02
memberChen Renjun26-Sep-12 17:02 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.


Advertise | Privacy | Mobile
Web01 | 2.8.170518.1 | Last Updated 22 May 2017
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid