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)
 Help with TNX code on ASP site
 New Topic  Topic Locked
 Printer Friendly
Previous Page | Next Page
Author Previous Topic Topic Next Topic
Page: of 4

pdrg
Support Moderator

United Kingdom
2897 Posts

Posted - 01 December 2007 :  11:14:33  Show Profile  Send pdrg a Yahoo! Message
Theoretically one can mix vbscript and javascript in a page, but you'll hit problem after problem trying to retrofit, as javascript isn't at all common running serverside in ASP.

One problem to remember is that ASP is an interpreted language, and the order of the interpretations is always javascript before VBScript (regardless of where on the page they appear), which can badly affect what you expect to happen.

It may make your life a lot easier to rewrite your javascript sections as VBScript.
Go to Top of Page

AnonJr
Moderator

United States
5768 Posts

Posted - 01 December 2007 :  14:29:06  Show Profile  Visit AnonJr's Homepage
First, JavaScript and JScript aren't exactly the same - so which is it?

Second, if you post your JScript, without the @Language statement, between <script language="JScript" runat="server"> </script> tags it will be processed server-side and mix with VBScript - just like I posted earlier. I tried to see if TNX had a "Help" section for developers, but it doesn't look like they have a public one....

Lets take a step back and try to figure out the problem. First, is inc_site_left.asp the only place you are putting the code?
Go to Top of Page

MammaRose
Starting Member

United States
32 Posts

Posted - 01 December 2007 :  20:58:59  Show Profile  Visit MammaRose's Homepage
I would prefer it on inc_site_left, but at this point, I will settle for it anywhere. I am frustrated with TNX and their lack of support and am about to throw the towel in and forget it.

Cross Tattoos
Go to Top of Page

Doug G
Support Moderator

USA
6493 Posts

Posted - 01 December 2007 :  23:56:56  Show Profile
It's easy to incorporate javascript in a page that defaults to vbscript

The @Language statement defines the scripting language used for server code between <% .. %> tags. You can use the <script language="javascript" runat="server> ... </script> syntax to define server code in a different scripting language. So a framework would be something like:

<%@LANGUAGE = "VBScript"%>
<%
 'vbscript code here
%>

<script language="javascript" runat="server">
 // javascript code here
</script>



======
Doug G
======
Computer history and help at www.dougscode.com
Go to Top of Page

AnonJr
Moderator

United States
5768 Posts

Posted - 02 December 2007 :  08:08:16  Show Profile  Visit AnonJr's Homepage
quote:
Originally posted by MammaRose

I would prefer it on inc_site_left, but at this point, I will settle for it anywhere. I am frustrated with TNX and their lack of support and am about to throw the towel in and forget it.


Is the include for banner1.asp the only thing you have in inc_site_left.asp?
Go to Top of Page

pdrg
Support Moderator

United Kingdom
2897 Posts

Posted - 02 December 2007 :  11:00:06  Show Profile  Send pdrg a Yahoo! Message
quote:
Originally posted by Doug G

<%@LANGUAGE = "VBScript"%>
<%
 'vbscript code here
%>

<script language="javascript" runat="server">
 // javascript code here
</script>



But don't forget the javascript will still be parsed and evaluated before the vbscript, which can cause problems if you're not expecting it! Just a gotcha, been that way since the 90's but hardly anyone runs up against it as vbscript is the de-facto standard for ASP
Go to Top of Page

MammaRose
Starting Member

United States
32 Posts

Posted - 02 December 2007 :  13:34:58  Show Profile  Visit MammaRose's Homepage
quote:
Originally posted by AnonJr
Is the include for banner1.asp the only thing you have in inc_site_left.asp?


I have google ads and auctionads running on inc_site_left. I have been putting the TNX code as the first thing on that page.

Cross Tattoos
Go to Top of Page

MammaRose
Starting Member

United States
32 Posts

Posted - 02 December 2007 :  14:14:10  Show Profile  Visit MammaRose's Homepage
quote:
Originally posted by AnonJr

I tried to see if TNX had a "Help" section for developers, but it doesn't look like they have a public one....


They have a help forum but don't tell the site unless you are a member. It is forum.tnx.net I posted my question several times on their forum and have been told by 2 separate moderators that neither of them are asp coders and I would have to wait for their "technical support" to get an answer to my question.

