Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    New to the CF scene
    Join Date
    Feb 2007
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    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

  • #2
    Senior Coder BarrMan's Avatar
    Join Date
    Feb 2005
    Location
    Israel.
    Posts
    1,644
    Thanks
    69
    Thanked 83 Times in 82 Posts
    Try:
    Code:
    var submenu_vid = {"Video" :"javascript:window.open('vid.htm',' ',' ');",
    "Foto's" : "foto.htm" };

  • #3
    New to the CF scene
    Join Date
    Feb 2007
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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?

  • #4
    Senior Coder BarrMan's Avatar
    Join Date
    Feb 2005
    Location
    Israel.
    Posts
    1,644
    Thanks
    69
    Thanked 83 Times in 82 Posts
    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.

  • #5
    New to the CF scene
    Join Date
    Feb 2007
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •