SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Member
    Join Date
    Mar 2004
    Location
    Florida
    Posts
    19
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Talking 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?

    Thanks,

    Pink

  2. #2
    SitePoint Addict streetlife's Avatar
    Join Date
    Mar 2004
    Location
    D-Town
    Posts
    369
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    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.

  3. #3
    SitePoint Member
    Join Date
    Mar 2004
    Location
    Florida
    Posts
    19
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    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).

    *What is Lamp? Cound you recommend a website to got to?

    I am definately eternally greatfull!

    Thanks,

    Pink

  4. #4
    SitePoint Addict streetlife's Avatar
    Join Date
    Mar 2004
    Location
    D-Town
    Posts
    369
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    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.

    Good luck!


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •