Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
History.back()
Message
De
05/11/2004 12:37:18
 
 
À
04/11/2004 17:18:14
Information générale
Forum:
ASP.NET
Catégorie:
Formulaires Web
Titre:
Divers
Thread ID:
00958298
Message ID:
00958577
Vues:
15
>This doesn't get much simpler but... here we go. I am new to JavaScript, so I am trying something very simple.
>
>I have created an asp.net button object and added the onclick attribute to it. The JavaScript is very simple "History.back()" and that should take you back to the previous page in the browser's history. Unfortunately I get an error: "Microsoft JScript runtime error: 'History' is undefined".
>
>I have tried this same command using a simple HTML object and specifying the language for the object as "javascript".
>
>What am I doing wrong here?
>
>
>protected override void AddAttributesToRender(HtmlTextWriter writer)
>{
>	base.AddAttributesToRender (writer);
>	writer.AddAttribute("onclick", "History.back();");
>}
>
This could be better:
        writer.AddAttributes("onclick", "javascript:history.back()")
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform