Hi all,
Can I have a ruby code inside a java script function written in .js file?
When I tried it, i got an error.
e.g. consider following function inside myscript.js file
myscript.js
function sayHi
{
<%name="xyz"%>;
alert(''HI <%=name%>'');
}
But this works if I have above function in a rhtml file inside <script>
tag.
Any inputs in this regard will be really helpful.
Thanks and Regards,
Medha.
--~--~---------~--~----~------------~-------~--~----~
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
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---