Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Open window with onClick

Posted on 2003-03-05
5
Medium Priority
?
404 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
  • 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

Technology Partners: 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

For users on the Lotus Notes 8 Standard client, this article provides information on checking the Java Heap size and adjusting it to half of your system RAM in attempt to get the Lotus Notes 8.x Standard client to run faster.  I've had to exercise t…
Lack of Storage capacity is a common problem that exists in every field of life. Here we are taking the case of Lotus Notes Emails, as we all know that we are totally depend on e-communication i.e. Emails. This article is fully dedicated to resolvin…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
When cloud platforms entered the scene, users and companies jumped on board to take advantage of the many benefits, like the ability to work and connect with company information from various locations. What many didn't foresee was the increased risk…

581 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