Solved

Click a button then go to a specified site ?

Posted on 2002-04-19
4
172 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 50 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

After being asked a question last year, I went into one of my moods where I did some research and code just for the fun and learning of it all.  Subsequently, from this journey, I put together this article on "Range Searching Using Visual Basic.NET …
Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
Viewers learn about the third conditional statement “else if” and use it in an example program. Then additional information about conditional statements is provided, covering the topic thoroughly. Viewers learn about the third conditional statement …
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:

717 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