• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

get new window

 
praveena tumoju
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 64718
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64718
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can either use the window.open() JavaScript method, or investigate the target attribute on HTML links and forms.
 
praveena tumoju
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 64718
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1179
Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic