Tuesday, December 19, 2006

Problem

I have two websites, say one is alex.com and the other is dong.com. I want a javascript in alex.com to send a Ajax.Request to dong.com. In prototype framework, it should be done like this:
new Ajax.Updater('mydiv', 'dong.com/foo/bar', {asynchronous:true});
.The problem is that the second parameter could only be the directory on the same server. AjaxPatterns.com has an article on this topic.

Solution
A little bit HTML+CSS trick,
$('hidden_panel').innerHTML = ' id="cuti_service_request" style="display: none;" src="%27%20+%20url%20+%20%27" title="Server update" iframe -->';

No comments: