Forum Moderators: open

Message Too Old, No Replies

Output system with javascript

         

orion_rus

8:39 pm on Jan 15, 2005 (gmt 0)

10+ Year Member



Hello world, it's me again)
It seems what i soon would need to make an output system in javascript, where server initialize variables and output began constructing.
Output would be seems like in google or yahoo, but when u clicks to a next page javascript constructs it on a client side, not asking server about new select.
May be somebody already makes something like this?
Thanks in advance

RonPK

11:01 pm on Jan 15, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



> when u clicks to a next page javascript constructs it on a client side

Great idea. Of course, the content of that 'next page' needs to be downloaded together with the first page. If you want this option on all pages, the user would need to download your entire site. If you have links to pages on other sites, you'd need to grap the entire internet...

Maybe you could elaborate on what you want.

orion_rus

10:41 am on Jan 16, 2005 (gmt 0)

10+ Year Member



I need only content of search, which would be send in array, where it would have a function which it needs to call on onclick, href if youser didn't have a javascript, and array with submit buttons.
Am i clear?

RonPK

6:36 pm on Jan 16, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



A search result page with links. When the user clicks a link, the requested page is not fetched over HTTP but will be built client-side1. The necessary HTML is sent as JavaScript in the result page.

Is that what you're after?

1: this could be done be changing the innerHTML property of the body element.

orion_rus

8:11 pm on Jan 16, 2005 (gmt 0)

10+ Year Member



yes i thinking of this. I initialize some variables and then calls a function which constructs table of results. And then user clicks to see next results this page already have it and simply rebuild table.

RonPK

12:11 pm on Jan 17, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



So what's the problem?

orion_rus

1:27 pm on Jan 17, 2005 (gmt 0)

10+ Year Member



May be somebody's already realize it, and i want to see any ideas how it's build. In the other words i don't want to make a system several times, if it's already have a professional realization

RonPK

8:53 pm on Jan 17, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Well, I wish you good luck, because I can't remember ever seeing anything like it. Can't be that hard to build, though. If you know what you want, of course.

I do see one mayor objection to the whole idea: the first page will need more time to load, which isn't good for the user experience.

Rambo Tribble

1:39 am on Jan 18, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



If I get this right, what you basically want to do is page between different table views. If that is the case, two approaches occur: 1) absolutely position the table, have the server produce a table for each view, control the visibility of the tables to display one at a time, or 2) pass the table values to JavaScript and have it rewrite the cell contents for each new view (which I think is where you are headed).

If you pursue the latter approach, I think it might facilitate writing text values into the cells if you made the cells containers for textareas, which can be easily read and written to as an array (though cells can be treated as an array, themselves, with relative ease).