NavigateUrl and Javscript

Discussion in 'ASP .Net' started by Mike, Jul 17, 2004.

  1. Mike

    Mike Guest

    Hi,

    I am using the following script to open a popup window to display a calendar:

    "javascript:frm=window.open('GrntCalendar.aspx?itemName=grd1__ctl3_txtOriginalDate&selectedDate=7/17/2004','Calendar','width=340px,height=305px,left='+((screen.width - 340) / 2)+',top='+ (screen.height - 305) / 2+'');"

    The script correctly opens a popup window, but it also displays the original page (the one from which the script was run) with an "[object]" text only. Any idea what could be wrong with the javascript above?

    Thanks
    Mike
    Mike, Jul 17, 2004
    #1
    1. Advertising

  2. Mike wrote:

    >
    > Hi,
    >
    > I am using the following script to open a popup window to display a
    > calendar:
    >
    > "javascript:frm=window.open('GrntCalendar.aspx?itemName=grd1__ctl3_txtOriginalDate&selectedDate=7/17/2004','Calendar','width=340px,height=305px,left='+((screen.width
    > - 340) / 2)+',top='+ (screen.height - 305) / 2+'');"
    >
    > The script correctly opens a popup window, but it also displays the
    > original page (the one from which the script was run) with an "[object]"
    > text only. Any idea what could be wrong with the javascript above?


    Nothing really, it does what you ask it to, if you add
    void 0
    after the last semicolon it is fixed.
    However you might want to avoid the javascript: URL, see
    http://jibbering.com/faq/#FAQ4_24

    --

    Martin Honnen
    http://JavaScript.FAQTs.com/
    Martin Honnen, Jul 17, 2004
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Darrel
    Replies:
    4
    Views:
    2,252
    =?Utf-8?B?UGF0cmljay5PLklnZQ==?=
    Oct 26, 2004
  2. Benton
    Replies:
    4
    Views:
    1,110
    Mr Newbie
    Nov 26, 2005
  3. NUG-IT
    Replies:
    11
    Views:
    1,977
  4. mmxmsmmzm@.
    Replies:
    3
    Views:
    90
    Sn!pe
    Sep 8, 2008
  5. Nameo0

    Getting html, css, and javscript work.

    Nameo0, Mar 31, 2012, in forum: HTML and CSS
    Replies:
    0
    Views:
    624
    Nameo0
    Mar 31, 2012
Loading...

Share This Page