Hi,
I am new to jQuery and my background is in classic ASP. I coded two ASp files, one is for data entry of Month and Year.. and the other ASP file is supposed to fetch the entry and process them. The code is as follows;
The ajaxLoader.asp page is supposed to fetch it and process the entry BUT it is not transferring to this page;Code:<script type="text/javascript" src="jquery-1.2.6.min.js"></script> <script type="text/javascript"> function loadingAjax(myDiv, myLink) { $("#"+myDiv).html('<img src="images/wait.gif">'); $.ajax({ type: "POST", url: myLink, data: "qCompany=iNFODynamics", success: function(msg){ $("#"+myDiv).html(msg);} }); } function loadNow(div_id) { var theDiv = div_id; var theLink = "ajaxLoader.asp?qFunc=event&qTrnMonth=" + document.getElementById("qTransmonth").value + "&qTrnYear=" + document.getElementById("qTransyear").value; loadingAjax(theDiv, theLink); } </script> </head> <body> <div style="margin:10px; width:500px;"> <form name="form1" method="post" /> <table border="1" cellpadding="1" cellspacing="5" width="100%"> <td align="right" width="110">Entry point==></td> <td> <label>Month <input type="text" name="qTransmonth" id="qTransmonth" value="<%=trim(trnMonth)%>" size="13" maxlength="12" /></label> <label>Year <input type="text" name="qTransyear" id="qTransyear" value="<%=trim(trnYear)%>" size="8" maxlength="4" /></label> <input type="button" class="btn" name="btnSubmit" id="btnSubmit" value="View Now" onclick="loadNow('ajaxDiv');" /> </td> </table> <div id="ajaxDiv"></div> </form> </div>
What is happening here??Code:<%@language="vbscript" codepage="1252"%> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <% 'normal page initialization Dim trnMonth, trnYear qry = trim(request.Querystring("qFunc")) if qry = "event" then trnMonth = trim(request.Querystring("qTrnMonth") trnYear = trim(request.Querystring("qTrnYear") end if %> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head><title>MAGIC Appliance Center, Inc. - Ajax Page Loader</title> <meta http-equiv="content-type" content="text/html; charset=us-ascii" /> <link rel="stylesheet" type="text/css" href="style%20sheet1.css" /> </head> <body> <div style="border:1px solid #9966cc;"> <p>Ambabangel... asumpal la!!!</p> <p>Entered transaction month is; <%=trnMonth%></p> <p>Entered transaction year is; <%=trnYear%></p> <p> </p> </div> </body> </html>


Reply With Quote

Bookmarks