Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


Why does this script not work?

 
Logged in as: Guest
arrSession:exec spGetSession 2,2,1110
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Why does this script not work?
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 Why does this script not work? - 7/3/2004 1:09:23 AM   
  Blotto

 

Posts: 3
Score: 0
Joined: 7/3/2004
From:
Status: offline
Hi,

I have a problem with a piece of code of my website. The interpreter says me, that there would be an error, but see yourself:

[code]
<script language="VBScript">

Sub Button1_OnClick
Dim strLocalFile, strRemoteFile
Dim nError

strLocalFile = "c:\temp\License.txt"
strRemoteFile = "/pub/Word/License.txt"

FileTransfer1.Passive = True
FileTransfer1.FileType = 2 ' Binary

Form1.Button1.Disabled = True

nError = FileTransfer1.Connect("ftp.zeus02.de", 21)
If nError <> 0 Then
MsgBox FileTransfer1.LastErrorString, vbExclamation
Form1.Button1.Disabled = False
Exit Sub
End If

nError = FileTransfer1.GetFile(strLocalFile, strRemoteFile)
If nError <> 0 Then
MsgBox FileTransfer1.LastErrorString, vbExclamation
Else
MsgBox "your License was downloaded! You are now allowed to use enoWORD legit!", vbInformation
End If

FileTransfer1.Disconnect
Form1.Button1.Disabled = False
End Sub

Sub FileTransfer1_OnProgress(FileName, FileSize, BytesCopied, Percent)
window.status = "Downloading " & FileName & " (" & BytesCopied
& " bytes copied)"
End Sub

</script>
<body>
<object ID="FileTransfer1" width=28 height=28 classid="clsid:7682472C-0D6F-4D9B-A262-5739C0AD3879">
<param name="_cx" value="741">
<param name="_cy" value="741">
</object>
<form name="Form1">
<input type="button" value="Download" name="Button1">
</form>
 
 
Post #: 1
 
 Re: Why does this script not work? - 7/5/2004 6:14:51 AM   
  Blotto

 

Posts: 3
Score: 0
Joined: 7/3/2004
From:
Status: offline
nobody an idea?

(in reply to Blotto)
 
 
Post #: 2
 
 Re: Why does this script not work? - 7/22/2004 5:15:18 AM   
  rgilberto2001

 

Posts: 1
Score: 0
Joined: 7/22/2004
From:
Status: offline
Not an expert by any means.
Not sure of its file type i.e. asp or htm etc
or its host server IIS 4.0 or Apache

But I've had similiar gliches where asp files would execute and others
would only diplay the script text.

For instance I downloaded asp's and edited them using Fronpage.
For VBScripts this has a check box for "Run at Server". If this was the case your program when clicked will only display text. Also the global.asa file which serves as an override may or may not been included in the application folder.

You may try deleting <script language = "VBScript"> and replace with
<%
@language="VBScript"
%>

I hope this fixes your script or helps with other script abends

(in reply to Blotto)
 
 
Post #: 3
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Why does this script not work? Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts