开发者

display stream of images without refreshing the webpage to give user a video like experience

I have a series of images generated at the servlet. I want to show the images on a JSP page. I want to show the images in a way that the JSP page is not refreshed only the image gets refreshed and get replaced by the new one. I thought of doing it with the help of applet or AJAX. But I am still looking开发者_Python百科 for some convenient way of doing it. can anyone suggest some way of doing it? Any help is much appreciated.

Thanks in advance.


I'd go with JavaScript if I were you. It should be pretty simple to have a list of images and set a timer to change the source of the image tag every second (or whatever). You probably don't even need "real" AJAX for that... just changing the attributes in the DOM.

Admittedly it may not look great if the images take a while to load - you might want to have some cunning mechanism to load all the images beforehand, and then change which one is visible at any one time, or something like that. It still shouldn't need AJAX or an applet though.

I'm not sure I'd describe this as a "video-like" experience - more like a slide-show - but it should be okay. If you want real video, use video :)


There are a lot of simple jQuery image slideshow libraries that are easily added to your page and can add some great effects - for example:

http://nivo.dev7studios.com/#usage

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