aspose file tools*
The moose likes Struts and the fly likes open a new window using struts2 button Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "open a new window using struts2 button" Watch "open a new window using struts2 button" New topic
Author

open a new window using struts2 button

Nandhini Raj
Greenhorn

Joined: Mar 19, 2012
Posts: 2
Hi ,

I am working on struts2. I have an web page where there is an text box to enter the username and click the button 'search' to search the user whose name is starting with the letter that is typed in that text box. when the user clicks on the button 'search' an new window will be opened , there i will be displaying the names in the dropdown box. the user can select a name from that drop down box, and click on the button 'Ok'. If the user clicks on the button 'Ok' , that window should be closed and the value that is selected in that drop down box should be passed to the previous web page, and displayed in that textbox. I am new to programming. Please some one help me... Please give me some ideas...
Joe Ess
Bartender

Joined: Oct 29, 2001
Posts: 8927
    
    9

Welcome to the JavaRanch
That's a pretty ambitious use case for someone who is new to programming. How about displaying one page with a search entry, display a new page for the search results, then a third with the selected value and whatever else you need entered? This would be much easier to implement.
If you absolutely need to implement the functionality you specified, here is an example on how to open a new window with JavaScript. You'll have to use JavaScript to set the value back on the page. There are plenty of JavaScript tutorials available, as well as our own JavaScript forum to help you along.


"blabbing like a narcissistic fool with a superiority complex" ~ N.A.
[How To Ask Questions On JavaRanch]
Nandhini Raj
Greenhorn

Joined: Mar 19, 2012
Posts: 2
@Joe Ess : Thank you very much...
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: open a new window using struts2 button