15,891,253 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View Python questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by omgade (Top 4 by date)
omgade
3-Apr-15 4:06am
View
<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>
<html xmlns='http://www.w3.org/1999/xhtml' >
<head>
<title>AJAX Upload Progress & Cancel Upload</title>
<script type='text/javascript'>
var file;
function prepareUpload()
{
document.getElementById('fileSize').innerHTML = '';
document.getElementById('bytesUploaded').innerHTML = '';
document.getElementById('percentUploaded').innerHTML = '';
document.getElementById('uploadProgressBar').style.width = '0%';
// get file name
file = document.getElementById('file').value;
if(file.lastIndexOf('\\')>=0)
file = file.substr(file.lastIndexOf('\\')+1);
document.getElementById('fileName').innerHTML = file;
// get folder path
var curFolder = window.location.href;
if(curFolder[curFolder.length-1]!='/')
curFolder = curFolder.substring(0, curFolder.lastIndexOf('/')+1);
document.getElementById('target').innerHTML = curFolder;
document.getElementById('frm').action = curFolder;
}
var timerId;
function formSubmit()
{
timerId = setInterval('updateProgress()', 1000);
document.getElementById('cancelUploadBtn').disabled = false;
}
function updateProgress()
{
var request = window.ActiveXObject ? new ActiveXObject("Microsoft.XMLHTTP") : new XMLHttpRequest();
var uploadTarget = document.getElementById("frm").action + file;
request.open("REPORT", uploadTarget, true);
request.send("<upload-progress xmlns="ithit">");
var resp = request.responseText;
// Extract number of bytes uploaded and total content length of the file.
// Usually you will use XML DOM or regular expressions for this purposes
// but here for the sake of simplicity we will just extract using string methods.
var size;
var sizeIndex = resp.indexOf("total-content-length");
if(sizeIndex != -1)
{
size = resp.substring(resp.indexOf(">", sizeIndex)+1, resp.indexOf("", bytesIndex)+1, resp.indexOf("</iframe>";
clearInterval(timerId);
document.getElementById("cancelUploadBtn").disabled = true;
}
</script>
</head>
<body>
<span id="uploadFrameHolder" style="display:none"><iframe name="uploadFrame" ></iframe></span>
<form id="frm" method="POST" enctype="multipart/form-data" action="/" target="uploadFrame" >
<input type="file" id="file" name="dummyname" /
omgade
19-Mar-15 7:40am
View
But developer express provide application style
omgade
9-May-13 0:53am
View
Not need posting code, you just take button on windows form & run that project-> then open task manager->go to process-> go on your application .vshost.exe ->check application Memory (Private working set)->then click on windows form button-> again check private working set memory(this process done more times)private working set memory will be continuous increase.My application fetch large data from sever as well as application can not close long time(month/year).
omgade
22-Apr-13 8:54am
View
behind that button is large process.when i click in button more times then software throw error
is"Out Of Memory Exception"its very critical because my application is use 24X7 hours without closing.