Hi,

Today another user complained to me with the same problem.
I'm working on an improvement.

On Mon, Nov 14, 2011 at 1:39 PM, Ismael Hasan <[email protected]> wrote:
> Hello,
>
> I want to make a DownloadLink for a dynamic resource, a file generated on
> the fly; to do this, I overwrite the "onClick" method of DownloadLink so
> the file is generated whenever the link is clicked. In the context of my
> problem, it should happen that 2 clicks on the link should return different
> files without reloading the page.
>
> The problem I am facing is that the browser caches the link by its "src"
> attribute, so the "onClick" method is only called the first time: with the
> next clicks the browser directly returns the file generated in the first
> "onClick" (and previously downloaded).
>
> Is there a clean solution to this problem? The solutions I thought so far
> are pretty dirty:
>
> 1.- Instead of having a link, have a list of links, generate a new link
> whenever the link is clicked, and refresh the list via Ajax, so instead of
> a "dynamic" link there will be a new link each time.
> 2.- Add to the link a "foo" parameter each time it is clicked, so the
> browser sees it as a different link. I don't know how to do this, any
> insight will be appreciated.
>
>
> Thank you for your attention,
>
> Ismael.
>



-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to