Hi, I am new to jquery ! I am using the code below to insert record, the data posted to targeted asp page, but nothing happen, but when I try using simple form and post with same coding , the data inserted !
Jquery Code
<script>
$(document).ready(function(){
// code here
$("a").click(function(event){
// alert("Thanks for visiting!");
$(this).addClass("test");
event.preventDefault();
$(this).hide("slow");
$.post("suggested.asp", { profileid: "<%=(Recordset1.Fields.Item("MatchProfileID").Value)%>", seenby: "<%=(Recordset1.Fields.Item("Foruser").Value)%>" },
function(data){
alert("Data Loaded: " + data);
});
});
//
});
</script>
ASP CODE
<%
' Setting variables
Dim rs, data_source
data_source = "dsn=mydsn;"
' Creating Recordset Object and opening the database
Set rs = Server.CreateObject("ADODB.Recordset")
' Lets open books table
rs.Open "sugg", data_source
rs.AddNew
' Now adding records
rs("byid") = Request.Form("seenby")
rs("vid") = Request.Form("profileid")
rs.Update
Response.Write("Done")
' Done. Now Close the Connection
rs.Close
Set rs = Nothing
%>