473,321 Members | 1,667 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,321 software developers and data experts.

Update an image URL without refreshing the page

jdi
Hello,
I have a seemingly basic question about ASP.NET. I would like to
create a page containing an image, which keeps swapping the url of the
image source, without refreshing the entire page. So when the page
first loads I'd like the image url to be "img1.gif"; then 20 seconds
later "img2.gif"; then "img3.gif", and so on. All this should take
place dynamically without refreshing the page.

Any help would be appreciated.

thanks.
Nov 17 '05 #1
2 2521
Yes, use javascript to cache your images on the client-
side and swap them out when a timeout occurs. Use
window.setTimeout to implement your timer and just change
the src of your image element on each timeout.
-----Original Message-----
Hello,
I have a seemingly basic question about ASP.NET. I would like tocreate a page containing an image, which keeps swapping the url of theimage source, without refreshing the entire page. So when the pagefirst loads I'd like the image url to be "img1.gif"; then 20 secondslater "img2.gif"; then "img3.gif", and so on. All this should takeplace dynamically without refreshing the page.

Any help would be appreciated.

thanks.
.

Nov 17 '05 #2
jdi
> Yes, use javascript to cache your images on the client-
side and swap them out when a timeout occurs. Use
window.setTimeout to implement your timer and just change
the src of your image element on each timeout.
-----Original Message-----
Hello,
I have a seemingly basic question about ASP.NET. I would

like to
create a page containing an image, which keeps swapping

the url of the
image source, without refreshing the entire page. So

when the page
first loads I'd like the image url to be "img1.gif"; then

20 seconds
later "img2.gif"; then "img3.gif", and so on. All this

should take
place dynamically without refreshing the page.

Any help would be appreciated.

thanks.
.


Thanks for the info. I was wondering, however, if there is anyway of
doing this using pure ASP.NET code and no javascript?

thanks.
Nov 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Ken | last post by:
How does IE6 control the display of images? I change the content of a image file image1.jpg without changing the file name. Then jump to a new page to display it. IE6 does not displays the...
1
by: cguillot | last post by:
Hello, I have a web page that displays information from a SQL database and this information can change frequently. Basically, a database entry is made into a table every time a person enters or...
4
by: Jim Hammond | last post by:
It would be udeful to be able to get the current on-screen values from a FormView that is databound to an ObjectDataSource by using a callback instead of a postback. For example: public void...
1
by: julian_m | last post by:
I've, inside an html page, an image which is created through a php file : <img src="<?php echo 'captcha.php'; ?>"> file captcha.php, sends header("Content-type: image/png"); All works...
6
by: Mark Denardo | last post by:
My question is similar to one someone posted a few months back, but I don't see any replies. Basically I want to be able to have users upload photos and save them in a database (as byte data)...
1
by: pdesai007 | last post by:
hello, i tried to upload an image in to server with asp and java script ( using AJAX) but it gave an error. so please give me any solution that help me to upload an image to server with java...
6
by: mistral | last post by:
Is there way change image (swap) on click on thumbnail without javascript? I.e. main image is big(preview), and below it is two small images - when click on small image, it should change big image....
5
by: handoyo | last post by:
Hi all,i'm trying to show updated data in existing html td.. For example i got column that show last modified datetime,then i want to update data again,the column will changed to current time without...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.