[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

Open Browser Window

Posted on 2004-08-15
3
Medium Priority
?
364 Views
Last Modified: 2006-11-17
I want to have a simple little pop up type window open when I click on a peice of text. I am using this function:

function MM_openBrWindow(myURL,winName,features) {
      window.open(myURL,winName,features);
}

And calling it this way:
            <a href="ProductWindows/Moped.htm"onMouseDown="MM_openBrWindow('ProductWindows/Moped.htm','Mighty Aphrodite','scrollbars=yes,resizable=yes,width=500,height=400')">Moped</a>

But I keep getting the debug error that I have an incorrect argument in the function itself. It's been a while since I used this and I had no problems before that I can remember.
Any ideas? Or better ways of doing this?
Thanks
0
Comment
Question by:SmartGirl
[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 Comments
 
LVL 13

Accepted Solution

by:
StormyWaters earned 375 total points
ID: 11806111
I can't tell because of a line break, but you can't have spaces in the window name.
Secondly, why is there a href if it's opened in a new window?
Thirdly, why are you using onMouseDown? It should be onClick.

So:

<a href="#" onClick="MM_openBrWindow('ProductWindows/Moped.htm', MightyAphrodite', 'scrollbars=yes,resizable=yes,width=500,height=400')"Moped</a>
0
 
LVL 3

Assisted Solution

by:pulupul
pulupul earned 375 total points
ID: 11806118
And, IMHO, better:

<a href="javascript:MM_openBrWindow('ProductWindows/Moped.htm',MightyAphrodite', 'scrollbars=yes,resizable=yes,width=500,height=400')">Moped</a>
0
 

Author Comment

by:SmartGirl
ID: 11806126
Thanks,
I actually found this that works fine:
function popUp(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=1,width=500,height=300,left = 262,top = 134');");
}
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

Article by: DanRollins
This article describes a JavaScript program that creates a maze made of hexagonal cells.  In Part 2 (http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/A_7850-Hex-Maze-Part-2.html), we'll extend the program by adding a depth-…
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
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…

650 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