Hi Jim
Thanks for your response. I tried with send_data using the tag and
it works fine !!!.
But my problem is i want to do it through AJAX, and i’m not sure how to
do it with AJAX.
ie. when we call the link_to_remote(…), it emits the output using the
:update
ie. we can define an empty
like this and we
can ask :update=>‘updatediv’, which will emit the output of
link_to_remote into the div element which is fine.
But in our case, in the contoller i’m using send_file like this
send_file(‘public/images/myImage.png’,type=>“image/png”,:disposition=>“inline”),
so the AJAX when it receives this file it will update in the ‘updatediv’
element. But i want to use tag here, ie get the updates from AJAX
and update it using the tag, i still dont know whethere it makes
sense or not.
ie. bottom line -> AJAX + send_file + tag is what i’m trying to do
so that i will…but still no luck and struggling…
Thanks again for your kind replies…
Dinesh
Jim C. wrote:
On Jun 16, 2006, at 11:51 PM, Dinesh U. wrote:
In your case you are also displaying the image finally in the browser
itself rt may be in a’div’ element using ‘send_data’? with “inline”
otion, then it should work for me also rt?
Yes – my controller’s view generates an tag which is a reference
to another controller method, which uses send_data to return the image
inline. You could do that if you wanted to However, just using
‘expires_now’ for every image is a bit of a large hammer; it depends on
how often your images really change, and how much caching you want the
clients to be able to do.
and it’s method ‘reflectpng’ that used send_data.
-jim