ShowModalDialog Populating Popup Form Javascript

Discussion in 'Javascript' started by Colin Graham, Apr 14, 2005.

  1. Colin Graham

    Colin Graham Guest

    I have developed a button in javascript that opens a popup form when
    clicked. This popup form grabs values from the main parent form and
    populates fields on the form. i use the following code to do this :-

    Example:

    function fun_PopUP()
    {
    document.form1.VIN.value=window.opener.document.form1.VIN.value;
    }

    i use the following code to do this:

    "openWindow('VehicleDetails.asp','VehicleDetails',300,450);"

    I have now realised that i needed to open my form as a ShowModalDialog
    form as i do not want the user to do anything until they have filled
    in all necessary details on the popup. I have changed my code over to
    use the showmodaldialog method and the form opens but i am now getting
    the following error:-

    Error:'window.opener.document'is null or not an object

    Can anyone please advise me how to get round this ?? i feel it is to
    do with pulling values from a form that is now inactive.

    Any help greatly appreciated

    CG
     
    Colin Graham, Apr 14, 2005
    #1
    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. dapkniht
    Replies:
    1
    Views:
    1,337
    Eliyahu Goldin
    Mar 8, 2006
  2. Rajesh
    Replies:
    0
    Views:
    558
    Rajesh
    Jul 31, 2007
  3. Jamie Jackson
    Replies:
    1
    Views:
    122
    Jamie Jackson
    Sep 4, 2003
  4. Jens Peter Hansen
    Replies:
    7
    Views:
    543
    Randy Webb
    Jun 19, 2004
  5. Jonathan
    Replies:
    0
    Views:
    194
    Jonathan
    Jul 19, 2004
Loading...

Share This Page