Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Mailto: redirection from server
Message
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Versions des environnements
Environment:
C# 1.1
Divers
Thread ID:
01142834
Message ID:
01142927
Vues:
17
>just add a javascript function to close the window:
>
>
><a href="http://myredirectingsite.com?URL=123456 onclick="closeme();">Send me an email</a>
>
>
>and in
<head>
section add:
>
>
><script language=javascript  type ="text/javascript" >
>function closeme()
>{
>   window.close();
>}
></script>
>


Correct. But I would add a set focus beforehand. If you don't, and the user has set the focus to a different program in between your first page and the one you are about to close, then when closing it, the page on the forefront would be the other program (maybe Excel or something), instead of the previous browser page. This could be confusing for some users.

Also in this example it is done inline. No need for a separate javascript function, which is only needed if you plan to so something complex and/or reusable. Either one works fine.
<a href="http://myredirectingsite.com?URL=123456 OnClick="javascript:window.opener.focus();window.close();">Send me an email</a>


Alex Feldstein, MCP, Microsoft MVP
VFP Tips: English - Spanish
Website - Blog - Photo Gallery


"Once again, we come to the Holiday Season, a deeply religious time that each of us observes, in his own way, by going to the mall of his choice." -- Dave Barry
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform