?
Solved

Open window with onClick

Posted on 2003-03-05
5
Medium Priority
?
402 Views
Last Modified: 2013-12-18
I am trying to use this javascript in the onClick for a button, but I receive a syntax error.  What is the best method to launch a new browser from a button?


<a href="#" onClick="MyWindow=window.open('http://www.google.com','MyWindow','toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=yes,resizable=yes,width=600,height=600,left=20,top=20'); return false;">open window</a>

Thanks, Adam
0
Comment
Question by:christmann
[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
  • 3
5 Comments
 
LVL 24

Expert Comment

by:HemanthaKumar
ID: 8074785
It works for me. Just make sure that this html code is a passthru HTML.

~Hemanth
0
 

Author Comment

by:christmann
ID: 8074830
Can you explain further.  If I drop this code into the onClick for the button, I do not have the option to mark this as passthru HTML on the Text menu.  As you can tell, I am a little confused.  Thanks
0
 

Author Comment

by:christmann
ID: 8074855
Can you explain further.  If I drop this code into the onClick for the button, I do not have the option to mark this as passthru HTML on the Text menu.  As you can tell, I am a little confused.  Thanks
0
 
LVL 63

Accepted Solution

by:
Zvonko earned 400 total points
ID: 8075380
Put only the code from onClick as button code.
Button formula type is then JavaScript.
Like this:
MyWindow=window.open('http://www.google.com','MyWindow','toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=yes,resizable=yes,width=600,height=600,left=20,top=20');
return false

Good luck,
Zvonko

0
 

Author Comment

by:christmann
ID: 8075665
That was it.  Thanks for the help.  Adam
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

You’ve got a lotus Domino web server, and you have been told that “leverage browser caching” is a must do. This means that we have to tell the browser everywhere in the web to use cache. In other words, we set (and send) an expiration date in the HT…
IBM Notes offer Encryption feature using which the user can secure its NSF emails or entire database easily. In this section we will discuss about the process to Encrypt Incoming and Outgoing Mails in depth.
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
Suggested Courses

801 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