Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

I need some advice on JSP  RSS feed

 
Jason Rickards
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I need some advice on JSP. I have a drop down list box with dynamic data. I would like to, when one of the options is selected, display the data on the same page Rather than displaying the data on a different page. For example, if somebody clicks the drop down list box and selects the name Alice then the data will display for Alice on the same page below the drop down list box. If this is possible examples would be great! Thanks.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66141
141
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can either:

1) Submit the page to the server and forward back to the same page with the updated info (traditional approach)

2) Use the XMLHttpRequest mechanism (also called AJAX) to submit "under the covers" and use Javascript to update the page DOM when the request returns (trendy approach)
 
Jason Rickards
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Bear Bibeault:
You can either:

1) Submit the page to the server and forward back to the same page with the updated info (traditional approach)



I was thinking number 1 but I'm using List and Iterator twice in the same JSP, can this be done? I use List and Iterator for the drop down list box to list the names. So if I pick Alice, it will list more info to click on that will display on another page. So I'm using list twice - One to list the names and two to list the info.
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Jason Rickards:
I need some advice on JSP. I have a drop down list box with dynamic data. I would like to, when one of the options is selected, display the data on the same page Rather than displaying the data on a different page. For example, if somebody clicks the drop down list box and selects the name Alice then the data will display for Alice on the same page below the drop down list box. If this is possible examples would be great! Thanks.


I have a demo app that does this on:
http://simple.souther.us/not-so-simple.html
 
Ben AMIOT
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Ben,

It's the second time I saw your demo (different forum with your link) and I would like to have the source of this demo. Is it possible ?

I'm a new JSP developer and I have no clue how to do it.

Thanks.

Ben
 
Ben AMIOT
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry Ben,

Forget my post. I've just found the source in the war file.

Good demo anyway.

Thanks.

Ben
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66141
141
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"Ben AMIOT",

Please adjust your display name to used mixed case characters for your last name.

thanks,
bear
Forum bartender
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!