Real-time live data in classic asp... Is it possib

Results 1 to 2 of 2

Thread: Real-time live data in classic asp... Is it possib

  1. #1
    Join Date
    Dec 1969

    Default Real-time live data in classic asp... Is it possib

    I have a page containing records from a database. People can click a record in the page and view details about this record in a pop-up window. No problem, I send a querystring to that window and display the details.<BR><BR>I was wondering if I can archieve the following:<BR>Instead of opening a popup window, I would like to display a div with all the details of a record. With dhtml I could make that div look and function like an ordinary popup window...<BR><BR>I could do it like this:<BR><BR>I create a hidden Iframe. When I click on a record, I call a javascript function with a timeout. The javascript function then calls the hidden Iframe with a querystring to retrieve the details of the clicked record. <BR><BR>Then, after a second or so (using a javascript timeout), I could "read" the contents of that hidden Iframe, and fill the "popup" div with the retrieved data.<BR><BR>But you will hear a click sound and see a short refresh because of the reload of the Iframe (and I don&#039;t like that). I figure that it might be possible to do this in a smarter way, maybe using a webservice or something. I think that has a method for this, but I don&#039;t know how it works... And I want to support IE and Mozilla at least..<BR><BR>Any suggestions for a smarter method ?

  2. #2
    Join Date
    Dec 1969

    Default What's the point of the timeout???

    And why an IFrame? Make it a truly hidden &#060;FRAME&#062;.<BR><BR>And what&#039;s wrong with hearing the click sound? The user *did* presumably click on something.<BR><BR>So you simply submit the &#060;FORM&#062; to the hidden frame. The ASP code returns HTML to that frame. The HTML includes JS code that in turn invokes JS code in the main visible frame, passing along the details to the main frame&#039;s update-the-div method.<BR><BR>The timeout strikes me as a huge mistake, because how do you know how long it should be??? How can you predict how loaded the &#039;net will be at the time the user clicks that button? The info might be loaded into the frame in a fraction of a second or it could take many seconds.<BR><BR>**********<BR><BR>Having said all the above: How many records on the page? How big is the "details" info? If neither answer is too big, why not simply send *ALL* the details for all the records when the page is first built. You could put the details for each record each into its own &#060;DIV&#062;, with all the &#060;DIV&#062;s stacked one on top of another. Then you simply show/hide the appropriate one.<BR><BR>Not the same as, but similar to the kind of trick I did here:<BR><BR><BR>s tyle.dispay = "none" is a wonderful trick to use. Using it, you don&#039;t even have to worry about positioning the &#060;DIV&#062;s on top of each other. If only one is style.display="inline" then it works like magic.<BR><BR>

Posting Permissions

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