wood burning stoves 2.0*
The moose likes HTML, CSS and JavaScript and the fly likes Include files when pressing links Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Include files when pressing links" Watch "Include files when pressing links" New topic
Author

Include files when pressing links

Trond Kristiansen
Greenhorn

Joined: Mar 12, 2007
Posts: 1
Hello I have a page with a nav section on the left. I apply a template to the page so that header footer and navigation section is steady. Is it possible to include pages i the main content area based on what links is pressed. Thanks kritro
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61095
    
  66

Yes, but not using JSP technology. JSP sends the HTML to the browser. What happens after that is the domain of HTML and Javascript.

This topic has been appropriately moved.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61095
    
  66

You can either make the content area an iframe and load new "sub-pages" into it as the nav bar is clicked upon, or you can use Ajax to fetch the new content from the server and replace the content area with the newly retrieved content.

In the first scenario you have two separate pages. In the latter, only one page (that can share script -- not a trival advantage).

I find myself using the Ajax approach almost exclusively these days.
[ March 12, 2007: Message edited by: Bear Bibeault ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Include files when pressing links