Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Opening link in new window with java

 
venkateswara reddy
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Friends,
If any body knows how to open a link in a new window using java please let me know.

Thanks in advance.

venkat
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Could you be a bit more specific about your problem? I assume you're referring to a "link" on a web page, but what do you mean by "opening a new window with Java?"
 
venkateswara reddy
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Runtime.getRuntime().exec(rundll32 url.dll,FileProtocolHandler http://www.rediff.com?);

This is the code what I am using for launching the browser it is working fine but problem is it is using the already opened browser(if I already opened one link manually).
I want to open in a new browser that is the problem.

so if you know how to do it please let me know.

thanks in advance.

regards
venkat
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok. The solution has nothing to do with Java (nor web services), so someone will probably soon move this thread into another forum.

In the meanwhile, I'd suggest finding documentation regarding the DLL you're using.
 
Balaji Loganathan
author and deputy
Bartender
Posts: 3150
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moving this to Java in General forum.
Please continue this discussion there...
 
S. Lohi
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Opening a new window with javascript:

<script type="text/javascript">
function openwindow()
{
window.open("url.goes.here", "name_of_the_window", "toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=no, width=x, height=y")
document.write(page)
}
</script>

<a href="javascriptpenwindow()">Link</a>

Where:
x is width in pixels (a plain number),
y is height in pixels (-"-).
If you don't know what those options mean try changing some to yes to find out.

Hope this helps.

SLohi

[ May 21, 2004: Message edited by: S. Lohi ]
[ May 21, 2004: Message edited by: S. Lohi ]
 
Philip Norman
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello!
The code you want in this instance is

to use a simple example. This opens a new Internet Explorer window and directs it to the url it has been given.

Hope this helps,
Phil - Celebrating my first post here.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic