[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

onclick open in new window

Posted on 2005-05-10
3
Medium Priority
?
503 Views
Last Modified: 2012-05-05
Hi,  first, please be patient-I am trying to revise an already-in-place menu, and I have no knowledge of javascript. I'll try to make this as clear as I can. Thanks. :)

 On a drop down menu, I want a link to open in a new browser window. In HTML, I would say:
<a href="www.link.com" target="new">

In the javascript, it says:
mm_menu_1208151244_0.addMenuItem("Corporate&nbsp;Brochure", "location='www.link.com' ");

 I cannot add  target="new" to this. How  can I go about making the imaginary www.link.com open in a new browser window? Thanks,

Mel150
0
Comment
Question by:mel150
  • 2
3 Comments
 
LVL 32

Accepted Solution

by:
Batalf earned 500 total points
ID: 13972899
Maybe you can add the javascript line directly to your addMenuItem() function call.

i.e. something like this:

mm_menu_1208151244_0.addMenuItem("Corporate&nbsp;Brochure", "var newWin=window.open('www.link.com','newWin','menubar=yes,location=yes,toolbar=yes') ");

Batalf
0
 

Author Comment

by:mel150
ID: 13973010
Excellent! Yep, that works exactly as I want it to. Thanks!
0
 
LVL 32

Expert Comment

by:Batalf
ID: 13973019
Glad I could help!

Batalf
0

Featured Post

Prep for the ITIL® Foundation Certification Exam

December’s Course of the Month is now available! Enroll to learn ITIL® Foundation best practices for delivering IT services effectively and efficiently.

Question has a verified solution.

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

In my daily work (mainly using ASP.net), I need to write a lot of JavaScript code. One of the most repetitive tasks I do are the jQuery Ajax calls. You know: (CODE) I don't know if for you it's the same, but for me is soooo tedious to write the …
This article will give core knowledge of JavaScript and will head in to your first JavaScript program. I am Durvesh Naik and I am here to deal with this series of JavaScript. I will teach you JavaScript in part wise , as its quite boring to read big…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Suggested Courses

872 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