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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Simple Question?: Return html, then add more html at client

Status
Not open for further replies.

jsteph

Technical User
Oct 24, 2002
2,562
US
Hi,
I'm not necessarily looking for detailed code examples, just a basic idea of how to accomplish this.

A simplified version of what I need to do is this:
1. Display table with say, 100 rows, in frame.
2. On Click of button fetch single row from server db...
3. ...then return that row to client browser and add it to the existing table in the frame, so we now see 101 rows.

The purpose is simple--I'm displaying records from a server table, and when one is added to the server table (via events totally unrelated to the client browsser), the client browser can see the new row without refetching and sending the entire 101 rows to the client

This seems like a common thing that must've been done a million times, but no one seems to be able to tell me how to do it. I've gotten all sorts of bizzare suggestions of Rube-Goldberg-like contraptions involving hidden browsers, writing huge cookies, etc.

But it seems to me that some client script language should support some sort of temporary client-side table, to which i can save the current 100 rows, then append the new row, then write the full thing back to the frame.

How would I accomplish step 3 above, specifically, with what method could I pass the single row from server to client, with what method could I cache the existing 100 rows on the client, finally, how do I pick up the new row in the client script, and write it all to the frame--all in a smooth motion?
Thanks for any input,
--jsteph
 
sounds interesting - haven't got a solution but would like to see the answer :)

Posting code? Wrap it with code tags: [ignore]
Code:
[/ignore][code]CodeHere
[ignore][/code][/ignore].
 
Well, extending a page with more information can easily be done using the document object and javascript, however I don't understand how you would get this new information and still keep the old.

In the last paragraph of your post it sounds as if you want the server to just send it to your client without the client requested it... That would turn the webbrowser into a server... sort of.

Of course the client has to do a new request to the server so the only way I can think off is to use a pop-up that will do the request, getting the data, write it to it's parent window document and then closing itself.

I'm not a JavaScript wiz, so I can't give you to code for this but I hope you've understand what I mean and that it gives you a new starting point to investigate and search for info on this subject.

Cheers,

Joacim
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top