Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Java Newbie Applet Question

Status
Not open for further replies.

AJACK62659

Programmer
Apr 23, 2002
2
US
With some experience in javascript I have a script that checks the Windows 200 login id of a user this is embedded on a web page.

Code Below

Q: How would I re-create this as a java applet and call the funtion from the web page on load.

I cannot use an asp include file becasue it must not be a script language thus I have turned to a compiled Java Applet.

Thanks Beforehand

AJ

*****************************

Code:

function auto_login() {

var WshNetwork

WshNetwork = new ActiveXObject("WScript.Network")
if (WshNetwork <> &quot;&quot;)
{
var strUserName = WshNetwork.UserName;
document.dialogForm.DMW_USER.value = strUserName;
document.dialogForm.DMW_PASSWORD.value = strUserName;

}
else
{
alert (&quot;You must select Yes to access the COMeT Application.&quot;);
}

}

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top