am representing data in graphical view and in that i put from date, end date and search button
when i select from date, end date and when i press search, values are going into controller through ajax and rendering partial but i can’t able to pass the instance variable in partial view. i have tried the following
render :partial => "filter_data", :locals => { :x1=>@x1, :y1 => @y1 }
then use x1 and y1 in the partial. See
If that still does not work then insert puts statements in the partial
to print the values of things to see what is going on. The print will
appear in the server window. Then you will know whether it is getting
the data to the view that is the problem or whether it is the view
code itself.
i have tried x1 and y1 also still i didn’t get the graph it is showing empty page, but when i render that @x1 or x1 in text_field_tag it is displaying. How can i pass that variables in javascript
First of all I suggest you to try firebug in firefox. Then you can see exactly what is returned for your request. In your case you might need escaping javascript with javascript_escape.
yeah i have changed to local variables and passed to partial by debugging in firefox i got the expected values in javascript(partial view) but graph is not displaying according to expected values