HTML, JavaScript And CSS Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsProgrammingHTML, JavaScript And CSS Help

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 26th, 2004, 03:27 PM
Gasman Gasman is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Feb 2004
Posts: 1 Gasman User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Unhappy VBScripting

I am doing a web page and using VBScripting and I am trying to place some variables in another file.

I want to access the variable from my web page.

Web page is default.htm
other file is vars.vb

the Default page does not recognize the vars from the vars.vb file.

Here is the script code..

This is Default.htm
<script language="VBScript" type="text/vbscript" src="vars.vb"></script>
<script language="VBScript">
Sub loadInfo(y)
Dim x
x = szArray(y)
End Sub
</script>

This is vars.vb
Dim szArray(10)

szArray(1) = "This is some text"
szArray(2) = "THis is more text"
...
szArray(10) = "There is no more text"

Reply With Quote
  #2  
Old February 26th, 2004, 07:42 PM
GenkiDave's Avatar
GenkiDave GenkiDave is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Jan 2004
Location: Canada
Posts: 60 GenkiDave User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 5
I think if you want to decalre ANY variables in ANY page you can not use .html or .htm pages.

Try using .asp or .php instead

Alos, ARRAYS by default start at zero, so you wuold have

Array(10)

Array(0)="This is some text"
-
-
-
-
Array(9)="This is some text"

Count the Array(0) as number 1 and you will have 10 arrays

0 1 2 3 4 5 6 7 8 9

Hope this helps a little

Last edited by GenkiDave : February 26th, 2004 at 07:46 PM.

Reply With Quote
Reply

Viewing: ASP Free ForumsProgrammingHTML, JavaScript And CSS Help > VBScripting


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


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





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway
Stay green...Green IT