You need to sign in to do that
Don't have an account?

Getting error when i run custom link having s-control
hello,
i am using sforce API 6.0 and asp.net using c#.
I have added one custom link to account page .This custom link is created using
s-control. when i click on this custom link i got error like - object doesn't support this property or method. i have written html body i.e. java script when i created scontrol.
in this html body i have called webservices of my project.
when i write same java script in outside explorer page it works finely.
can anyone tell me solution on this .
thanx.
i am using sforce API 6.0 and asp.net using c#.
I have added one custom link to account page .This custom link is created using
s-control. when i click on this custom link i got error like - object doesn't support this property or method. i have written html body i.e. java script when i created scontrol.
in this html body i have called webservices of my project.
when i write same java script in outside explorer page it works finely.
can anyone tell me solution on this .
thanx.
More information is needed. Can you post the contents of your sControl?
HINT: and a textarea tag to your post using the HTML Editor mode. Switch to Graphical Editor mode and resize your textarea and paste the contents of your scontrol into the textarea.
thanx for the reply.
actually i have called my webservice in javascript.for that webservice.htc file is required. i can not put this webservice.htc file in the html body of the s-control.
thats why i am getting error , i think.
what i have to do , i have to call sforce API in the jaascript of html body in scontrol.
here is my code in the html body of scontrol. plz suggest me the solution
<html>
<head>
<script language="JavaScript">
var iCallID = 0;
function init()
{
//alert("hi");
service.useService("http://localhost/SalesProject/Service1.asmx?WSDL","MyMath");
// alert("hi");
iCallID = service.MyMath.callService(mathResults,"QuerySample");
}
function mathResults(result) {
if(result.error) {
var xfaultcode = result.errorDetail.code;
var xfaultstring = result.errorDetail.string;
var xfaultsoap = result.errorDetail.raw;
alert(xfaultstring);
} else{
alert(result.value);
if(result.value=="A103"){
window.open ("http://localhost/SalesProject/Login.aspx",
"mywindow","menubar=1,resizable=1,width=1000,height=650");
}
else
{
window.open ("http://localhost/SalesProject/Welcome.aspx",
"mywindow","menubar=1,resizable=1,width=1000,height=650");
}
}
}
</script>
</head>
<body onload="init()">
<DIV ID="service" style="behavior:url(webservice.htc)" >
</DIV>
</body>
</html>
Message Edited by DevAngel on 11-10-2005 08:39 AM