Hi, I am using the MapQuest API and I would like to set the name for
the location by using MQLocation.setName(name) …
I have the name in a Order class, and an object order… how can I
combine the ruby code with the javascript ??
Hi, I am using the MapQuest API and I would like to set the name for
the location by using MQLocation.setName(name) …
I have the name in a Order class, and an object order… how can I
combine the ruby code with the javascript ??
loc1.setName("<%= order.name %>");
Make sure you include the quotes.
Depending on what possible characters can appear in order.name, you may
also need to escape the text, using the “escape_javascript” helper
method:
loc1.setName("<%= escape_javascript order.name %>");
Snow Man wrote:
loc1.setName("<%= order.name %>");
Make sure you include the quotes.
Depending on what possible characters can appear in order.name, you may
also need to escape the text, using the “escape_javascript” helper
method:loc1.setName("<%= escape_javascript order.name %>");
Thanks a lot !! that worked …
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs