Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
VBSCRIPT and passing parameters
Message
De
15/10/1999 11:45:11
 
 
À
15/10/1999 09:41:50
Information générale
Forum:
Visual FoxPro
Catégorie:
Applications Internet
Divers
Thread ID:
00276795
Message ID:
00276909
Vues:
15
>I have a function that is pulling the value of a textbox. It is a URL address. Once I have this value, I want to verify that the URL is valid. I want to pass this as a parameter to IE and hav IE open the link. Below is my function so far. I need to replace the second msgbox with the code.
>
>I have tried the shell command, but I recieved an error. I don't know if I did it right. Can some one please look at this at let me know how I can make this happen.
>
>Thanks in advance
>Jason Hall
>
>Function verify(urlnum)
>testurl = document.custom("URL" & cstr(urlnum)).value
>If testurl = "" then
> msgbox "You must enter a value in order to verify the HTML Link"
> onclick = False
>Else
> msgbox testurl
> **I need the code to run IE with testurl as the parameter
>End IF
>End Function

Here's the code written in VFP

HTH

FUNCTION ShellExec
LPARAMETER lcLink, lcAction, lcParms


lcAction = IIF(EMPTY(lcAction), "Open", lcAction)

lcParms = IIF(EMPTY(lcParms), "", lcParms)

DECLARE INTEGER ShellExecute ;
IN SHELL32.dll ;
INTEGER nWinHandle, ;
STRING cOperation, ;
STRING cFileName, ;
STRING cParameters, ;
STRING cDirectory, ;
INTEGER nShowWindow



DECLARE INTEGER FindWindow ;
IN WIN32API ;
STRING cNull,STRING cWinName



RETURN ShellExecute(FindWindow(0, _SCREEN.caption), ;
lcAction, lcLink, ;
lcParms, SYS(2023), 1)



* example call. ShellExec("http://www.west-wind.com/")
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform