Active X jscript to Populate Userid field

C

cgarrab

Does anyone have a bit of jscript that I can use to pull back the AD user id
and populate a designated field in my infopath form?

I am using Infopath 2003 and am passing the document to a Sharepoint site
without MOSS. I found the following jscript on the web and was able to get
the pop-up to work. Now I need to poultae the field.

{
var objWscript;
objWscript = new ActiveXObject("WScript.Network");

XDocument.UI.Alert(objWscript.username);
}
 
C

CodeRedPR

Does anyone have a bit of jscript that I can use to pull back the AD userid
and populate a designated field in my infopath form?

I am using Infopath 2003 and am passing the document to a Sharepoint site
without MOSS. I found the following jscript on the web and was able to get
the pop-up to work. Now I need to poultae the field.

{
var objWscript;
objWscript = new ActiveXObject("WScript.Network");

XDocument.UI.Alert(objWscript.username);

}

I did that by using SharePoint Web service. See
http://blogs.microsoft.co.il/blogs/...et-the-current-user-without-writing-code.aspx.

Now you said "without MOSS", so I dont know if you can achieve that if
you dont have MOSS in your environment.
 
C

cgarrab

Thank you for your response. Unfortunately, I have tried this approach
without success. The jscript seems to be my only option until we activate
MOSS. Any other suggestions or code advice?
 
C

cgarrab

Found it:

{ var objWscript; objWscript = new ActiveXObject("WScript.Network"); XDocument.DOM.selectSingleNode("/my:Cross_Sell/my:User").text
=(objWscript.username); }
 

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

Top