‎2018 Sep 25 9:20 AM
hi i get some code in online i try to use in html while i got an error message,like "uncaught referenceerror" and search in internet based on some blog ans ,i change my browser settings for active x enable then i try in browser but same error occurred.
<!DOCTYPE html>
<html>
<head>
<script language="JavaScript">
retcd = 0;
exceptions = 0;
function SAPlogon()
{
fns = new ActiveXObject("SAP.Functions");
trans = fns.Transactions;
conn = fns.connection;
conn.System = "DEV";
conn.user = "ABAP";
conn.password = "*****";
conn.Client = "100";
conn.Language = "EN";
conn.tracelevel = 6;
conn.RFCWithDialog = 1;
conn.logon(0, 0);
exceptions = 0;
};
function SAPlogoff()
{
conn.logoff(0, 0);
exceptions = 0;
};
</script>
</head>
<body>
<button type="button" onclick="SAPlogon()">Logon</button>
<button type="button" onclick="SAPlogoff()">Logoff</button>
</body>
</html>
error on "fns = new ActiveXObject("SAP.Functions"); " this line.
Can you give some idea to resolve this problem .
Thanks and regard,
B.Umayaraj.
‎2018 Sep 25 12:20 PM
That's not HMTL. It's JavaScript. The HTML even tells you this.
<script language="JavaScript">