On 5 dic, 13:32, Walter Lee Davis <[email protected]> wrote:

>
> A select can be traversed like any other DOM object, this should be fairly 
> close:
>
> #given doc is a Nokogiri::XML or Nokogiri::HTML nodeset
> doc.css('#yourPickerId option').each do |opt|
>         foo = opt['value']
>         #whatever else you want to do with foo here
> end
>

Thanks, in nokogiri example the result is like "link.content" and
that's why I wondering how I can grab that information from the select
group


>
> Possible, sure. It's never entirely clear why someone would run an Ajax 
> request to populate a page. They may have done it to keep the scrapers out 
> (like you), or they may have done it to isolate and accelerate a laggy part 
> of the initial page load. If the latter (so they aren't actually discouraging 
> you -- did you ask them if you could do this?) then you might also want to 
> look into loading the endpoint of that Ajax request instead of the 
> surrounding page, as that would eliminate the whole JavaScript abstraction 
> entirely. You'd have one HTTP request, and unless that endpoint was kinked to 
> only accept requests from within its own domain, you would likely have JSON 
> or some other structured data in return, and that could be even easier to 
> interpret in your application.
>
> Walter
>
>

You mean that in order to make a better application I have to deliver
the information as JSON ?
I'm kind of new with rails (not a completly newbie but... sort of :D )

Thanks for your help

Javier Q

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" 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-talk?hl=en.

Reply via email to