Tag:asp

  • Ajax responsexml return accepts ASP

    Time:2022-7-23

    First file index.asp<script language=”javascript”> var xmlHttp = false; //ajax usagetry {   xmlHttp = new ActiveXObject(“Msxml2.XMLHTTP”); } catch (e) {   try {     xmlHttp = new ActiveXObject(“Microsoft.XMLHTTP”);   } catch (e2) {     xmlHttp = false;   } } if (!xmlHttp && typeof XMLHttpRequest != ‘undefined’) {   xmlHttp = new XMLHttpRequest(); } function callserver() {  var url = “index.asp”;  xmlHttp.open(“POST”,url,true);  xmlHttp.onreadystatechange = update;     xmlHttp.setrequestheader(“content-type”,”application/x-www-form-urlencoded”);  xmlHttp.send(null); } function update() {  if(xmlHttp.readystate==4)  {   var xmldoc=xmlHttp.responseXML   var info = xmldoc.getElementsByTagName(“info”)[0].text;   alert(info);  } } callserver(); </script>   The second login.asp <% Response.ContentType=”text/xml” response.Write(“<?xml version=’1.0′ encoding=’GB2312′ ?>”) response.Write(“<root>”) response.Write(“<info>love you</info>”) response.Write(“</root>”) %>

  • ASP of WebService with Ajax weather forecast

    Time:2022-7-4

    Because I found that Ajax has some problems in cross domain at present, it can only be set up in ie, so I wrote a simple ASP WebService, which is actually a thief program to catch the weather of Yahoo, and then generate XML. Let’s start here first. We will consider adding databases in the […]

  • Ajax basic chat room code

    Time:2022-6-30

    I’ve wanted to send it out for a long time. I haven’t had much time. Today, I’ll send the code and write comments tomorrow In the same sentence, AJAX is an application, not a special technology. I think that what we need to do demo is speed, which should be easy for viewers to understand. […]

  • The origin of Chr (0) in asp/vbscript and the analysis of its security problems

    Time:2022-6-14

    This character marks the end of the string, also known as null terminated, which is used for script programming, especiallyASPProgramming brings some trouble. Many people may ask why this special character should be retained. We can trace back to C, one of the languages that write the operating system. Children who have learned c/c++ may […]

  • ASP + Ajax static page paging code

    Time:2022-4-20

    Recently, due to the need of work, I want to realize paging on the static page. After thinking about it, I decided to implement it with Ajax, so I made the following efforts. The screenshot is as follows: Copy codeThe code is as follows: <html> <head> < title > Ajax static paging < / Title […]

  • ASP Ajax static paging page 1 / 2

    Time:2022-3-14

    <html> <head> < title > Ajax static paging Demo: https://www.jb51.net </title><meta http-equiv=”content-type” content=”text/html;charset=gb2312″> <style type=”text/css”> <!– body                { text-align:center;font:14px Verdana,sans-serif; } a:link,a:visited    { color:#00f;text-decoration:none; } a:hover                { color:#f00;text-decoration:underline; } #main                { width:450px;background:#f2f2f2;border:1px #999 solid;padding:10px;text-align:left;line-height:150%;margin:0 auto; } #title                { width:100%;line-height:30px;border-bottom:1px #999 solid;display:table; } #left                { float:left;width:50%;text-align:left;font-size:14px;font-weight:bold; } #right                { float:left;width:50%;text-align:right; } #content            { width:100%;margin:10px 0;clear:both; } #download            { width:100%;margin:10px 0;line-height:150%; } –> </style> <script type=”text/javascript”> […]

  • Use of regular expressions ASP

    Time:2022-1-22

    Copy codeThe code is as follows: <% ‘ ————————————————————– ‘match ‘object The results of ‘match search are stored in the’ match ‘object, which provides access to the read-only properties of regular expression matching.The ‘match’ object can only be created by the ‘execute’ method of the ‘regexp’ object, which actually returns a collection of ‘match’ objects.‘all match […]

  • Asp . Net calls a stored procedure with parameters

    Time:2021-12-19

    1. Detailed explanation of background calling stored procedure with parameters Example: Note: @ analysisdate, @ process_ PTR is a stored procedure parameter IDataParameter[] iDataDi = new SqlParameter[2]; iDataDi[0] = new SqlParameter(“@AnalysisDate”, showDate); iDataDi[1] = new SqlParameter(“@Process_PTR”, ID); //Gets the different time of the selected date of the test item dtDifferTime = SqlHelper.RunProceduresByParameter(“pro_GetDifferenceTimeInfos”, iDataDi);        //Runproceduresbyparameter […]

  • ASP + Ajax + ACCESS database example explanation three steps sharing

    Time:2021-10-30

    After reading this Ajax example tutorial, I believe you can also easily make a primary Ajax Application.You can also visit directly:https://www.jb51.net/codes/57017.htmlDownload the source code example of the Ajax tutorial.OK, let’s start to let you know the basic application of Ajax + ASP step by step. We will explain it in three steps, as follows.1. Creation […]

  • The Ajax usage of jQuery is implemented in ASP using $. Ajax()

    Time:2021-10-21

    Copy codeThe code is as follows: <% response.Expires=-1 response.CacheControl=”no-cache” %> <!–#include file=”../../conn/conn.asp“–> <!–#include file=”../psw.asp”–> <!–#include file=”../../functions/dofunction.asp”–> <!–#include file=”../../functions/showfunction.asp”–> <!–#include file=”../../fqdb/admin/website.asp”–> <% cmd = checkstr(request(“cmd”),2) if cmd=”loadteacher” then response.Charset = “gb2312” set rs=server.CreateObject(“adodb.recordset”) sql=”select teacher_id,name from Edu_Person” rs.open sql,conn,1,3 response.write “{“”data””:[” i = 0 do until rs.eof i = i + 1 response.write “{“”Id””:”&rs(“teacher_id”)&”,””Name””:”””&rs(“name”)&”””}” if i<rs.recordcount […]

  • ASP regular expression detects functions beginning with HTTP

    Time:2021-10-17

    ‘#################################### ‘function: ishttp [STR]‘parameter: STR, string to be processed‘author: Mu Mu‘date: July 12, 2007‘description: check whether the HTTP connection address or address bar starts with HTTP‘example: <% = ishttp( http://www.alixixi.com )%>‘#################################### Function ishttp(str) Dim regEx Set regEx = New RegExp regEx.Pattern = “^(http|HTTP)[A-Za-z]{0,1}\:\/\/” ishttp = regEx.Test(str) End functionVerify that the email address meets the standards<% ‘****************************** ‘function: isEmail (strng)‘parameter: strng, email address to be verified‘author: alisisi‘date: […]

  • Replacing non empty regular numbers in ASP

    Time:2021-10-4

    function replacestr(str) dim re set re=new regexp re.ignorecase=true re.global=true re.pattern=”\D” str=re.replace(str,””) replacestr=str set re=nothing end function