Code Bank
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsProgrammingCode Bank

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old February 12th, 2005, 05:11 PM
bet00 bet00 is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Feb 2005
Posts: 6 bet00 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 30 m 37 sec
Reputation Power: 0
Lightbulb Global.asa

Hi:

I have some questions regarding global.asa.

I have a content management system, i edited the global.asa for it. But i want install other system and i dont understand how can i edit the global.asa if this system has other code (?).

The first is VBscript, the second one is Jscript. Or can i install it in a subdomain?

The firsr one ask the conecting string for DB, SQL etc, (easy for me)

but the second global : is basically
Code:
        //DBConn
      Application("SQL")            = oXmlDoc.documentElement.selectSingleNode("/SysConfig/DBConnection/SQL").text;
      Application("dataPath")       = oXmlDoc.documentElement.selectSingleNode("/SysConfig/DBConnection/DSN").text;
      Application("filePath")       = Application("dataPath");   
  
                         
      //MailReply
      Application("MailUser")       = oXmlDoc.documentElement.selectSingleNode("/SysConfig/MailReply/User").text;
      Application("MailServer")     = oXmlDoc.documentElement.selectSingleNode("/SysConfig/MailReply/Server").text;
      Application("MailAddress")    = oXmlDoc.documentElement.selectSingleNode("/SysConfig/MailReply/Address").text;
      Application("MailPassword")   = oXmlDoc.documentElement.selectSingleNode("/SysConfig/MailReply/Password").text;
      Application("Port")   = parseInt(oXmlDoc.documentElement.selectSingleNode(  "/SysConfig/MailReply/Port").text);
      Application("Auth")   = oXmlDoc.documentElement.selectSingleNode("/SysConfig/MailReply/Auth").text;
      Application("Subject")   = oXmlDoc.documentElement.selectSingleNode("/SysConfig/MailReply/Subject").text;
      Application("Body")   = oXmlDoc.documentElement.selectSingleNode("/SysConfig/MailReply/Body").text;
  
      //General
      Application("LogoImg")   = oXmlDoc.documentElement.selectSingleNode("/SysConfig/General/Logo").text;
      Application("HomePage")   = oXmlDoc.documentElement.selectSingleNode("/SysConfig/General/Homepage").text;
      Application("Downloads")   = oXmlDoc.documentElement.selectSingleNode("/SysConfig/General/Downloads").text;
      Application("ListSize")   = parseInt(oXmlDoc.documentElement.selectSingleNode(  "/SysConfig/General/MaxList").text);
      Application("NewNews")   = parseInt(oXmlDoc.documentElement.selectSingleNode(  "/SysConfig/General/NewNews").text);
      if (oXmlDoc.documentElement.selectSingleNode("/SysConfig/General/AutoMtr") != null)
        Application("AutoMtr")   = oXmlDoc.documentElement.selectSingleNode("/SysConfig/General/AutoMtr").text;
      else  
  
  (note: when i put this global.asa in the root i have a message (missing ">") in the line 1 but the line 1 is ok (?)
  
  <SCRIPT LANGUAGE=JScript RUNAT=Server>
  

Thank you

Last edited by Shadow Wizard : February 13th, 2005 at 07:18 AM. Reason: added code tags - please do it yourself with [code] and [/code] tags next.

Reply With Quote
  #2  
Old February 13th, 2005, 07:20 AM
Shadow Wizard's Avatar
Shadow Wizard Shadow Wizard is offline
Moderator From Beyond
Click here for more information
 
Join Date: Sep 2004
Location: Israel
Posts: 29,260 Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)  Folding Points: 587728 Folding Title: Super Ultimate Folder - Level 2Folding Points: 587728 Folding Title: Super Ultimate Folder - Level 2Folding Points: 587728 Folding Title: Super Ultimate Folder - Level 2Folding Points: 587728 Folding Title: Super Ultimate Folder - Level 2Folding Points: 587728 Folding Title: Super Ultimate Folder - Level 2Folding Points: 587728 Folding Title: Super Ultimate Folder - Level 2Folding Points: 587728 Folding Title: Super Ultimate Folder - Level 2
Time spent in forums: 3 Months 2 Weeks 2 Days 32 m 33 sec
Reputation Power: 2509
you can't mix vbscript and jscript in the same page like this, as far as I know.

Reply With Quote
  #3  
Old February 19th, 2005, 02:45 PM
Phoenix's Avatar
Phoenix Phoenix is offline
Web-Standards Evangelist
ASP Free Intermediate (1500 - 1999 posts)
 
Join Date: Nov 2003
Posts: 1,522 Phoenix User rank is Corporal (100 - 500 Reputation Level)Phoenix User rank is Corporal (100 - 500 Reputation Level)Phoenix User rank is Corporal (100 - 500 Reputation Level)Phoenix User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 4 Days 23 h 49 m 54 sec
Reputation Power: 10
Correct, indeed you can't

