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
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.
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
Question has a verified solution.
Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.
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('