Fog Creek Software
Discussion Board




Knowledge Base
Documentation
Terry's Tips
Darren's Tips

go back

When I want to preview a page with this ASP 'go back' link:

<% referer = request.ServerVariables("HTTP_REFERER")%>
{$ .toets9 $} <a accesskey="9" href=<%=referer%>>Terug naar route</a>

IE opens a 'download file' dialogue. So I don't click the link, I just preview the page that contains it. Uploaded to the webserver everything works fine. Why can't I preview the page?

Maybe I should use an Javascript function. It's probably the most used JS function, but somehow I can't find it. Does anyone have the code? Thanks.

Ruud van Soest
Sunday, September 12, 2004

You can't preview because asp pages has to be run from a server - either on your computer or anywhere else.

Jorgen B.
Sunday, September 12, 2004

Jorgen,

Oh yes, you're right, of course, the initialisation of 'referer' runs uncondionally, I overlooked that. So I will have to look for the javascript function.

Ruud van Soest
Sunday, September 12, 2004

You might want to consider loading IIS on your development machine so that you can test your server side code before you go live with it.  I think its best to put the kind of  code in your example in the server instead of javascript, since javascript can be turned off or may be unavailable to those most interested in using keyboard access codes

IIS comes with W2K and WinXP Pro, so if you are running either, its easy to get up and running

joel goldstick
Sunday, September 12, 2004

Hello Ruud,

try:

<a onClick="history.go(-1); return true;" href="#">Go Back<a>

Hans van Leth
Monday, September 13, 2004


Hans, your JS-code works fine, in CityDesk! Alas, the page is intended for i-mode mobile phones, and there the link just returns the current page, not the referring page.

Jorgen, I found that it is not the initialisation of 'referer' but the extension .asp that calls for the download dialogue.

Joel,
>> re use IIS and JS not always available:
that is why I normally use ASP. But I upload and test it on the server.

So, I guess I will have to compromise: first prepare the page in CityDesk with html extension, then assign the .asp template to the page and upload.

Thanks all!

Ruud van Soest
Monday, September 13, 2004

*  Recent Topics

*  Fog Creek Home