how to run an asp code in javascript?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Tinderbox

    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_click ed) 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.hre f = "desc.asp?subje ctid="+ 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
  • Paul Davis

    #2
    Re: how to run an asp code in javascript?

    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:
    [color=blue]
    > 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_click ed) 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.hre f = "desc.asp?subje ctid="+ 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[/color]

    Comment

    • Tinderbox

      #3
      Re: how to run an asp code in javascript?

      Perfect, Paul, Thanks a lot!


      Paul Davis <paule@willcode 4beer.com> wrote in message news:<Vp-dnYEdptVtbUHdRV n-ug@comcast.com> ...[color=blue]
      > 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:
      >[color=green]
      > > 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_click ed) 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.hre f = "desc.asp?subje ctid="+ 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[/color][/color]

      Comment

      Working...