Philip Hallstrom wrote:
> On Jun 2, 2009, at 2:23 PM, Tyler Knappe wrote:
> 
>>        var next_week = 0;
>>
>> <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?
> 
>   alert('Next week' + next-week);
>                       ^^^^^^^^^
> 
> That should be "next_week".
> 
> Odds are you're getting a JS error, but not seeing it.  Turn on
> whatever debugging you might have (firebug in firefox, or safari's
> debug inspector) and it will make this easy to catch.
> 
> -philip

I fixed this and turned on firebug.

I am now seeing the following error:

missing } in XML expression
[Break on this error] alert('test');\n

I tried just the following to simplify things:

<script type="text/javascript">
        //var next_week = 0;
        function testjs()
        {
        }

                //next_week = next_week + 1;
                //alert("next_week");
                //alert('test');
                //return next_week;
        //}
</script>

Which calls an empty function.

Now I am seeing the following:

syntax error
[Break on this error] }\n

Why is this the case?  How could there be a syntax error?
-- 
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