Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Reload page on update in Database

Status
Not open for further replies.

murugesanks

Programmer
Jan 25, 2001
48
0
0
US
Hi all,

this is my requirement : Reload the page(e.g reload.asp), when there is a update in TABLE1 of Database.

(my plan is, to write a trigger. reload the page when trigger fires. but i don't know how far it will work.)

thanks in advance
Murugesan
 
well if you are updating at the top of the page, and selecting at the bottom, then you shouldn't need to reload it should draw the new data.

What exactly are you doing?

www.sitesd.com
ASP WEB DEVELOPMENT
 
Site Administrator will update into table. the updated data should be visible to users immediatly. ( the end users will not aware of updating)

Typical example is. Online Cricket Score site.
at one end, administrator will be updating data.
the other end, users will be able to view the latest scores. in this case, the score page REFRESHES Periodically. I don't want to REFRESH my page Periodically.
When there is an update in table, the result should refeclt. (i.e the page is need to Reload/REFRESH)
 
Two ways that i would see doable:

1. Refresh periodicly with header code

or use iframe to check to see if there is a change if there is then refresh the main window, this is how I would do it.


<meta http-equiv="refresh" content="6;URL=http://www.the_domain.com/">


6 being the seconds to refresh


for the iframe 1, just put a really small iframe in the page somewhere, this use the code above to refresh the iframe, on the iframe page check your db for new records or change.

when the user goes to the main page, you could also send to the iframe a querystring

like so: iframe_page.asp?the_data_currently=35

then just refresh the iframe, checking to see if it changes from 35 and if so, refresh the main window.


Hope that helps.
Jason

www.sitesd.com
ASP WEB DEVELOPMENT
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top