• Post Reply Bookmark Topic Watch Topic
  • New Topic

how to return a value from the child dialog  RSS feed

 
Murad Iqbal
Ranch Hand
Posts: 90
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a main JSP page, that calls a JSP page in a dialog box on the click of a button, and within this jsp page, i select a file from the client machine and uploads it to the server. So far all is working in order. Now what I am after is that, when the dialog box closes after uploading the file to the server, it should return the name of the file it has uploaded back to the main JSP page which called it. How should i go about this problem? Should I use session object or something?
 
Niki Nono
Ranch Hand
Posts: 256
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
you can use
window.opener.FORMNAME.ELEMENTNAME.value=FILENAME
assuming you have ELEMENTNAME as a field in you parent screen.
The above command will set that to the value you have defined in the FILENAME.
then in your parent screen you can access this element for you use.
 
Murad Iqbal
Ranch Hand
Posts: 90
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for your help Nikki, problem solved.

Cheers
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!