$.ajax({
URL:"someurl.php",
success: function(html) {
var radios = $("radio", html);
$("body").prepend('<div class="radios"><\/div>');
radios.each(function(i) {
$(".radios").append(radios.eq(i).val() + "<br />");
});
});
});

The Above example retrieves all the html from someurl.php
then i narrow my selection down to every radio button within the html

then i add a div wrapper to the beginning of the body tag.

then i fill the wrapper with the values of each radio button.

may be this example could help you.

On Tue, Jun 2, 2009 at 7:27 PM, jsuggs <jsu...@gmail.com> wrote:

>
> You said the form is replaced by an ajax call.  Can you show us what
> is going on in that call?
>
> On Jun 2, 12:25 pm, "in...@reenie.org" <in...@reenie.org> wrote:
> > I have a form. Upon submit, the data is sent to the server. Under
> > certain conditions, the form is replaced via ajax with a set of radio
> > buttons that offer the user a a choice.
> >
> > I need to access the radio buttons before I submit the form again.
> > Normally I could just access the buttons with getelementbyid but it is
> > not available, presumably because they were generated via ajax.
> >
> > I could submit the form just to access the radio buttons and then submit
> > it again, but I'd like to avoid that.
> >
> > How do I do this?
>

Reply via email to