Javascript sidemenu open new window??

I'm writing code to have a sidemenu on a webpage.  The problem I am having is if I try to add code to have certain links open in a new window, I receive error messages.  I'm not certain how to add additional code to my coding below with no errors.  Please help.  Thanks.

addmenu(menu=["subMenu38154",,,170,,,style2,0,"left",effect,,0,,,,,,,"",,,,"<div style='padding : 1 5;'>(GGI) </div>","http://mywebpage.com","",,1,"<div style='padding : 1 5;'>ORTHO</div>","http://mywebpage.com","",,1,"<div style='padding : 1 5;'>USACE</div>","http://mywebpage.com","",,1,"<div style='padding : 1 5;'>Demo Tracker</div>","http://mywebpage.com","",,1]);addmenu(menu=["sidemenu",150,0,158,,,styleside,1,"left",effect,,0,,,,,,,"",,,,"<div style='padding : 1 5'><strong>Resources</strong></div>","http://mywebpage.com","",,1,"<div style='padding : 1 5;'>Downloads</div>","http://mywebpage.com","",,1,"<div style='padding : 1 5;'>Links</div>","http://mywebpage.com","",,1,"<div style='padding : 1 5'>Tracker</div>","show-menu=subMenu38154","http://mywebpage.com",,1]);

dumpmenus();
mdmcq5Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

archrajanCommented:
can u post more code related to this
0
archrajanCommented:
0
devicCommented:
probably you forgot return false;
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

devicCommented:
e.g.:
<a href="javascript:window.open('http://www.google.com')">error</a>
<a href="javascript:void(window.open('http://www.google.com'));">no error</a>
0
mdmcq5Author Commented:
That's pretty much all of the code for the sidemenu.

The code works perfectly as it is, but a few of the links I would like to open in a new window. There is absolutely nothing wrong with the way the code is written.  I just want to know whether there is a way to allow for a new window to open to be added to the way the coding is currently written.  I do not want to reformat my coding b/c it's on about 45 other pages.  It's just this one particular sidemenu for one page I'm developing that I'd like to open the links in a new window.

If I add additional code to do this, like w/ "[]";, etc. it errors out.  And I have not forgotten any coding, such as return false;

Any ideas??

<SCRIPT type="text/javascript">

addmenu(menu=["subMenu38154",,,170,,,style2,0,"left",effect,,0,,,,,,,"",,,,"<div style='padding : 1 5;'>(GGI) </div>","http://mywebpage.com","",,1,"<div style='padding : 1 5;'>ORTHO</div>","http://mywebpage.com","",,1,"<div style='padding : 1 5;'>USACE</div>","http://mywebpage.com","",,1,"<div style='padding : 1 5;'>Demo Tracker</div>","http://mywebpage.com","",,1]);addmenu(menu=["sidemenu",150,0,158,,,styleside,1,"left",effect,,0,,,,,,,"",,,,"<div style='padding : 1 5'><strong>Resources</strong></div>","http://mywebpage.com","",,1,"<div style='padding : 1 5;'>Downloads</div>","http://mywebpage.com","",,1,"<div style='padding : 1 5;'>Links</div>","http://mywebpage.com","",,1,"<div style='padding : 1 5'>Tracker</div>","show-menu=subMenu38154","http://mywebpage.com",,1]);

dumpmenus();

</SCRIPT>
 
<tr class="noBorder" ><td id="sideBarCell" valign="top" width="158" class="noBorder">
    <script type="text/javascript" language="Javascript1.1">
      tblHeight=0;
      theName="menu"+getMenuByName("sidemenu");
      var domObj;
      if(ns4){
        domObj = document[theName];
        if(domObj != null){
          PlaceMenu("sidemenu");
          tblHeight=domObj.clip.height-18;//the 18 is due to some odd padding that is showing up on the screen.
          document.write("<span height=" + (tblHeight+2) + "><img src=\"../images/spacer.gif\" height=1></span>");
        }
      }
      else{
        domObj = document.getElementById(theName);
        if(domObj != null){
          PlaceMenu("sidemenu");
          tblHeight=domObj.offsetHeight;
          document.getElementById("sideBarCell").height=tblHeight;
        }
      }

    </script>
0
devicCommented:
very careful replace  this:
=========================
"http://mywebpage.com"

with this:
=========================
"javascript:void(window.open(\"http://mywebpage.com\"))"
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
mdmcq5Author Commented:
If I add "javascript:void(window.open(\"http://mywebpage.com\"))"
it still doesn't work.  

The code is accepted, but when run and the url is clicked, an error appears that says "error on page".

If I use "(window.open(\"http://mywebpage.com\"))" it opens to an empty page, not the specified url.
If I use "window.open(\"http://mywebpage.com\")" it too opens to an empty page, not the specified url & same for       "window.open(\"http://mywebpage.com\"))"

if i do this: ("http://mywebpage.com")"  it says it can't find the page, it's using the folder the main page is placed in.  So, it's saying it can't find the file... resources\tracker\http.....
0
devicCommented:
http://home.arcor.de/athens/expexc/js/menu/

I uploaded example online:

if you go to "Plain Magic Software"
there you will see "SEMBEL.NET" click it.
0
mdmcq5Author Commented:
IT WORKS!

Sorry, devic..
I must have accidentally erased the , after the "

thanks for your help!.

addmenu(menu=["subMenu38154",,,170,,,style2,0,"left",effect,,0,,,,,,,"",,,,"<div style='padding : 1 5;'>(GGI) </div>","javascript:void(window.open(\"http://mywebpage.com\"))","",,1,"<div style='padding : 1 5;'>ORTHO</div>","http://mywebpage.com","",,1,"<div style='padding : 1 5;'>USACE</div>","http://mywebpage.com","",,1,"<div style='padding : 1 5;'>Demo Tracker</div>","http://mywebpage.com","",,1]);addmenu(menu=["sidemenu",150,0,158,,,styleside,1,"left",effect,,0,,,,,,,"",,,,"<div style='padding : 1 5'><strong>Resources</strong></div>","http://mywebpage.com","",,1,"<div style='padding : 1 5;'>Downloads</div>","http://mywebpage.com","",,1,"<div style='padding : 1 5;'>Links</div>","http://mywebpage.com","",,1,"<div style='padding : 1 5'>Tracker</div>","show-menu=subMenu38154","http://mywebpage.com",,1]);

dumpmenus();
0
devicCommented:
for this reason I wrote very careful :)

you are welcome!
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
JavaScript

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.