Hey, Eric
Thank you very much for help.
I checked my codes again, yes I made a typo here, it should be
"dynamic_categories" here
And now when I visit app/views/javascripts/dynamic_categories.js.erb I
can get the array
But, question comes again
I can get category and subcategory list in my item/new view
But, when I change the value of category the value of subcategory
doesn't change!
I checked with web inspector, I got this error message"TypeError:
Value undefined (result of expression document.observe) is not
object."
It seems my result of document.observe is not correct?
OK, guys
Finally I figured it out.
I missed the <%= javascript_include_tag :defaults %> in my layout.
Now everything goes fine.
Thank you very much for your help.