Its preferable to use <% instead of <script runat="server"> in ASP. (Likewise, Codebehind in ASP.Net is better than <script runat="server"> as well)

Note that ASP ignores the language="" attribute of the <script runat="server"> element. You use the <%@ LANGUAGE="VBScript" %> directive to define the page language instead.

If you omit the <%@ directive, then ASP by default assumes your page is written in VBScript.

Reply With Quote
  #4  
Old February 19th, 2005, 03:38 PM
Shadow Wizard's Avatar
Shadow Wizard Shadow Wizard is offline
Moderator From Beyond
Click here for more information
 
Join Date: Sep 2004
Location: Israel
Posts: 29,260 Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)  Folding Points: 587728 Folding Title: Super Ultimate Folder - Level 2Folding Points: 587728 Folding Title: Super Ultimate Folder - Level 2Folding Points: 587728 Folding Title: Super Ultimate Folder - Level 2Folding Points: 587728 Folding Title: Super Ultimate Folder - Level 2Folding Points: 587728 Folding Title: Super Ultimate Folder - Level 2Folding Points: 587728 Folding Title: Super Ultimate Folder - Level 2Folding Points: 587728 Folding Title: Super Ultimate Folder - Level 2
Time spent in forums: 3 Months 2 Weeks 2 Days 32 m 33 sec
Reputation Power: 2509
Quote:
Originally Posted by Dude
Note that ASP ignores the language="" attribute of the <script runat="server"> element. You use the <%@ LANGUAGE="VBScript" %> directive to define the page language instead.

nope, you're wrong here Dude... you can have <script runat="server" language="JScript"> inside page with VBScript as the server side language.

Reply With Quote
  #5  
Old February 19th, 2005, 04:00 PM
Phoenix's Avatar
Phoenix Phoenix is offline
Web-Standards Evangelist
ASP Free Intermediate (1500 - 1999 posts)
 
Join Date: Nov 2003
Posts: 1,522 Phoenix User rank is Corporal (100 - 500 Reputation Level)Phoenix User rank is Corporal (100 - 500 Reputation Level)Phoenix User rank is Corporal (100 - 500 Reputation Level)Phoenix User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 4 Days 23 h 49 m 54 sec
Reputation Power: 10
Oh noes!

Has Captain ASP been proven wrong!??!

this cannot be!

-----

Tune in next time kids for the thrilling conclusion!

Reply With Quote
  #6  
Old February 19th, 2005, 04:10 PM
Shadow Wizard's Avatar
Shadow Wizard Shadow Wizard is offline
Moderator From Beyond
Click here for more information
 
Join Date: Sep 2004
Location: Israel
Posts: 29,260 Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)  Folding Points: 587728 Folding Title: Super Ultimate Folder - Level 2Folding Points: 587728 Folding Title: Super Ultimate Folder - Level 2Folding Points: 587728 Folding Title: Super Ultimate Folder - Level 2Folding Points: 587728 Folding Title: Super Ultimate Folder - Level 2Folding Points: 587728 Folding Title: Super Ultimate Folder - Level 2Folding Points: 587728 Folding Title: Super Ultimate Folder - Level 2Folding Points: 587728 Folding Title: Super Ultimate Folder - Level 2
Time spent in forums: 3 Months 2 Weeks 2 Days 32 m 33 sec
Reputation Power: 2509
lol
don't you take it hard, you hear me?
I'm not 100% sure you can have the <script language="JScript" runat="server"> in exactly the same page, but I'm 100% sure you can include it in VBScript ASP code as I'm doing it myself - I call JScript function from within VBScript code.

Reply With Quote
  #7  
Old February 19th, 2005, 04:20 PM
Phoenix's Avatar
Phoenix Phoenix is offline
Web-Standards Evangelist
ASP Free Intermediate (1500 - 1999 posts)
 
Join Date: Nov 2003
Posts: 1,522 Phoenix User rank is Corporal (100 - 500 Reputation Level)Phoenix User rank is Corporal (100 - 500 Reputation Level)Phoenix User rank is Corporal (100 - 500 Reputation Level)Phoenix User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 4 Days 23 h 49 m 54 sec
Reputation Power: 10
This is intriguing. Does my sidekick, ShadowWizardBoy, have any working examples of this?

Reply With Quote
  #8  
Old February 19th, 2005, 04:30 PM
Shadow Wizard's Avatar
Shadow Wizard Shadow Wizard is offline
Moderator From Beyond
Click here for more information
 
