function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
we-mpwe-mp 

Display return values on a Mashup page

Hi,
 
I have a custom button on a search page that invokes an HTML S-Control.
 
 
Code:
<html> 
<head> 
<script src="/soap/ajax/8.0/connection.js"></script> 
<script type="text/javascript" 
src="http://mymachine:8888/SalesForceWebService-context-root/MyWebService1SoapHttpPort/webServiceController—String_1={!Search__c.Login_Name__c}&String_2={!Search__c.Password__c}&String_3={!Search__c.First_Name__c}&String_4={!Search__c.Last_Name__c}&String_5={!Search__c.City__c}&String_6={!Search__c.State__c}&String_7={!Search__c.Postal_Code__c}"></script> 
<script type="text/javascript"> 
function initPage() { 
} 
</script> 
</head> 
<body onload="initPage();"> 
</body> 
</html>

 
Search__c.** are merge fields
 
 
 The webservice returns a few strings as return values.  How can I capture and display them on the mashup page?
 
Thanks.
cheenathcheenath
Your script from :

http://mymachine:8888/SalesForceWebService-context-root/

should return valid javascript, something like:

var myListOfString = ["foo", "bar"];

Then from initPage() you can access myListOfString variable.
HTHS,



Message Edited by cheenath on 02-28-2007 07:32 AM

we-mpwe-mp
The webservice returns a string.
How can I capture this value and access it in initPage()
Is there an example that I can refer to?
 
Thank you.
 
cheenathcheenath
Same origin policy of browser wont allow SControl to access
data from a external servers.

You can include javascript from any servers and that is the only
work around.

HTHs,




we-mpwe-mp

Thanks for both your responses.

But I am kindof stuck and looking for any help I can get.   I am attempting a proof of concept where a webservice is called from SalesForce and a return String value displayed. 

Your earlier post indicated that I can retrieve the return value and display it to the user.  Is that possible?

The code posted originally is what I have.

Thanks again.