Cross Tattoos
Go to Top of Page

AnonJr
Moderator

United States
5768 Posts

Posted - 03 December 2007 :  08:59:32  Show Profile  Visit AnonJr's Homepage
If that's the kind of support you can expect, I might reconsider...

That aside, I started digging deeper into why you were getting the "name redefined" error. BITS_TO_A_BYTE and a couple other constants being used by the md5 encryption code are also defined in the SHA256 encryption code used by Snitz. I'd have to look at it more, but there's probably a bit of overlap that can safely be eliminated. That's probably the next step since that was the error you were getting after we fixed the first error.

Its worth noting that we need to be careful with what we edit in these encryption algorithms...
Go to Top of Page

MammaRose
Starting Member

United States
32 Posts

Posted - 03 December 2007 :  09:38:29  Show Profile  Visit MammaRose's Homepage
Interesting..this is much more complicated than I had first thought. Also, just as a test, I set up a page called test.asp and put nothing but the code to call banner.asp and the page loads as it should.

www.sportsforumz.net/test.asp is the URL

Interestingly, when I use <script language="JScript" runat="server"> on banner1 - I get error
Microsoft JScript runtime error '800a138f' 

Object expected 

/forum/banner1.asp, line 13 test


but if I use <%@Language="JScript" %>
the page loads as it should, but I get the @command error in my forum when I try to include test.asp into inc_site_left.asp

Cross Tattoos

Edited by - MammaRose on 03 December 2007 12:59:39
Go to Top of Page

MammaRose
Starting Member

United States
32 Posts

Posted - 03 December 2007 :  11:02:57  Show Profile  Visit MammaRose's Homepage
Someone else asked for help with ASP on the TNX help forum. So apparently I am not the only one struggling. Is it possible to use another programming language? They also have perl available.

Cross Tattoos
Go to Top of Page

AnonJr
Moderator

United States
5768 Posts

Posted - 03 December 2007 :  14:11:28  Show Profile  Visit AnonJr's Homepage
quote:
Originally posted by MammaRose

Interesting..this is much more complicated than I had first thought. Also, just as a test, I set up a page called test.asp and put nothing but the code to call banner.asp and the page loads as it should.

www.sportsforumz.net/test.asp is the URL

Interestingly, when I use <script language="JScript" runat="server"> on banner1 - I get error
Microsoft JScript runtime error '800a138f' 

Object expected 

/forum/banner1.asp, line 13 test


but if I use <%@Language="JScript" %>
the page loads as it should, but I get the @command error in my forum when I try to include test.asp into inc_site_left.asp



It has to do with the order ASP executes script blocks. Because the MD5 code is in VBScript it doesn't get processed until after the JScript block. It may be worth trying to re-write the JScript code in VBScript.

You get an error on the @Language directive when you include it in the site because Snitz already declares it as VBScript in either inc_header.asp or config.asp - I forget which at the moment.


quote:
Originally posted by MammaRose

Someone else asked for help with ASP on the TNX help forum. So apparently I am not the only one struggling. Is it possible to use another programming language? They also have perl available.

You could in the technical sense that its possible, but you're going to run into a lot of the same problems you are now with the order of execution. You would also need to make sure that that particular language is one that is supported on your server. Its looking more and more like you could really use that code in VBScript. I'd ask if they have a VBScript version.
Go to Top of Page

MammaRose
Starting Member

United States
32 Posts

Posted - 03 December 2007 :  16:40:58  Show Profile  Visit MammaRose's Homepage
I will ask TNX, but I would guess that they do not.

Cross Tattoos
Go to Top of Page

AnonJr
Moderator

United States
5768 Posts

Posted - 04 December 2007 :  09:42:16  Show Profile  Visit AnonJr's Homepage
It may be worth searching their support forums and asking there - I doubt you are the only person to have had these issues.
Go to Top of Page

MammaRose
Starting Member

United States
32 Posts

Posted - 04 December 2007 :  22:29:10  Show Profile  Visit MammaRose's Homepage
Someone else did ask on the help forum, but as far as I can tell, they did not get an answer. I am going to try and get a programmer to help me convert the script.

Cross Tattoos
Go to Top of Page
Page: of 4 Previous Topic Topic Next Topic  
Previous Page | Next Page
 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 0.23 seconds. Powered By: Snitz Forums 2000 Version 3.4.07