Join Date: Sep 2004
Location: Israel
Posts: 29,260 Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)  Folding Points: 587728 Folding Title: Super Ultimate Folder - Level 2Folding Points: 587728 Folding Title: Super Ultimate Folder - Level 2Folding Points: 587728 Folding Title: Super Ultimate Folder - Level 2Folding Points: 587728 Folding Title: Super Ultimate Folder - Level 2Folding Points: 587728 Folding Title: Super Ultimate Folder - Level 2Folding Points: 587728 Folding Title: Super Ultimate Folder - Level 2Folding Points: 587728 Folding Title: Super Ultimate Folder - Level 2
Time spent in forums: 3 Months 2 Weeks 2 Days 32 m 33 sec
Reputation Power: 2509
*ShadowBoy answer the challange!*
Code:
 --GetMiliSecond.inc:
 <script language="JScript" runat="server">
   function getMiliSeconds() {
    var now = new Date();
    var miliSeconds = now.getTime();
    return miliSeconds;
   }
 </script>
 


Code:
 <% Option Explicit %>
 <!-- #include file="GetMiliSecond.inc" -->
 current mili seconds: <%=getMiliSeconds()%>
 



Reply With Quote
  #9  
Old February 19th, 2005, 05:38 PM
Phoenix's Avatar
Phoenix Phoenix is offline
Web-Standards Evangelist
ASP Free Intermediate (1500 - 1999 posts)
 
Join Date: Nov 2003
Posts: 1,522 Phoenix User rank is Corporal (100 - 500 Reputation Level)Phoenix User rank is Corporal (100 - 500 Reputation Level)Phoenix User rank is Corporal (100 - 500 Reputation Level)Phoenix User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 4 Days 23 h 49 m 54 sec
Reputation Power: 10
Seeming as SSIs are done before the ASP ISAPI, you can include <script runat="server"> with varying languages

T'would appear I was thinking of ASP.Net which only allows one language per page

Hmmm, so thats why they put that down as a difference for ASP.Net "pages can only contain one language"

Reply With Quote
  #10  
Old February 20th, 2005, 02:40 AM
Shadow Wizard's Avatar
Shadow Wizard Shadow Wizard is offline
Moderator From Beyond
Click here for more information
 
Join Date: Sep 2004
Location: Israel
Posts: 29,260 Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)  Folding Points: 587728 Folding Title: Super Ultimate Folder - Level 2Folding Points: 587728 Folding Title: Super Ultimate Folder - Level 2Folding Points: 587728 Folding Title: Super Ultimate Folder - Level 2Folding Points: 587728 Folding Title: Super Ultimate Folder - Level 2Folding Points: 587728 Folding Title: Super Ultimate Folder - Level 2Folding Points: 587728 Folding Title: Super Ultimate Folder - Level 2Folding Points: 587728 Folding Title: Super Ultimate Folder - Level 2
Time spent in forums: 3 Months 2 Weeks 2 Days 32 m 33 sec
Reputation Power: 2509
indeed. classic ASP also can, in theory, contain only one language on the same page but as you see there is way around. actually there is "way around" in ASP.NET as well by Importing page made with C# in VB page and you can call all its functions.

Reply With Quote
  #11  
Old February 20th, 2005, 08:49 AM
Phoenix's Avatar
Phoenix Phoenix is offline
Web-Standards Evangelist
ASP Free Intermediate (1500 - 1999 posts)
 
Join Date: Nov 2003
Posts: 1,522 Phoenix User rank is Corporal (100 - 500 Reputation Level)Phoenix User rank is Corporal (100 - 500 Reputation Level)Phoenix User rank is Corporal (100 - 500 Reputation Level)Phoenix User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 4 Days 23 h 49 m 54 sec
Reputation Power: 10
That's different, thats calling the 'compiled' MSIL page and control classes

Reply With Quote
Reply

Viewing: ASP Free ForumsProgrammingCode Bank > Global.asa


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump





 Free IT White Papers!
 
Create the Optimal Architecture for your Critical Applications
Warburton's the largest independently owned bakery in the UK faced a number of difficult challenges in providing the most robust yet efficient IT infrastructure for their organization's success. IBM's services combined with their xSeries servers created the perfect platform for their SAP environment with sufficient flexibility, and did so in very time effective fashion.

 
Five Best Practices for Deploying a Successful Service-Oriented Architecture
This white paper describes the benefits you can expect with SOA, and how IBM can help take your business there.

 
Gartner Magic Quadrant for Application Delivery Controllers
Gartner summarizes its view on Application Delivery Controllers, evaluates strengths and weaknesses of solutions, and provides Magic Quadrant reporting for a quick comparison across all vendors. Learn from Gartner how you can benefit from an all-in-one device like Citrix NetScaler that delivers the highest levels of availability, performance and security.

 
Knowledge is Power
What you don't know can hurt you, and is likely costing you money and increasing your security risks during an era of scarce resources. This white paper proposes six key strategies that enterprise security managers can use to improve their network defense posture.

 
Rationalizing the Multi-Tool Environment
The rationalized multi-tool approach is flexible, scalable and cost effective. It provides the necessary input to the IT service management business processes. It preserves prior investments in monitoring tools, empowers technologists to select the best tools with which to do their jobs, and enhances effective response to incidents.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2010 by Developer Shed. All rights reserved. DS Cluster 7 Hosted by Hostway
For more Enterprise Application Development news, visit eWeek