Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I have a picture that is larger than the viewable area... and I need to add a scrollbar to the picture so that I can load the picture as per the scrollbar. I need to show the picture in a visual web part.

I cannot load the whole picture at once .. but load it in part with scrollbar as the control!!

I believe I need to use Ajax to load the picture and add scrollbar for it. I need to use visual web part and building a web part.

share|improve this question
    
That would take a lot of AJAX & jQuery to cover. Is there a reason why you don't put a DIV as a container around the img and then set fixed width and height on that DIV and then just put css overflow on it? –  Daniel Ziga Jan 8 '12 at 1:54
    
I did do that... I did put the scrollbar and placed css overflow on it but the requirement was to load the picture asynchronously... so that the loading of picture is dependent on the scrollbar.. –  Thisisme.. Jan 8 '12 at 21:33

1 Answer 1

Why don't you use jquery:

Scroll to detect the page scrolling:

http://api.jquery.com/scroll/

Offset to determine page position:

http://api.jquery.com/offset/

Ajax Get to load the picture:

api.jquery.com/jQuery.ajax/

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.