Click here to Skip to main content
13,006,281 members (80,492 online)
Rate this:
Please Sign up or sign in to vote.

I created a classic ASP page. I capture some data from the 3rd party application using java script. Here I want to store that data into the sql database. After press a button all the values should store in the database. But I can't understand how to do it. Appreciate if any one can help me.

Here is my asp page.

<title>Test of disconnection</title>
<meta http-equiv="Content-Language" content="<%=language%>">
<meta http-equiv="Content-Type" content="<%=charset%>">
<META HTTP-EQUIV="Pragma" CONTENT="no-cache"> 
<style type="text/css">
    * { margin:0; padding:0; }
    h1 {
	font-family: "Trebuchet MS", sans-serif;
	font-size: 1.8em;
	letter-spacing: -1px;
	background-color: #3f5f91;
	color: white;
	padding: 7px;
	margin-bottom: 7px;
<body onLoad="connectExternal(); startClock();" bgcolor="#ffffff">
<div id="connected" style="display:none;">
<h1 style="color: #afa" >Call connected</h1>
<div id="QueueName" style="display:None;">
<h1 style="color: #afa"> OK </h1>
<div id="disconnected" style="display:none;">
<h1 style="color: #faa">Call disconnected!</h1>
<input type=submit name="Submit" value="Submit" onclick="--Save Record in Database--"></input>
<div id="noconnection" style="display:none;">
<h1 style="color: #ffa">Opened not in Client, will not work</h1>

<script type="text/javascript" language="JavaScript">
var ActivePhoneCall;
var QueueName;
var LogonName = "<%=Server.URLEncode(Request.ServerVariables("LOGON_USER"))%>";
var handler = function(a1, a2, a3) {
function connectExternal() {
  try {
    ActivePhoneCall = window.external.GetActivePhoneCall();
    if (ActivePhoneCall.CallState != 3) 
      document.getElementById("connected").style.display = 'block';
  } catch(e) {
    ActivePhoneCall = null;

Thank you,
Posted 11-Jun-12 19:10pm

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

Use traditional AJAX for ASP - XMLHttp or ServerXMLHTTP Object.

How To Submit Form Data by Using XMLHTTP or ServerXMLHTTP Object[^]
Manas Bhardwaj 12-Jun-12 2:10am
Will Work +5!
Sandeep Mewara 12-Jun-12 2:23am
Thanks Manas.
Soft009 12-Jun-12 2:47am
Thank you for the answer. Can we store data in a database using this method.
Sandeep Mewara 12-Jun-12 3:08am
Did you go through the link? You are talking to server from this and thus will be able to save data in database.
Soft009 12-Jun-12 3:10am
yes, Ok i'll try it and see whether it works. Thanks a lot. +5
Espen Harlinn 12-Jun-12 8:20am
Sandeep Mewara 12-Jun-12 12:54pm
Thanks Espen.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web01 | 2.8.170628.1 | Last Updated 12 Jun 2012
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100