You need to sign in to do that
Don't have an account?
Scott M - SFDC Fan
Javascript in a VisualForce Page. I'm lost
Hi, Why would this simple JavaScript work in an S-Control and not in a VisualForce page? <script type="text/javascript" language="JScript"> var meldung = {!Case.SAP_Service_Notification__c} ; var command = '"*iw52 RIWO00-QMNUM=' + meldung + '"'; var sapuser ="{!$User.SAP_User_Name__c}"; var sprache="{!$User.SAP_Login_Language_New__c}"; var program = 'sapshcut.exe -sid=TDZ -clt=201 -user=' + sapuser + ' -command=' +command+ ' -language='+sprache+ ' -type=Transaction' ; function starte(program) { var WshShell = new ActiveXObject("WScript.Shell"); WshShell.Run(program); } </script> {!Case.SAP_Service_Notification__c} I get the following error: Details zum Fehler auf der Webseite Benutzer-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30; .NET CLR 3.0.04506.648; .NET CLR 1.1.4322; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; MS-RTC LM 8; .NET4.0C; .NET4.0E; MS-RTC LM 8) Zeitstempel: Mon, 30 May 2011 10:58:31 UTC Meldung: Automation server can't create object Zeile: 21 Zeichen: 3 Code: 0 URI: https://c.cs4.visual.force.com/servlet/servlet.Integration?lid=066P00000000BzW&ic=1 Meldung: Automation server can't create object Zeile: 21 Zeichen: 3 Code: 0 URI: https://c.cs4.visual.force.com/servlet/servlet.Integration?lid=066P00000000BzW&ic=1 Scott
Can you please rearrange the code as it is next to impossible for me to understand it :)
Why dont you add alert statements in between the javascript statements.
It will atleast help in knowing where actually its failing.
Hi scamo, any updates on this, me too stuck with the same issue while converting an S-Control to visual force.
--yvk