Hi,
>May be you need to check variable for undefined?
The .Document is defined. I don't know how to check for the presence of a Function.
>Did you try to call some JavaScript function with simple alert for now, not passing references to the form (how JavaScript will understand thisform object ?)
Just tried against a Javascript function with no parameters - same problem.....
At the moment I'm using a VBScript function that, in turn, passes the form reference to a Javascript function for storage. Bit convoluted but it works.....
>Also since you're calling it from VFP, should it be in VFP forum?
At this point I don't know whether it's a VFP problem or an IE problem.......
Best,
Viv
>
>>Hi,
>>
>>Two alternative pieces of code ; the first using VBScript and the second using Javascript:
<script language="VBSCRIPT" type="text/vbscript">
>> Dim oVFPForm
>> Function SetFormRef(lotheForm)
>> Set oVFPForm = lotheForm
>> End Function
>></script>
>><script language="javascript" type="text/javascript">
>> var jVFPForm;
>> function SetFormRef(lotheForm) {
>> jVFPForm = lotheForm;
>> }
>></script>
>>
>>Calling the VBScript version from VFP with ".DOCUMENT.Script.SetFormRef(THISFORM)" works fine but the same line used against the Javascript function raises an OLE error. I don't think the code within the function is the problem - even an empty version of the function behaves the same. Anyone know what the problem might be?
>>TIA,
>>Viv