Solved

Click a button then go to a specified site ?

Posted on 2002-04-19
4
162 Views
Last Modified: 2010-03-31
Could any one please show me the code that when I click on a button : my Internet Explorer will run and it will go to a specified site, such as : www.experts-exchange.com
Thank
Bye
0
Comment
Question by:kianh
  • 2
4 Comments
 
LVL 9

Accepted Solution

by:
Venci75 earned 50 total points
Comment Utility
Runtime.getRuntime().exec("rundll32 url.dll,FileProtocolHandler http://www.experts-exchange.com");
0
 
LVL 2

Expert Comment

by:vasan_sr
Comment Utility
Hi,
  just use the following Code
 
1. <input type=submit value=click onclick="javascript:window.open('http://www.experts-exchange.com')">

      the above code will open in a new window as such

2. if u want to give window width and height u can use the following code
 
<input type=submit value=click onclick="javascript:openwin1()">
<script language="JavaScript">
function openwin1(){
window.open("http://www.experts-exchange.com",""," width=500, height=300,top=25,left=25");
}
</script>
 
0
 
LVL 6

Expert Comment

by:valipotor
Comment Utility
Venci75 , your method will only work on Windows machines, it's too specific. This is not the purpose of Java.
0
 
LVL 9

Expert Comment

by:Venci75
Comment Utility
As you can see - he said - Internet Explorer
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
stringclean challenge 26 54
pairs challenge 5 44
wordappend challenge 8 82
Image decoding from Camera 3 42
This was posted to the Netbeans forum a Feb, 2010 and I also sent it to Verisign. Who didn't help much in my struggles to get my application signed. ------------------------- Start The idea here is to target your cell phones with the correct…
Java Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collectio…
Viewers learn about the “while” loop and how to utilize it correctly in Java. Additionally, viewers begin exploring how to include conditional statements within a while loop and avoid an endless loop. Define While Loop: Basic Example: Explanatio…
Viewers learn about the “for” loop and how it works in Java. By comparing it to the while loop learned before, viewers can make the transition easily. You will learn about the formatting of the for loop as we write a program that prints even numbers…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now