onSubmit="function_name(parameter to send)"
example
onSubmit="validate(frm.txt.value)"
then recieve the paremeter like
<script>
function validate(varTXT)
varTXT now olds the value of the text field txt A language that doesn't affect the way you think about programming is not worth knowing.
I have a similar problem with my script. As a standalone script (fidm.vbs) it runs just fine and it uploads the file correctly. But when I embedd the script into an HTML page it doesn't work for me. I've pasted part of the code in this message. The message boxes are showing me the correct data but when it goes to ftp it bombs out...no errors just doesn't do it. The window pops up then closes so I don't know what it is telling me on the ftp part. Any help would be greatly appreciated. Thanks,Rich
<body>
<SCRIPT LANGUAGE="VBScript">
Sub runFIDM_onClick()
On Error Resume Next
Dim wsh
Dim tsScript
Dim fs
Dim strRemoteSite
Dim strUsrN
Dim strPssW
Dim objFolder
Dim FolderPath
Dim objFolder_Contain
Dim foundFile
Dim strFilename
Dim cdDrive
Dim intWindowStyle
Dim strFtpScriptFileName
FolderPath = cdDrive
Set objFolder = fs.GetFolder(FolderPath)
Set objFolder_Contain = objFolder.Files
For Each foundFile In objFolder_Contain
strFilename = cdDrive & "\" & foundFile.name
'********************************************************************************
'Checking data with MsgBox
MsgBox "File from cd rom: " & strFilename
the only thing you are doing wrong here is putting the function in the body tag. take it out and put it in the head section and there is a ; not needed in there on line 75.
this is a revised example working
<html>
<head>
<SCRIPT LANGUAGE="VBScript">
Sub runFIDM_onClick()
On Error Resume Next
Dim wsh
Dim tsScript
Dim fs
Dim strRemoteSite
Dim strUsrN
Dim strPssW
Dim objFolder
Dim FolderPath
Dim objFolder_Contain
Dim foundFile
Dim strFilename
Dim cdDrive
Dim intWindowStyle
Dim strFtpScriptFileName
FolderPath = cdDrive
Set objFolder = fs.GetFolder(FolderPath)
Set objFolder_Contain = objFolder.Files
For Each foundFile In objFolder_Contain
strFilename = cdDrive & "\" & foundFile.name
'********************************************************************************
'Checking data with MsgBox
MsgBox "File from cd rom: " & strFilename
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.