Calling a function in parent 
Author Message
 Calling a function in parent

New to JScript I have the following problem:

I can use
"parent.document.forms(0).txtReportID.value=sRptID; "
to put a value (sRptID) into a control on the parent form.

I have a function called "GetReportPermit" on the parent form which I would
like to run after txtReportID is populated.

I've tried
"parent.document.forms(0).GetReportPermit;" which does not work.

Can anyone help me?

Thanks,
Suki.



Sat, 28 Aug 2004 20:05:44 GMT  
 Calling a function in parent
Parentheses and the function is in the window namespace:
parent.GetReportPermit();

Joe

Quote:
> New to JScript I have the following problem:

> I can use
> "parent.document.forms(0).txtReportID.value=sRptID; "
> to put a value (sRptID) into a control on the parent form.

> I have a function called "GetReportPermit" on the parent form which I
would
> like to run after txtReportID is populated.

> I've tried
> "parent.document.forms(0).GetReportPermit;" which does not work.

> Can anyone help me?

> Thanks,
> Suki.



Sat, 28 Aug 2004 20:56:29 GMT  
 Calling a function in parent
parent.document.forms[0].GetReportPermit(); // parentheses are required!

--
They called me mad, and I called them mad, and damn them, they outvoted
me. -Nathaniel Lee (on being consigned to a mental institution)

=-=-=
Steve
-=-=-


Quote:
> New to JScript I have the following problem:

> I can use
> "parent.document.forms(0).txtReportID.value=sRptID; "
> to put a value (sRptID) into a control on the parent form.

> I have a function called "GetReportPermit" on the parent form which I would
> like to run after txtReportID is populated.

> I've tried
> "parent.document.forms(0).GetReportPermit;" which does not work.

> Can anyone help me?

> Thanks,
> Suki.



Sat, 28 Aug 2004 21:05:35 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Calling function from parent window

2. How to call a function in iFrame from parent page

3. calling function in child frame from parent frame

4. Call function in parent window, then close child (current)

5. calling a function in the parent window

6. Call a function in a parent window

7. Calling script from an IFrame to the parent frame

8. calling an array of controls in a parent form

9. Calling a sub or function using a variable through another sub or function

10. ShowModelessDialog + passing functions from parent

11. run a function from a pop-up window in the parent window

12. Error accessing parent functions/vars from IFRAME

 

 
Powered by phpBB® Forum Software