PDA

View Full Version : Really easy window.open Problem


UnclePunker
03-13-2003, 03:09 PM
Hi, new to java script, hoping someone could help me with this,

This is one of the lines from my table code:-


<td align="center" valign="middle">
<a href="javascript:window.open('http://www.ecalmdown.com/images/adam/catshaft.html','CAT SHAFT','resizeable=0','return false')"><img src="http://www.ecalmdown.com/images/adam/thumbs/catshaftTHUMB.jpg" border="0"></a>
</td>


it is coming up with an error line:1 error: invalid argument

any help appreciated thanks.

Spudhead
03-13-2003, 03:32 PM
open() only has 3 parameters: url, window name and features.

I'm not sure about the space in the window name, either.

try:

<a href="javascript:window.open('http://www.ecalmdown.com/images/adam/catshaft.html','CATSHAFT','resizeable=0'); return false;">

UnclePunker
03-13-2003, 03:54 PM
Your right mate, thanks.

I had only put the return false in as a test, I thought I'd taken it out

the problem was the space in the Window name, but now the window opens but the original page disappears and just display s a blank page with [object] in the top left corner.

How would I stop this happening, and also is there a fit to object property for the window, so I can get it to fit exactly to an image?

Thanks again.

Ben.