Home > Archive > Programming with dBASE > February 2006 > Entering Data into Web Sites progmatically









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Entering Data into Web Sites progmatically
Pat Curran

2006-02-18, 3:23 am

Hi;

I want to enter part numbers from my database into a web page. I can open
the web page programatically fine. When the page opens, there is only one
entryfield. A part number gets entered followed by a "Return" or an OK click
and the web page returns the info. Here is where my question lies...Instead
of my app opening the page and then the user typing in the partnumber, I
would like my app to open the page and place my dbf->partnumber into the
entryfield followed by the return/ok click. How can I accomplish this? I am
using version 5.7. I tried enteing this partnumber into the HTML Address
line but that doesnt work...Infact, the address line doesnt seem to change
at all when the partnumber is entered. It just update the screen with the
data.

Thanks

Pat


Thanks
Pat


Marc VdB

2006-02-18, 7:23 am

underprocessable
Bowen Moursund [DataTech]

2006-02-18, 8:23 pm

> I want to enter part numbers from my database into a web page. I can open
> the web page programatically fine. When the page opens, there is only one
> entryfield. A part number gets entered followed by a "Return" or an OK
> click and the web page returns the info. Here is where my question
> lies...Instead of my app opening the page and then the user typing in the
> partnumber, I would like my app to open the page and place my
> dbf->partnumber into the entryfield followed by the return/ok click. How
> can I accomplish this?


If all you really want to do is to submit the data to the server, then just
submit it to the server. There is no need to open a web form in a browser.
You can simply construct the request to the server and transmit it.

For example, Google the word dBASE and examine the resulting address
(request), which can be simplified to:

http://www.google.com/search?q=dBASE

You can make this request using a FUNCky TCP object (FUNCky is installed
along with dBASE):

#define CRLF chr(13)+chr(10)
cHost = "www.google.com"
nPort = 80
cRequest = "/search?q=dBASE"
cHTTPHeaders = "GET "+cRequest+" HTTP/1.0"+CRLF+;
"Host: "+cHost+CRLF+;
"Accept: */*"+CRLF+;
"Content-Length: 0"+CRLF+;
"User-Agent: PatCurranHTTPSubmiss
ionTool/1.0"+CRLF+CRLF
cResponse = ""
oTCP = new OleAutoClient("FUNCkyTCP")
if oTCP.connect( cHost, nPort )
if oTCP.send(cHTTPHeaders) >= 0
cResponse := oTCP.receive()
if empty(cResponse)
cResponse = "TCP.receive timeout"
endif
else
cResponse := "TCP.send failure"
endif
else
cResponse := "TCP.connect failure"
endif
oTCP.disconnect()
msgbox(cResponse)


--
Bowen Moursund
DataTech
Consulting & Development
http://www.bmmnet.us

Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com