|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
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" |
|
#2
|
||||
|
||||
|
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. |
![]() |
| Viewing: ASP Free Forums > Programming > HTML, JavaScript And CSS Help > VBScripting |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|