ShowModalDialog Populating Popup Form Javascript

C

Colin Graham

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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top