J'ai cette page d'exemple:Prototype Ajax.Updater Eval Javascript Fonctions
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Ajax Page</title>
<script type="text/javascript">
function ajax_hello() {
alert ("hello");
}
alert ("Hello from JS");
</script>
</head>
<body>
This is the Ajax page.
<a href='#' onclick='ajax_hello();'>Click here to fire off JS function</a>.
</body>
</html>
J'appelle avec ceci:
new Ajax.Updater($(element), page, { method: "get", evalScripts: true });
L'alerte est en cours d'exécution, mais la fonction est de ne pas enregistrer (ajax_hello()).
Existe-t-il un moyen d'obtenir ajax pour enregistrer une fonction javascript à la page d'appel?
Comment savez-vous qu'il n'a pas inscrit? Le navigateur émet-il une erreur lorsque vous cliquez sur le lien? –