...

View Full Version : Problem with [object]



Zstyles
02-10-2007, 03:05 PM
Hi All,
I thought I had it all worked out, nice js menu etc,

var submenu_vid = {"Video" : "vid.htm",
"Foto's" : "foto.htm" };

but I decided to open the page in a new window:

var submenu_vid = {"Video" :"javascript: onClick=window.open('vid.htm',' ',' ');",
"Foto's" : "foto.htm" };

The page opens in a new window, but the old page turns blank and just displays: [object]

What did I forget ?
What does this mean ?

Thanks for any help :thumbsup:

BarrMan
02-10-2007, 03:44 PM
Try:

var submenu_vid = {"Video" :"javascript:window.open('vid.htm',' ',' ');",
"Foto's" : "foto.htm" };

Zstyles
02-10-2007, 04:26 PM
Thanks for the reply Barrman,

Still the same problem tho,
the new window opens fine, but the old one still shows: [object]

Could it be the overlying js menuscript?
What does it mean if a page just shows the word [object] with the brackets?

BarrMan
02-10-2007, 06:47 PM
var submenu_vid = {"Video" :"javascript: onClick=window.open('vid.htm',' ',' '); return false;",
"Foto's" : "foto.htm" };

Zstyles
02-13-2007, 01:05 PM
Thanks for helping me out Barrman,
the code is now functioning perfectly.

Much appreciated that you help a novice out, I mostly just paste the code and as soon as I make adjustments, there appear errors.

I ordered an issue of "javascript for dummies" so I can get rid of the most obvious mistakes,


Thanks Again

Arn:thumbsup:



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum