Hi Peter,
One of the rule of thumbs when using the portal for integration with backend system
is that the portal and the backend systems will be on the same domain
(e.g portal.domain.com & backend.domain.com).
you can find more information on SAPnote 1334956 and:
The JavaScript Same Origin Policy And The Enterprise Portal - Portal - SCN Wiki
Best regards,
Etay