what is worng with this JScript

Discussion in 'ASP .Net' started by Craig G, Dec 21, 2004.

  1. Craig G

    Craig G Guest

    i havent a clue about javascript, i found a small snippet for launching a
    datetimepicker, ive used the following to successfully open a small dialog
    window for a calender. i want to do something similar for postcodes

    this is the calender code and it works fine

    var popUp;

    function OpenCalendar(idname, postBack)
    {
    popUp = window.open('frmCalender.aspx?formname=' + document.forms[0].name +
    '&id=' + idname + '&selected=' + document.forms[0].elements[idname].value +
    '&postBack=' + postBack, 'popupcal',
    'width=175,height=248,left=200,top=250');
    }


    so i just *adapted* it to launch the postcode form. but it keeps on falling
    over with an error on page when i click the link and wont open the dialog

    function OpenPostCode(idname, postBack)
    {
    popUp = window.open('frmPostCode.aspx?formname=' + document.forms[0].name +
    '&id=' + idname + '&selected=' + document.forms[0].elements[idname].value +
    '&postBack=' + postBack, 'popupPC',
    'width=175,height=248,left=200,top=250');
    }

    any idea's as to why this would be happening?

    Cheers,
    Craig
    Craig G, Dec 21, 2004
    #1
    1. Advertising

  2. Craig G

    Craig G Guest

    ah doesnt matter....it was just a case-sensitive problem!!!!


    "Craig G" <craig.gamble@y_arrasoftware.com> wrote in message
    news:%23S%...
    > i havent a clue about javascript, i found a small snippet for launching a
    > datetimepicker, ive used the following to successfully open a small dialog
    > window for a calender. i want to do something similar for postcodes
    >
    > this is the calender code and it works fine
    >
    > var popUp;
    >
    > function OpenCalendar(idname, postBack)
    > {
    > popUp = window.open('frmCalender.aspx?formname=' + document.forms[0].name

    +
    > '&id=' + idname + '&selected=' + document.forms[0].elements[idname].value

    +
    > '&postBack=' + postBack, 'popupcal',
    > 'width=175,height=248,left=200,top=250');
    > }
    >
    >
    > so i just *adapted* it to launch the postcode form. but it keeps on

    falling
    > over with an error on page when i click the link and wont open the dialog
    >
    > function OpenPostCode(idname, postBack)
    > {
    > popUp = window.open('frmPostCode.aspx?formname=' + document.forms[0].name

    +
    > '&id=' + idname + '&selected=' + document.forms[0].elements[idname].value

    +
    > '&postBack=' + postBack, 'popupPC',
    > 'width=175,height=248,left=200,top=250');
    > }
    >
    > any idea's as to why this would be happening?
    >
    > Cheers,
    > Craig
    >
    >
    Craig G, Dec 21, 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. Jon Maz
    Replies:
    4
    Views:
    1,262
    Jon Maz
    Sep 9, 2004
  2. Maxwell2006
    Replies:
    5
    Views:
    2,388
    Steven Cheng[MSFT]
    Mar 7, 2006
  3. fastwings
    Replies:
    3
    Views:
    4,131
    Rolf Magnus
    Apr 17, 2004
  4. Unpopular
    Replies:
    2
    Views:
    282
    James Kanze
    Feb 15, 2008
  5. moshe
    Replies:
    3
    Views:
    105
Loading...

Share This Page