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

some design/impl help

Status
Not open for further replies.

rottyguy

Programmer
Sep 10, 2005
3
US
hello all, am relatively new at html/js/java but have been programming c++ for years. am working on a project using jsp/weblogic.

my main jsp is divided into 2 columns.

the left column allows searching and the right column displays details of selected searched items from the left.

i have something working now using an iframe as my left column but am wondering if it's possible to do this w/o the iframe to avoid backspace issues?

is it possible, in the left hand column, to create a form that submits the search key (to my .jsp handler), retrieve the returned search data, and update a table with the results w/o refreshing the entire page? ideally only the table would be refreshed with each search.


thanks!

 
No. Since HTTP is stateless, it can't do anything without reloads. If you are using any kind of frames, you can reload just the frame you're updating, but that is about it. The only way to do it without refreshing is load everything before the page shows and then control whatever you need to show via javascript, which is client-side. That however would be a terrible waste of resources and tima and wouldn't work on machines that have JS turned off. Besides, what is wrong with just reloading hte page. The static part will be loaded into cache and will refresh very quickly.
 
If you are comfortable with the assumption that all your users will have javascript enabled, then you can do everything you ask using AJAX (google on this term).

The end result is that you can update parts of your page with data returned from a database (say) and not require a refresh. This is the same concept that google uses in GMail.

As a C++ programmer you should have no problems with it... and there are plenty of examples around now.

Cheers,
Jeff

[tt]Jeff's Page [/tt][tt]@[/tt][tt] Code Couch
[/tt]
 
I enjoy offering arguments for both sides of this kind of problem. Yes I am totally in support of a solution that works without the javascript dependency (and the reduced set of browsers that support it - although the vast majority of internet users will not fall into either of these categories).

I just think that since the OP has basically described the complete AJAX experience in his initial post, that it is worth following up on.

There is absolutely no reason why the solution couldn't still function in "bog standard page reload after a search" mode (for those few without Javascript or a compatible browser)... but you can enhance the whole experience so much with the use of AJAX.

Given you need so little extra to provide AJAX support for this kind of solution, it seems like a good candidate in this instance.

Let's hear what the OP has to say on the matter, I guess [smile]

Cheers,
Jeff

[tt]Jeff's Page [/tt][tt]@[/tt][tt] Code Couch
[/tt]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top