Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Click a button then go to a specified site ?

Posted on 2002-04-19
4
Medium Priority
?
180 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 9

Accepted Solution

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

Expert Comment

by:vasan_sr
ID: 6953420
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
ID: 6953663
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
ID: 6953688
As you can see - he said - Internet Explorer
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

An old method to applying the Singleton pattern in your Java code is to check if a static instance, defined in the same class that needs to be instantiated once and only once, is null and then create a new instance; otherwise, the pre-existing insta…
Java had always been an easily readable and understandable language.  Some relatively recent changes in the language seem to be changing this pretty fast, and anyone that had not seen any Java code for the last 5 years will possibly have issues unde…
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses

609 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