Go Back   CodingForums.com > :: Client side development > JavaScript programming

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 02-10-2007, 02:05 PM   PM User | #1
Zstyles
New to the CF scene

 
Join Date: Feb 2007
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Zstyles is an unknown quantity at this point
Problem with [object]

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
Zstyles is offline   Reply With Quote
Old 02-10-2007, 02:44 PM   PM User | #2
BarrMan
Senior Coder

 
BarrMan's Avatar
 
Join Date: Feb 2005
Location: Israel.
Posts: 1,644
Thanks: 69
Thanked 83 Times in 82 Posts
BarrMan is on a distinguished road
Try:
Code:
var submenu_vid = {"Video" :"javascript:window.open('vid.htm',' ',' ');",
"Foto's" : "foto.htm" };
BarrMan is offline   Reply With Quote
Old 02-10-2007, 03:26 PM   PM User | #3
Zstyles
New to the CF scene

 
Join Date: Feb 2007
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Zstyles is an unknown quantity at this point
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?
Zstyles is offline   Reply With Quote
Old 02-10-2007, 05:47 PM   PM User | #4
BarrMan
Senior Coder

 
BarrMan's Avatar
 
Join Date: Feb 2005
Location: Israel.
Posts: 1,644
Thanks: 69
Thanked 83 Times in 82 Posts
BarrMan is on a distinguished road
Code:
var submenu_vid = {"Video" :"javascript: onClick=window.open('vid.htm',' ',' '); return false;",
"Foto's" : "foto.htm" };

Last edited by BarrMan; 02-10-2007 at 05:56 PM..
BarrMan is offline   Reply With Quote
Old 02-13-2007, 12:05 PM   PM User | #5
Zstyles
New to the CF scene

 
Join Date: Feb 2007
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Zstyles is an unknown quantity at this point
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
Zstyles is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 03:11 AM.


Advertisement
Log in to turn off these ads.