Hey All,

I'm trying to call a javascript function from my view:

<%= link_to_function 'Next Week Test', "testjs()" %>

Which *should* be calling this:

<script type="text/javascript">
        var next_week = 0;
        function testjs()
        {
                //next_week = next_week + 1;
                 alert('Next week' + next-week);
                //return next_week;
        }
</script>

I've included /public/javascripts/test.js in my layout, it shows up as
included in the source of the page:

<script src="/javascripts/test.js?1243524559"
type="text/javascript"></script>

However, it never seems to call the function resulting in the alert.

Anyone see something wrong?

Thanks.
-- 
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 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