Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

fieldset and form problem

 
Alvin chew
Ranch Hand
Posts: 834
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi, i create a fieldset which contain a form, when i click the summit button, i would like to display a page which replace the current form, meaning the new display page will inside the fieldset now ...how to i do it ? can anyone guide me ?



test.html is simple information to display "hello"..anyone can guide me ? thank you !
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When you use the action, it replaces the current page.
 
Alvin chew
Ranch Hand
Posts: 834
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
mr. Eric Pascarello , i actually want the the action call page to put inside my fieldset ...can i do that ? thank you !
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You are going to have to use use a server side language to replace the content or you have to use JavaScript to change the innerHTML of the document.

Eric
 
Julian Kennedy
Ranch Hand
Posts: 823
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Alvin,

You could look at using an <iframe> but I prefer Eric's suggestion to use a server-side solution, e.g. JSP. If you don't want (or need) to complicate your page to the extent of JSP you could look into the SSI (Server Side Includes) capabilities of your web server.

Jules
[ August 26, 2004: Message edited by: Julian Kennedy ]
 
Alvin chew
Ranch Hand
Posts: 834
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i using jsp, can anyone provide information for this ? thank you !
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I will move this to the jsp forum.

With jsp you need to detect the form submission and determine the include....

Eric
 
Alvin chew
Ranch Hand
Posts: 834
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
meaning using jsp:include ?
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64827
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As was pointed out before, there is no way to have a response change only part of the page. The best solution (avoiding frames) is to re-create the entire page using JSP and deciding what the content of the fieldset should be using whatever criteria you need to trigger off of.

If you do not want to do that, your only viable alternative is to use an iframe for the fieldset content so that it is its own page that can be replaced without affecting the parent page. But that approach has a lot of tricky nuances that can trip you up if you are not careful.
[ August 27, 2004: Message edited by: Bear Bibeault ]
 
Alvin chew
Ranch Hand
Posts: 834
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thank you, Bear Bibeault, thank for clarification !! so sad ...as i can't change the contains inside fieldset
 
Julian Kennedy
Ranch Hand
Posts: 823
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Alvin,

Did these suggestions solve your problem? You seem to suggest they didn't. You can achieve pretty much anything you want on a web page using JSP. If you still have a problem please post some more details and maybe we can point you in the right direction.

Jules
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic