File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes opening new window in jsp Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "opening new window in jsp" Watch "opening new window in jsp" New topic
Author

opening new window in jsp

angelin precilla
Ranch Hand

Joined: Sep 11, 2007
Posts: 33
how to open a new window on a button click using struts...
Tauri Valor
Ranch Hand

Joined: Aug 03, 2005
Posts: 166
You can use "on click" event with a method NewWindow() in your jsp ahref tag.


A Moment's insight is sometimes worth a Life's experience.
angelin precilla
Ranch Hand

Joined: Sep 11, 2007
Posts: 33


I have tried with this. but i am getting script error
Anubhav Anand
Ranch Hand

Joined: May 18, 2007
Posts: 341

You can refer this tutorial to have a better understanding.

Once you go through it, you will also rectify your problem.
angelin precilla
Ranch Hand

Joined: Sep 11, 2007
Posts: 33
HI,
I tried with this and got solution



oNewWindow = window.open( [sURL] [, sName] [, sFeatures] [, bReplace])
HOw to use sName like _parent,_self,etc ?
Anubhav Anand
Ranch Hand

Joined: May 18, 2007
Posts: 341

HOw to use sName like _parent,_self,etc ?


These values are applied with the help of the "target" attribute of the "anchor", "base", or "link" tag etc.
angelin precilla
Ranch Hand

Joined: Sep 11, 2007
Posts: 33
Can you explain with an example _self,_parent
Is there any option to change the color of the title bar ?
Anubhav Anand
Ranch Hand

Joined: May 18, 2007
Posts: 341

An example can be:



You may visit this article for even better understanding.

Regarding, the change of color of titlebar, I have never done that . I leave that for fellow ranchers to answer.
[ March 12, 2008: Message edited by: Anubhav Anand ]
angelin precilla
Ranch Hand

Joined: Sep 11, 2007
Posts: 33
Yes, now i understood the importance of _parent,_self etc
I made status bar and title bar to 'no', but still i am getting it.
angelin precilla
Ranch Hand

Joined: Sep 11, 2007
Posts: 33
I would like to paste my sample window.But i don't know how to paste that in this forum using image tab.
Anubhav Anand
Ranch Hand

Joined: May 18, 2007
Posts: 341

Well, to paste your images you require them to avaialable on some hosted web URL.
Brent Sterling
Ranch Hand

Joined: Feb 08, 2006
Posts: 948
What browser are you testing with? I know that IE 7 has a security feature that always shows the status bar and (I think) a bar at the top with the address.

- Brent
angelin precilla
Ranch Hand

Joined: Sep 11, 2007
Posts: 33
I am using IE7
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: opening new window in jsp