Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VFPScript examples
Message
From
19/06/2000 15:38:36
 
 
To
19/06/2000 15:21:28
General information
Forum:
Visual FoxPro
Category:
Internet applications
Miscellaneous
Thread ID:
00381929
Message ID:
00381940
Views:
15
Greg,

if I understand your problem then you can do it without scripting. I put some code in the BeforeNavigate2 event of my browser controls to call forms or PRGs. This code checks the URL if a VFP form or PRG is to be launched and if so it prevents the default behavior of the browser control (cancel = .T.). The URL has to start with scx:// or prg:// instead of the usual protocol acronyms (http:// or whatever) and will be followed by the path of the form or program to be executed.

The BeforeNavigate2 code snippet might look like this:
LPARAMETERS pdisp, url, flags, targetframename, postdata, headers, cancel

LOCAL lcProtocol,lcURL

lcURL = LEFT(url,6)
IF (lcURL = "scx://") OR (lcURL = "prg://")
  cancel     = .T.
  lcProtocol = SUBSTR(url,7)
  IF RIGHT(lcProtocol,1) = "/"
    lcProtocol = LEFT(lcProtocol,LEN(lcProtocol)-1)
  ENDIF
ENDIF
DO CASE 
  CASE lcURL = "prg://"
    DO &lcProtocol
    RETURN
  CASE lcURL = "scx://"
    DO FORM &lcProtocol
    RETURN
ENDCASE
I've acquired quite a taste for a well-made mistake... [Fiona Apple]
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform