Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Community Forums
 Code Support: ASP (Non-Forum Related)
 ***urgent*** inc_top.asp
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

RobX
Starting Member

USA
27 Posts

Posted - 21 June 2001 :  03:04:34  Show Profile
How can I get this to work in my inc_top.asp?

<%@Language=JavaScript %>
<HTML>
<HEAD>
<TITLE>Active Sessions</TITLE>
</HEAD>
<BODY>
<font face="verdana" size="1">
<%
// show some fun statistics stored in Application variables



// lock the application so I can increment page counter

Application.Lock ( );

Application ( 'PagesToday' )++;

Application.Unlock ( );



// display the data

var nUsers = Application ( 'ActiveUsers' ) - 0;

var nUsersToday = Application ( 'UsersToday' ) - 0;

var nPagesToday = Application ( 'PagesToday' ) - 0;

var bRebootToday = Application ( 'NewToday' ) - 0;



Response.Write ( nUsers + ' active user' + ( (nUsers==1) ? '!' : 's' ) + '<br>' );

Response.Write ( nUsersToday + ' visitor' + ( (nUsersToday==1) ? '' : 's' ) + ' today<br>' );

Response.Write ( nPagesToday + ' page' + ( (nPagesToday==1) ? '' : 's' ) + ' today<br>' );
%>
</FONT>

</BODY>
</HTML>

Is there a way?

Thx
RobX

Edited by - robx on 22 June 2001 13:23:33

Edited by - robx on 22 June 2001 13:24:54

SaiyanJin
Junior Member

115 Posts

Posted - 28 June 2001 :  22:17:20  Show Profile
You need to put all the Applicatoin("variable") in a file called "global.asa" and that file (global.asa) must reside on the root of your webpage.

Go to Top of Page

tilttek
Junior Member

Canada
333 Posts

Posted - 28 June 2001 :  23:18:24  Show Profile  Visit tilttek's Homepage
The best way is to change it to VBSCRIPT... So you won't have any problem changing language!


Philippe Gamache
http://www.tilttek.com
http://www.lapageamelkor.com
Go to Top of Page

aspdesigner
Junior Member

165 Posts

Posted - 28 June 2001 :  23:37:27  Show Profile
I agree with Philippe, why not just do this in VBScript? Combining multiple scripting languages in the same program is something you should only do if you have to.

However, if you insist on doing this, then at least don't change the default scripting language for <% %> as that may be causing conflicts with the existing VBScript code.

Get rid of this -

<%@Language=JavaScript %>


And enclose your Javascript inside script tags instead, like so -


<script language="Javascript" RUNAT=SERVER>
.
.
.
</script>


or something similar. Then at least you are not causing conflicts with the existing VBScript code, which expects the default language for the <% %> tags to be VBScript!

Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 1.02 seconds. Powered By: Snitz Forums 2000 Version 3.4.07