If the Mashup page is located on another server than the one the Web Player is installed on, the domain property of the Mashup and the Web Player pages must be changed to match. If, for instance, the Mashup page is located on the machine a.domain.com and the Web Player is located b.domain.com, they both have to be changed to domain.com.
To do this, first change the domain attribute of the javaScriptApi section to domain.com. Then add the line document.domain = 'domain.com'; to the mashup example before the Web Player API is called.
Note: This cannot be done with localhost, since qualified DNS names (machine.domain.com) must be used at all times. The tutorial examples contain a commented line, document.domain='domain.com'; in the start of the first script block, where changes can be made.
- Mashup Development with Multiple Servers
JavaScript in mashup calls from the same server as the Web Player does not compromise domain security. If the mashup and the Web Player reside on different servers, attention to domain attributes is essential.