473,396 Members | 1,785 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

how to run an asp code in javascript?

I am working on a piece of code for an academic experiment and it
puzzled me for days, any help?

I use javascript to sort a table in a html page. bascially, a user can
click on any attributes and the javascript code will rank the contents
of the table based on that attribute. This is done.

Now I want to record the click information into an access database.
basically, wheneve the user click an attribute, I want to use asp code
to insert the click information (userid, attribute_clicked) into an
access database.

My current solution is use window.open in javascript and in the open
function, I insert the url of the asp. something like this:

var nW = window.open('', 'newwnd', 'width=0,height=0,left=0,top=0');
nW.location.href = "desc.asp?subjectid="+ subjectid + "&item=" +
attributeinfo;
nW = null;
However, the problem is there is always a popup windows appears when
the code was executed.

What i want to know is if there is anyway to let the asp code running
in the background invisibly by user?

Thanks in advance!

Yun
Jul 23 '05 #1
2 4973
I did something similar a while back on a java server.
However, instead of a pop-up I used an Image array.

here is something to get you going.

var logAry = new Array();

function log(message){
var logImg = new Image(1,1);
logImg.src = "http://url.here.com/?message=" + escape(message);
logAry[logAry.length] = logImg;
}

Hope this helps,
Tinderbox wrote:
I am working on a piece of code for an academic experiment and it
puzzled me for days, any help?

I use javascript to sort a table in a html page. bascially, a user can
click on any attributes and the javascript code will rank the contents
of the table based on that attribute. This is done.

Now I want to record the click information into an access database.
basically, wheneve the user click an attribute, I want to use asp code
to insert the click information (userid, attribute_clicked) into an
access database.

My current solution is use window.open in javascript and in the open
function, I insert the url of the asp. something like this:

var nW = window.open('', 'newwnd', 'width=0,height=0,left=0,top=0');
nW.location.href = "desc.asp?subjectid="+ subjectid + "&item=" +
attributeinfo;
nW = null;
However, the problem is there is always a popup windows appears when
the code was executed.

What i want to know is if there is anyway to let the asp code running
in the background invisibly by user?

Thanks in advance!

Yun


Jul 23 '05 #2
Perfect, Paul, Thanks a lot!
Paul Davis <pa***@willcode4beer.com> wrote in message news:<Vp********************@comcast.com>...
I did something similar a while back on a java server.
However, instead of a pop-up I used an Image array.

here is something to get you going.

var logAry = new Array();

function log(message){
var logImg = new Image(1,1);
logImg.src = "http://url.here.com/?message=" + escape(message);
logAry[logAry.length] = logImg;
}

Hope this helps,
Tinderbox wrote:
I am working on a piece of code for an academic experiment and it
puzzled me for days, any help?

I use javascript to sort a table in a html page. bascially, a user can
click on any attributes and the javascript code will rank the contents
of the table based on that attribute. This is done.

Now I want to record the click information into an access database.
basically, wheneve the user click an attribute, I want to use asp code
to insert the click information (userid, attribute_clicked) into an
access database.

My current solution is use window.open in javascript and in the open
function, I insert the url of the asp. something like this:

var nW = window.open('', 'newwnd', 'width=0,height=0,left=0,top=0');
nW.location.href = "desc.asp?subjectid="+ subjectid + "&item=" +
attributeinfo;
nW = null;
However, the problem is there is always a popup windows appears when
the code was executed.

What i want to know is if there is anyway to let the asp code running
in the background invisibly by user?

Thanks in advance!

Yun

Jul 23 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

25
by: delerious | last post by:
I see some code examples like this: <DIV onmouseover="this.style.background='blue'"> and other code examples like this: <DIV onmouseover="javascript:this.style.background='blue'"> Which...
3
by: Tommo | last post by:
Hello All, I am a still learning so be easy on me. I am trying to get some code to work that is using JS and Perl/CGI, I am using AS Perl and an Apache Server on XP as the webserver. Can anyone...
18
by: Arthur Connor | last post by:
Is there a way of extracting the Javascript code from the "normal" HTML code (e.g. similar to CSS code which can be put into a separate file) ? If you offer a solution: can I determine in your...
53
by: Cardman | last post by:
Greetings, I am trying to solve a problem that has been inflicting my self created Order Forms for a long time, where the problem is that as I cannot reproduce this error myself, then it is...
1
by: Colin Colin | last post by:
I downloaded a calendar.asp file that someone named Jacob "WickedPisser" Gilley made. It's a few years old but It works fine and it's what I was looking for without getting into ActiveX objects. ...
109
by: Andrew Thompson | last post by:
It seems most people get there JS off web sites, which is entirely logical. But it is also a great pity since most of that code is of such poor quality. I was looking through the JS FAQ for any...
4
by: Carlo Marchesoni | last post by:
I have a button that opens a new Window (some kind of search-window), which is fired using JavaScript (btnSearch.Attributes=".....";) Now I need to run some code behind code BEFORE this JavaScript...
9
by: WRH | last post by:
Hello I am new to asp but I made some Jscript functions which work fine. The functions contain some strings used as a registration key for some apps. It is important that these strings not be...
2
by: Phil Powell | last post by:
One of the websites I manage uses Superstats for tracking, etc., however, each time the Javascript code is included to perform the track, I got this appearing each time at the top of every page: ...
47
by: SOLAV | last post by:
This is the only working way to completely hide your JavaScript code from the client just like PHP or ASP code. Here we'll need the help of PHP. Here is the code: index.php...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.