Friday, June 14, 2013

[Rails] Re: Refresh a div without reloading the page

Walter Davis wrote in post #1112372:
> On Jun 13, 2013, at 6:03 PM, Robert Walker wrote:
>
>>>
>>
>> # AJAX update
>> $('#div_to_update').load("/url/to/retrieve/div/contents", function()
>> {
>> # Optional completion handler called after loading the div
>> contents
>> });
>> });
>> });
>
> Thanks for pitching in with this. Can you show the proper way in jQuery
> to get the current value of the picker you're observing, as I did with
> $F(this) above? That's usually the critical thing with this design
> pattern -- you change the picker and you get unique content based on
> whatever value you changed it to.
>
> Walter

$('#widget_id_picker_dom_id').val();
or
$(this).val();

--
Posted via http://www.ruby-forum.com/.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/8fa112ff20d3ce16daa5486e250ad30c%40ruby-forum.com.
For more options, visit https://groups.google.com/groups/opt_out.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate