Visual Basic .NET » Web Forms
Ajax pictures -- kamal101 --


I have a big web page, displaying BIG pictures that are cropped.
Sometimes, the request to the image returns error 500 and doesn't display it. I tested it on my local machine, and i can see that when the web server (my machine) doesn't have a lot of memory (under 100 Mo), the picture won't display after the ajax request.

Here's the web site :
http://aspspider.biz/sonkun1999/FORMS/Login.aspx 
The Login name and password : u can type whatever Then U have to upload an analysis picture :
http://aspspider.biz/sonkun1999/Capture_00003_dos.JPG 
But before u have to make : Fichier --> Nouvelle analyse posturale (in french)
the patient name is already typed, just do OK Then here u can upload 4 types of body pictures : face, front, side,
back U have to upload the back picture. U have to click on Upload button of
"Image coté", the one at left and bottom.
Then click on the image uploaded. Then the men AdjustMediane appears.
It is at this menu that the problem occurs. But occurs only sometimes
(when the server is out of memory) It is also because I use big pictures : 1536 x 2048

My question is : is there a way to know with ajax library or javascript if the image is downloaded successfully.

Here's the code for the request of the image :
function request_Paint()
{
var depassementx = 1536 - screen.width;
depassementx /= 2;
frmAdjustMediane.picImage_Paint(depassementx, response_Paint);
}
function response_Paint(res)
{
if (res.error != null)
document.getElementById("err").innerHTML = res.error.Message;
else
{
document.getElementById("picImage").src = res.value.src;
}
}

-- kamal101 --


Would u recommend me using handlers (.ashx) for big pictures ?
Read the end of this post :
http://groups.google.com/group/ajaxpro/browse_thread/thread/237eba7c71c503e1/9cf1080d8f176564?q=image&rnum=2#9cf1080d8f176564 


[Submit Comment]Home