troubleshooting Question

Javascript using variable to obtain URL location or filename

Avatar of Britt Priddy Jr
Britt Priddy JrFlag for United States of America asked on
4 Comments1 Solution894 ViewsLast Modified:
I am attempting to create a javascript function that will allow me to pass the page name (filename) using the object.
This is where I am at now -after trying other methods:
<script language="JavaScript" type="text/javascript">
function openwin(park) { park + ,'win','toolbar=0,scrollbars=0,menubar=0,resizable=0,width=420,height=320,location=0,statusbar=0');
      return false;

What I want to be able to do is call this function like:
<a href="#" onclick="openwin('mypage.asp'); return false">My Link Text </a>
I am trying to get away from having to retype the with the features at the end for every link; so I just have to put the page/file name that I want to open.

Make sense?

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 4 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 4 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros