mmm not exactly,
i want update a div (#AJAXresultextras) whit the content of another
div in the data return by de request or updater.
e.g.
//we have this html
<div id='mydiv'>contenido</div>
//call the request:
new Ajax.Request('./',
{ method: 'post',
parameters: $
('resultsextras').serialize(true),
onSuccess:
function(transport){
var html =
transport.responseText;
//html = the content of
#result
$('mydiv').update(html );
$('mydiv').innerHTML;
}
} )
//(or the updater)
//and mypage.php return this html:
<p>hola que tal</p>
<div id='mydiv2'>nuevo contenido</div>
<p>para rellenar</p>
//but I only want update mydiv whit the mydiv2 content "nuevo
contenido"
On Sep 7, 5:44 pm, "Nicolás Sanguinetti" <[EMAIL PROTECTED]> wrote:
> You want to update a div with the response of the ajax request *plus*
> store the response in a global variable? This might work.
>
> new Ajax.Updater("AJAXresults", "./", {
> parameters: $("resultextras").serialize(true),
> onComplete: function(transport) {
> window.ajaxResponse = transport.responseText;
> }
>
> });
>
> On 9/7/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
>
>
> > hi,
>
> > (i'm new on ajax and prototype)
>
> > i have this:
>
> > new Ajax.Request('./',
> > { method: 'post',
> > parameters: $('resultsextras').serialize(true),
> > onSuccess:
> > function(transport){
> > var html = transport.responseText;
> > //html = the content of #result
> > $('AJAXresults').update(html );
> > $('AJAXresults').innerHTML;
> > }
>
> > } )
>
> > AND want extrat the content from a div #result in the var html, but i
> > don't know how. I search the documentation of prototyte but i not find
> > the answer.
>
> > (sorry for my english)
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---