The SitePoint Forums have moved.

You can now find them here.
This forum is now closed to new posts, but you can browse existing content.
You can find out more information about the move and how to open a new account (if necessary) here.
If you get stuck you can get support by emailing forums@sitepoint.com

If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Dynamcally Showing Information

Is there a way of dynamically showing information from a sql server database in a web page without doing a postback.

My goal is to display information from a sql server database everytime the underlying table has received a change. I will also need to have the ability to format the cells based on the information being populated.

If anyone knows of any technology on this topic, or has attempted to do something similar please respond. Even if it's not quite what I'm looking for, the advice given may spin me in the right direction.

It is my belief that this may require creating this web page through a sql server wizard that offers the ability to watch the table for underlying changes. However I am not so sure about how I would then format the information displayed. Has anyone used this technology before?

pinkpanther, basically from what I understand of what you've said, you're not looking for the server to 'push' new data out to the webpage, but rather for the webpage to do a seamless update with the server depending on user page interaction, upon which the page itself would dynamically change depending on the information returned by the db. I'll be interested to know other developers methods of tackling the same issue.

I've worked with that kind of thing many time and using a hidden frame (iframes are easiest to integrate) works perfectly for a seamless dynamic update of this type. Use the hidden frame to post information back to the server, which will return data and instructions (in this case most likely javascript) on how to update the page. Then with an update function and the html document referenced with ids in the neccessary areas, the page can seamlessly update itself with literally every keystroke, depending on your needs.

Using LAMP technology and a half descent internet connection this whole process can be so quick you wouldn't belive all the work going on in the background.

Hopefully this can set you in the right direction, let me know if this is what you're looking for, and I'll be happy to provide you with a few more pointers if needed.

Thankyou very much, that is exactly the kind of thing I am looking for!

Background on my web app:

*Built using the ASP.net technology (it uses vb.net and javascript)
*The information is currently being populated through on a timer (setTimeout funct)
*The setTimeout functions calls a javascript method that pushes a postback method, that fires vb.net code that is located in the page_load event
*The page_load event then fires code that populates the server side datagrid control

Note: The setTimeout function is set to fire every 2 seconds and everytime the javascript function is called it forces a postback to occur, firing the page_load event, our clients do not like the clicking sound (I know this is petty, but what can I say), and I would also like to be able to change the amount of time that is allocated by the setTimer function to 500 milliseconds.

Questions:

*Could I get code snippets from you on this: (Use the hidden frame to post information back to the server, which will return data and instructions (in this case most likely javascript) on how to update the page. Then with an update function and the html document referenced with ids in the neccessary areas, the page can seamlessly update itself with literally every keystroke, depending on your needs).

No problem pink. I'll start by saying that LAMP stands for Linux-Apache-MySQL-PHP, the best combo out there for webserver technology, most are agreed. You're using ASP which is fine. And for client-side scripting javascript, which is good.

It now sounds like you're wanting to emulate the server pushing data to the page, whereas before I though that you were only interested in having a seamless push back to the server (which when done through a frame would return new data to the page), in which case the only available method is using a client-side timed pull, which is what it seems you're doing.

There's nothing that can be done about the clicking sound (90% sure on that), which is a shame a it does get annoying, and therefore I recommend reloading only as often as neccesary. 500 miliseconds is way too frequent, by the way.

I can't help you with publishing any of my code at the moment I'm afraid, it'd take longer for me to dig it up than for you to research it on the web. But if you publsih any of your own I'll help you out. Seems like you need to research DHTML using javascript, and communicating between frames, which is just a case of understading the DOM.