aspose file tools*
The moose likes HTML, CSS and JavaScript and the fly likes how to open page in new tab Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "how to open page in new tab" Watch "how to open page in new tab" New topic
Author

how to open page in new tab

kavita vala
Ranch Hand

Joined: Jul 22, 2010
Posts: 42
I am using ajex to take url from database and than i want to redirect it on new tab.
How it is possible using javascript using



But this code open url in same page than how to open it into new tab

Thanks in advance
Muthukrishnan Manoharan
Ranch Hand

Joined: Aug 27, 2008
Posts: 91

Did you try
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61648
    
  67

ajex?

Please take as much care when posting as (hopefully) you would when writing code.


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

Joined: Jan 10, 2002
Posts: 61648
    
  67

The short answer is: you can't.

The longer answer is that using the target attribute of a form (whose action you can fill in from the URL returned from the Ajax request) can be set to open the response in a new window. Whether that creates a new browser window or creates a new tab is not under your control., but is a browser setting specified by the user (which you, thankfully, cannot override).
kavita vala
Ranch Hand

Joined: Jul 22, 2010
Posts: 42
I know



but it is not working in mozilla. Is that any other way to open a page in new tab
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61648
    
  67

If you know then why are you still asking?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to open page in new tab