Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Send data to a Web Page
Message
 
To
17/02/2011 17:36:22
General information
Forum:
Visual FoxPro
Category:
Internet applications
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Miscellaneous
Thread ID:
01500623
Message ID:
01500627
Views:
117
You can do all this with IE automation from Foxpro or straight win32 functions (if it's simple) in foxpro. Now does this web page already exist or is this how you foresee the app working? What I'm getting at is, if none of this already exists, why not create a vfp web application instead. For this I would recommend http://activevfp.codeplex.com since it can be used on any cheap host and performs great.

If you really want to automate an existing web page, check out this IE automation example in VFP:
* /// GoDaddy Crawling Script 
oWeb=CREATEOBJECT("InternetExplorer.Application")
*  /// crawling visibility: 1= visible, 2= invisible   ///*
oWeb.visible=1
* //// lcDomain, lcUser, lcPass are values from the Options dialog   ////*
* //// go to the main page   ////// *
oWeb.navigate2("https://dcc.godaddy.com/DomainDetails.aspx?domain="+lcDomain+"&activeview=1&filtertype=1")
DO WHILE oWeb.ReadyState!=4
  Sleep(1000)   
ENDDO 
* //// it will throw up a login screen so login and click  /////* 
oWeb.Document.forms(0)."Login:userEntryPanel:UsernameTextBox".value=lcUser 
oWeb.Document.forms(0)."Login:userEntryPanel:PasswordTextBox".value=lcPass
oWeb.Document.All("Login:userEntryPanel:LoginImageButton").click()
Sleep(7000)
DO WHILE oWeb.ReadyState!=4
  Sleep(1000)   
ENDDO 
* ////  take the link for domain forwarding
oWeb.Document.All("ctl00_cphMain_lnkDomainForwardingUpdate").click()
Sleep(7000)
DO WHILE oWeb.ReadyState!=4
  Sleep(1000)   
ENDDO 
* ////  Input the new IP - you could append a port here if need be like +":8080/"
oWeb.Document.forms(0)."ctl00$cphMain$DomainAction_DomainForwarding$txtForwardingURL".value="http://"+lcstr 
oWeb.Document.All("ctl00_cphMain_DomainAction_DomainForwarding_btnOK").click()
Sleep(7000)
DO WHILE oWeb.ReadyState!=4
  Sleep(1000)   
ENDDO
* ///  accept changes
oWeb.Document.All("ctl00_cphMain_Action_Result_btnOK").click()
Sleep(7000)
DO WHILE oWeb.ReadyState!=4
  Sleep(1000)   
ENDDO
oWeb.Quit		
oWeb=null 
* //////  End Script
If you do an ExecScript on this it will fill in your VFP variables like User/PW/Domain taken from your database.

>I client of mine is raving. He wishes to have a Web Page and show in it his offers... A web developper proposed me to make the work together but there are two problems. I don't know how to send data to a Web page using "POST"? (or any other system but he wants POST) and he doesn't know Visual FoxPro...
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform