Guyon
04-23-2003, 02:09 AM
I am trying to add an option in our site where the user can click on a button to download an ASP generated file.
The code looks a bit like this...
<a href="javascript:void(0);"
onclick="o = MyGetObj('results'); if ( o ) window.location = 'my.asp?ext=GetCSV&ids=' + o.getIDs()"
>Get it here</a>
The first time the user clicks on this link, everything works, which is great.
But after that, if they use the page again, it crashes the browser. I suspect that the bit where I'm changing window.location is causing the browser to throw away its old state.
Is there a better way to do this using just Javascript and HTML?
The code looks a bit like this...
<a href="javascript:void(0);"
onclick="o = MyGetObj('results'); if ( o ) window.location = 'my.asp?ext=GetCSV&ids=' + o.getIDs()"
>Get it here</a>
The first time the user clicks on this link, everything works, which is great.
But after that, if they use the page again, it crashes the browser. I suspect that the bit where I'm changing window.location is causing the browser to throw away its old state.
Is there a better way to do this using just Javascript and HTML?