Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Calling javascript in .aspx, returning a value
Message
 
À
08/09/2004 08:44:37
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Divers
Thread ID:
00940239
Message ID:
00940255
Vues:
14
>I have a .aspx page in .NET that calls a javascript function. (which is in the .html code behind of the page) I use the following code to call the function in the .aspx page:
>
>
>StringBuilder checkForAcrobat = new StringBuilder();
>checkForAcrobat.Append("<script language='javascript'>");
>checkForAcrobat.Append("checkAcrobatVersion();");
>checkForAcrobat.Append("</script>");
>RegisterStartupScript("checkForAcrobat", checkForAcrobat.ToString());
>
>
>How can I return a value from this javascript function back to my .aspx page, and use if for further evaluation?

You could have the JavaScript function save the value (the version number) to a (hidden) textbox in the page and automatically submit the page from the JavaScript function. Something along the lines of:
document.frmMyForm.txtAdobeVersion.value="theversiongoeshere";
document.frmMyForm.submit();
Hector Correa
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform