You need to sign in to do that
Don't have an account?
laxmi
Relating s-control and webservice
Hi all,
this is the source code for webservice and s-control,how to relate the both, as soon as
i submit the values it should call the webservice method. here i have entered static values
but i want enter manually.
and actually after creation of webservice for the fields for some object how to verify it.
how to know whether it is created or not. i have done many examples on this. but i am getting a
blank page as soon as i click on webtab.
global class testSalesforce1{
WebService static string test1(string result)
{
dbconnection1Mywebservice1Wsdl1.MyWebService1SoapHttpPort stub =
new dbconnection1Mywebservice1Wsdl1.MyWebService1SoapHttpPort();
return result = stub.placeOrder(1, 1, 1);
}}
<html>
<head>
<script type="text/javascript" src="/js/functions.js"></script>
<script src="/soap/ajax/10.0/connection.js"></script>
<script src="/soap/ajax/10.0/apex.js"></script>
<script>
function X(a,b,c) {
try{
var result = sforce.apex.execute("testSalesforce1" ,"test1", {a,b,c});
document.getElementById('userNameArea').innerHTML = 'Congratulations!'
+ + result;
}
catch (ex)
{
alert ("Failed : " + ex);
}
}
</script>
</head>
<body onclick=X(a,b,c)>
Product ID:<input type="text" id="name">
<br></br>
Customer ID:<input type="text" id="id">
<br></br>
Quantity:<input type="text" id="id">
<br></br>
<input type="submit" value="submit">
<hr></hr>
<div id=userNameArea
>
</div>
</body>
</html>
Thanks
laxmi
There are some very basic problems with your HTML
-> the "body" tag has no "onclick" event.
-> "input" fields should be wrapped in a form
see http://www.w3schools.com/html/default.asp