• Post Reply Bookmark Topic Watch Topic
  • New Topic

File Selector

 
Luke Shannon
Ranch Hand
Posts: 239
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello;

My JSP (lets call it parent JSP) contains a form field which the client needs input the name of an image file in our system. It would helpful if they could see the images. I was thinking of creating a pop up window (there would be a link to open it from the parent JSP) which contains a form with all the images in the archive (like a photo gallery, but with check boxs under each pic).

You select a image and submit form. Pop up closes and in the parent JSP the file name would now appear in the form field (not sure how much trouble all this will actually be).

I was thinking of receiving the pic name in the parent JSP using the:



I hate putting in a scriptlet when I'm doing everything else in JSTL. Is there a better to pass the parameter from one JSP to another or is this still the way it is done?

Thanks,

Luke
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65529
105
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are you refreshing the parent page when the popup is closed? If not, then you need to use Javascript to communicate the value back to the parent JSP.
 
Luke Shannon
Ranch Hand
Posts: 239
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Bear;

I'm a little fuzzy on this part. I'm not sure what would be easier, refreshing the page or using Javascript to pass the value back?

Luke
[ June 17, 2005: Message edited by: Luke Shannon ]
 
Anupam Bhatt
Ranch Hand
Posts: 81
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As already suggested by Bear i think .. only javascript can help .. Because .. the form field cannot be populated without a page refresh.

Both methods are fine though.[Not too complex]

and also i think <% request.getParamenter("picName"); %> this will be perfect and you can refresh the page with the form field populated.
[ June 17, 2005: Message edited by: Anupam Bhatt ]
 
Luke Shannon
Ranch Hand
Posts: 239
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I understand now. Thanks guys.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!