Hello!
I've read everything in this newsgroup about the subject, but still can't
hadle with it!
Need help, please!!
I don't want to use Visual Studio .NET to create a Form (like in Lab #15 on
MSDN library), I want to write JScript inside InfoPath.
So I found a solution here:
>In JScript:
>
>function XDocument::OnLoad(eventObj)
>{
>//Create a WScript.Network object, which provides access to the user data
>var objNetwork = new ActiveXObject("WScript.network");
>//Retrieve the UserName and write it into the my:UserName field
>XDocument.DOM.selectSingleNode("/my:myFields/my:UserName").text =
>objNetwork.UserName;
>//Retrieve the UserDomain and write it into the my:UserDomain field
>XDocument.DOM.selectSingleNode("/my:myFields/my:UserDomain").text =
>objNetwork.UserDomain;
>//Retrieve the ComputerName and write it into the my:ComputerName field
>XDocument.DOM.selectSingleNode("/my:myFields/my:ComputerName").text =
>objNetwork.ComputerName;
>}
But it doesn't work! This code stop working after the first string:
>var objNetwork = new ActiveXObject("WScript.network");
I couldn't find nothing about "WScript.network" - I think such definition
doesn't exist. So I don't know how I can solve this problem!
Please, if I'm wrong and somebody know a solution, point me on it!
thnx!
Josh Bertsch [MSFT] - 26 Aug 2004 21:26 GMT
What is the error that you are seeing?
--josh bertsch
> Hello!
> I've read everything in this newsgroup about the subject, but still can't
[quoted text clipped - 30 lines]
>
> thnx!
Juli V. - 27 Aug 2004 04:20 GMT
Oh! That's all! I've done it! My problem was in security. I've set my form
to Full Trust and everything is ok now!
Thanks anyway!
> What is the error that you are seeing?
>
[quoted text clipped - 37 lines]
>>
>> thnx!