ascolta, prova a guardare il codice di sotto: è fatto per capire quanto sia semplice ajax. Uso prototype.js
codice:<%@ Language=VBScript %> <% option explicit Response.Buffer = true onload %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" > <head> <title>Pagina senza titolo</title> <link href="../../../stili/Styles.css" rel="stylesheet" type="text/css" /> <script type="text/javascript" src="../../../js/prototype.js"></script> <script language="javascript" type="text/javascript"> <!-- function Button1_onclick() { var url_action = "?comando_ajax=1"; var parametri = "Text1=" + encodeURIComponent($("Text1").value) + "&" + "Text2=" + encodeURIComponent($("Text2").value); new Ajax.Request(url_action, {onComplete:showResponse, parameters:parametri} ); function showResponse(originalRequest) { var t = originalRequest.responseText; var ts = t.split("|"); $("span1").innerHTML = ts[0]; $("span2").innerHTML = ts[1]; } } // --> </script> </head> <body> <div>Scrivi qualcosa nei textbox e fai la richiesta al server</div> <input id="Text1" type="text" /><span id="span1"></span> <input id="Text2" type="text" /><span id="span2"></span> <input id="Button1" type="button" value="fai la richiesta al server" onclick="return Button1_onclick()" /> </body> </html> <% sub onload() dim comando_ajax comando_ajax = Request("comando_ajax") if(comando_ajax = "1") then ajax1 end if end sub sub ajax1() dim Text1, Text2 Text1 = request.Form("Text1") Text2 = request.Form("Text2") dim result result = "Text1 = " + Text1 & "|" & "Text2 = " + Text2 response.Write(result) response.End end sub %>

Rispondi quotando