Win a copy of Modern JavaScript for the Impatient this week in the Server-Side JavaScript and NodeJS forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

File Selector

 
Ranch Hand
Posts: 240
3
  • 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
 
Marshal
Posts: 67445
173
Mac Mac OS X IntelliJ IDE jQuery Java
  • 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: 240
3
  • 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 ]
 
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: 240
3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I understand now. Thanks guys.
 
Time flies like an arrow. Fruit flies like a banana. Steve flies like a tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic