Click here to Skip to main content
15,900,815 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi Team,
I have 4 images or more than four in IIS.
Images contain the user Record such as mobile Number,Firstname,lastname..etc.
I want to assign the images one after another in WebPage.I dont want to hardcode the images.After saving the all record of first image ,second image should get show with his first record.
My problem is i can see the record of second image but i cant see the second image.Kindly help
please find the code:

function GetNextRecordCollection() {
debugger;
$.ajax({
url: 'Default.aspx/GetNextRecordCollection',
type: 'POST',
contentType: 'application/json; charset=utf-8',
dataType: "json",
success: function (result) {
if (result.d != '') {
debugger;
/*getting converted into arrayObject*/
customerLoanOcrList = JSON.parse(result.d);
if (customerLoanOcrList != '' && customerLoanOcrList != null && customerLoanOcrList.length > 0) {
$('#RawImageForOCR').attr("src", customerLoanOcrList[0].FileName);
ocrListIndex = 0;
setFormFields(customerLoanOcrList[ocrListIndex]);
recordLength = customerLoanOcrList.length;
scrolled = minTopScroll;
if (customerLoanOcrList[ocrListIndex].RecordNo > 1) {
scrolled = scrolled * customerLoanOcrList[ocrListIndex].RecordNo;
}

SetInitialScroll();
}

manageOverlay(false);
}
},
error: function (error) {
manageOverlay(false);
alert(error.responseText);
},
async: false
});
};

i have set the image path in Web Config
<appsetting>
<add key="OCRIMAGEPATH" value="http://localhost/OCRIMAGES//">



On NextButton Click
on next button my team have done this.
var customerLoanOcrList;
var isAdded = saveCustomerLoanRecord();
if (isAdded == true) {
ocrListIndex = ocrListIndex + 1;
if ((scrolled + minTopScroll) < $("#divImage")[0].scrollHeight)

scrolled = scrolled + minTopScroll; //$("#divImage")[0].scrollHeight;

// Set next records values..
if (ocrListIndex < recordLength) {
setFormFields(customerLoanOcrList[ocrListIndex]);
}
else {
GetNextRecordCollection();
}

//Scroll image for next record
$("#divImage").animate({
scrollTop: scrolled
});

Further i am confused how to show second image???
Posted

1 solution

i got the solution
Image name was not correct.
i have the images in one folder.lets take one example image Name is harshal12_67.jpg.
and in SQL i have the imagename like harshal12.jpg.

Thanks
Harshal.
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 12-Mar-14 13:25pm    
Not an answer. Such posts are considered as abuse. Use comments or "Improve question" instead.
—SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900