aspose file tools*
The moose likes HTML, CSS and JavaScript and the fly likes get new window 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 » Engineering » HTML, CSS and JavaScript
Bookmark "get new window" Watch "get new window" New topic
Author

get new window

praveena tumoju
Greenhorn

Joined: Sep 04, 2008
Posts: 2
Hi,
The problem is, My html document is getting opened in the same browser where my application is present. So after viewing the html i cant go back to the application.I have to once again open a new browser. Actually browser window is having one export button, when i click on that it opens open/save/cancel window. when i click on open it is redirecting to the same page with expected result. But i want to open the file in new window.But i don't know how to do it. Can any1 help me?. Thanks a lot!!!
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61426
    
  67

Please use real words when posting to the forums. Abbreviations such as "any1" in place of "anyone" only serve to make your posts more difficult to read and less likely to generate useful responses.

Please read this for more information.

thanks,
bear
JavaRanch sheriff


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61426
    
  67

You can either use the window.open() JavaScript method, or investigate the target attribute on HTML links and forms.
praveena tumoju
Greenhorn

Joined: Sep 04, 2008
Posts: 2
Hi,
Thanks for reply. I tried it but failed. My page is having an export button which exports html file in which a submit button was provided. For all other file (like .txt,.xls,.csv) my code is working fine. When i want to export .html file the exported page is opening in the current window only. It should be open in another window and when i resubmitted the newly opwned window i need to come to old window. Please help me...
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61426
    
  67

I tried it but failed.
Do you think that this is an adequate description of what you tried, and of what happened?

When you go to a doctor, do you say "Something hurts" and expect him to be able to help you?

Please read this and put a little effort into your posts.
Rene Larsen
Ranch Hand

Joined: Oct 12, 2001
Posts: 1179

You need to look at some javascript, as Bear also said.

The javascript you should look at, is the 'windows.open(..)' function - and then use the 'opener' reference in the popup window.

Here are some reading: Cross-window scripting.


Regards, Rene Larsen
Dropbox Invite
 
Don't get me started about those stupid light bulbs.
 
subject: get new window