[Web2.0] prototype e passare var (post) a un pop-up

Aldo Galimberti aldo.galimberti a txt.it
Mer 30 Maggio 2007 15:41:31 CEST


Cristiano Verondini wrote:

>>> Non avendo mai provato prototype, non ho capito se e' fattibile
>>> questo approccio?
> 
>    E' possibile in JS, quindi immagino anche usando prototype (che perņ 
> non conosco).
> 

Esempi di script da studiare non ci sono? TRovo una marea di esempi ma 
non fanno quello che mi serve anche perche non ho capito come passarlo 
direttamente come stream il risultato del post

Ecco un esempio:
var opt = {		
// Use POST
   method: 'post',
		
// Send this lovely data
    postBody: 
'checkid=true&id=12%checkPro=true&idPro=12&checkid=true&id=54' ,

// Handle successful response
    onSuccess: function(t) {
	var jsRes = t.responseText;

////

<!-- a questo punto come lo trasformo il jsRes in uno stream?


////
		
    },
// Handle other errors
    onFailure: function(t) {
         showKo('Error ' + t.status + ' -- ' + t.statusText);
     }		
}

new Ajax.Request('backend/services/printReports.jsp', opt);

-- 
Aldo Galimberti - TXT Polymedia S.p.A.
v.Frigia 27 - 20126 Milano
Tel. +39 02 257711 Fax. +39 02 2578994
http://www.txt.it/



Maggiori informazioni sulla lista Web2.0