Forum: Ruby on Rails Not able to access global JS variable in Rails

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
9fb493c9b6b5435e3678a49194fc8038?d=identicon&s=25 Anand Lal (anand)
on 2006-06-12 20:29
Hie,
I have a very genuine problem, may be i am unaware abt the method of
doing it.
I have to declare a global variable and have to give him a value
dynamically.
I am doing it at top of my page in script tag as
<script language="text/javascript">
  var holidays = '<%=@holidays_list%>';
</script>
I am using dyna arch calendar to implement the dynamic weekends.
But i am not able to get the value of this variable from my js method.
Please help!!!!!!!!!
Thanks in anticipation.
Anand
This topic is locked and can not be replied to.