In this page : http://pierre.vaudrey.free.fr/actes/acte_mari.php?xid=866
there is a link javascript: num_img(69, 2, 2)
with the following ad_test.js which use submodal to render an image :
function num_img(commune, lot, acte){
var url = 'http://ad01.vtech.fr/etatcivil.html?btCom='+commune;
//alert(url);
var myAjax = new Ajax.Request(url, {method:'get', onComplete:
getCommune});
/* ajax.Response */
function getCommune(transport) {
alert(transport.status);
if(transport.status != 200){alert("Unavailable.")}else{
var a = transport.responseText;
//alert(a);
}
}
var url1 = 'http://ad01.vtech.fr/visu2/visu.html?NumLot='+lot;
var myAjax1 = new Ajax.Request(url1, {method:'get', onComplete:
getLot});
/* ajax.Response */
function getLot(transport) {
if(transport.status != 200){alert("Unavailable.")}else{
var d = transport.responseText.stripTags();
matches = d.match(/\d+/g);
var num_img = matches[6];
//alert(num_img);
}
}
var url2 = 'http://ad01.vtech.fr/visu2/visu.html?INB='+acte;
var myAjax1 = new Ajax.Request(url2, {method:'get', onComplete:
getINB});
/* ajax.Response */
function getINB(transport) {
if(transport.status != 200){alert("Unavailable.")}else{
var e = transport.responseText.stripTags();
matches_INB = e.match(/\d+/g);
var num_img_INB = matches_INB[6];
var url3 = "http://ad01.vtech.fr/visu2/visui.php?
IMAGE="+num_img_INB+"&SI=img0";
showPopWin(url3, 990, 550, null);
//alert(num_img_INB);
}
}
}
Could you help me to find a solution ?
Thanks for your help.
Pierre
On 15 avr, 20:58, Diodeus <[EMAIL PROTECTED]> wrote:
> Depending on what you're fetching, you can also dynamically add
> another javascript tag pointing to another URL:
>
> $("someDiv").insert(new Element("script", { type:'text/javascript',
> src:'http://www.yourDomain.com/test.js'}))
>
> There will be no opportunity to sanitize what the response will be and
> it will execute upon load, so be careful.
>
> On Apr 15, 8:41 am, pierreva <[EMAIL PROTECTED]> wrote:
>
> > I would like from a site myDomain.com request data from another site
> > anotherDomain.com through Ajax.Request. If possible could you point me
> > with an example.
> > Thanks for your help.
>
> > Pierre
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Spinoffs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---