 |
|
| Computers Forum Index » Computer - Databases - Paradox » Opal http POST showing the resulting web page... |
|
Page 1 of 1 |
|
| Author |
Message |
| Jim Moseley... |
Posted: Wed Apr 22, 2009 10:07 pm |
|
|
|
Guest
|
OK, I seem to have run into a brick wall. I need my Opal code to open up
a webpage via a POST, and then display the resulting page.
I can issue a POST in the background and capture the results, using MSXML's
xmlHTTP functions.
I can display a webpage several different ways, using Tony's MSBrowser &
via startBrowser, and via shellExecute.
I can even capture a webpage in the background via GET using Lorrin Moore's
grabIt library.
But, I can't figure out how to do both at the same time. Tony's MSBrowser
looked promising, but I need a SAFEARRAY data structure for the Navigate2
method to trigger the POSTdata, and that is out of my league.
My current webpage is pretty simple: a list of address fields to trigger
Google Maps. I can't use GET because the clients aren't limited to the number
of addresses they can enter to get a route returned, and I'd run into the
URL length limit.
BTW, there are thousands of clients that will use this code, via Runtime
9.
Any other ideas?
Thanks,
Jim Moseley |
|
|
| Back to top |
|
|
|
| Liz McGuire... |
Posted: Wed Apr 22, 2009 10:47 pm |
|
|
|
Guest
|
I don't suppose you can use GET to pull up the page the form is on, then sendKeys()
to fill out the form and submit it? Ugly and brute force, but if it's all
that will work...
Liz
"Jim Moseley" <jmose at (no spam) mapson.triptracker.com> wrote:
Quote:
OK, I seem to have run into a brick wall. I need my Opal code to open up
a webpage via a POST, and then display the resulting page.
|
|
|
| Back to top |
|
|
|
| Liz McGuire... |
Posted: Wed Apr 22, 2009 10:49 pm |
|
|
|
Guest
|
"Jim Moseley" <jmose at (no spam) mapson.triptracker.com> wrote:
Quote:
My current webpage is pretty simple: a list of address fields to trigger
Google Maps. I can't use GET because the clients aren't limited to the
number
of addresses they can enter to get a route returned, and I'd run into the
URL length limit.
I don't get it, if the clients are going to enter these addesses, why can't
the clients submit the form, thereby triggering the post?
Liz |
|
|
| Back to top |
|
|
|
| Jim Moseley... |
Posted: Thu Apr 23, 2009 12:13 am |
|
|
|
Guest
|
Liz,
Quote: I don't get it, if the clients are going to enter these addesses, why can't
the clients submit the form, thereby triggering the post?
The addresses come from the database. They enter a trip into my Pdox app,
then want to push 1 button to get a route for all the stops. They're not
dealing with the web page directly until the route is shown.
Thanks,
Jim Moseley |
|
|
| Back to top |
|
|
|
| Tony McGuire... |
Posted: Thu Apr 23, 2009 6:46 am |
|
|
|
Guest
|
Jim Moseley wrote:
Quote: Liz,
I don't get it, if the clients are going to enter these addesses, why can't
the clients submit the form, thereby triggering the post?
The addresses come from the database. They enter a trip into my Pdox app,
then want to push 1 button to get a route for all the stops. They're not
dealing with the web page directly until the route is shown.
Thanks,
Jim Moseley
Doesn't the new[ish] Google map api offer the type of functionality you are
looking for?
Late into the question, and don't understand what is going on AT ALL.
--
---------------
Tony McGuire
http://www.homebookexchange.com |
|
|
| Back to top |
|
|
|
| Tony McGuire... |
Posted: Thu Apr 23, 2009 7:05 am |
|
|
|
Guest
|
Tony McGuire wrote:
By the way, I do [did] the Google Maps stuff with Paradox 9. Maybe you are
getting in deeper than I did, but I don't remember any SAFEARRAY having to be
created/designed. Certainly it didn't block me, although the maps did take
several hours to get running. Very cool 4th party tool (4th?)
---------------
Tony McGuire
http://www.homebookexchange.com |
|
|
| Back to top |
|
|
|
| Liz McGuire... |
Posted: Thu Apr 23, 2009 7:10 am |
|
|
|
Guest
|
But you did it on a web site - where the web OCX was processing the
request. He's trying to do it in the MS Browser OCX. At least, I think
that's the case...
Liz
Tony McGuire wrote:
Quote: Tony McGuire wrote:
By the way, I do [did] the Google Maps stuff with Paradox 9. Maybe you
are getting in deeper than I did, but I don't remember any SAFEARRAY
having to be created/designed. Certainly it didn't block me, although
the maps did take several hours to get running. Very cool 4th party
tool (4th?)
---------------
Tony McGuire
http://www.homebookexchange.com |
|
|
| Back to top |
|
|
|
| Jim Moseley... |
Posted: Thu Apr 23, 2009 8:08 am |
|
|
|
Guest
|
Liz,
Quote: But you did it on a web site - where the web OCX was processing the
request. He's trying to do it in the MS Browser OCX. At least, I think
that's the case...
Spot on, Liz. I've got my webpages working with Google Maps, if I use IE
& go to the URL and type in my info.
I'm trying to automate this so that I can call it from a Pdox form. The
trick is that I need to POST the webpage to get it to use all my data. I'm
not using the CWS OCX in this part of my app - it is actually my main data
entry form.
And, I'm not tied to the MS Browser OCX if someone has a different idea.
Since I can grab a non-displayed webpage via POST using MSXML's xmlHttp,
one possibility is to save the returned html & display it locally. But,
I'm trying to avoid that (if I can figure out how to do it, to begin with).
Thanks,
Jim Moseley |
|
|
| Back to top |
|
|
|
| modri dirkac... |
Posted: Thu Apr 23, 2009 4:27 pm |
|
|
|
Guest
|
What about curl.exe?
Nowdays I use it only to GET some web pages (exchange rates) and
download ZIP files from web.
But in the past I wrote a paradox program for automatic
answering questions in a music quiz.
* GET web page with question, parse it
* if question is not yet in my database, then store it and select first from
3 answers.
* POST back answer
* GET result and new answer
if result is OK, then remember answer to this question fo future.
if result is not OK, remeber this wrong result and not select it in future
* POST back next answer
* GET result
* POST back email and name.
From 100.000 answers more than 20.000 werw mine, but I was disqualified.
:-(
curl.exe can write and read session state from TXT file.
So on first GET you save session ID in header.txt, when doing
POST you tell curl.exe to use session from header.txt
Jure
"Jim Moseley" <jmose at (no spam) mapson.triptracker.com> je napisal v sporočilo
news:49ef5cf2 at (no spam) pnews.thedbcommunity.com ...
Quote:
OK, I seem to have run into a brick wall. I need my Opal code to open up
a webpage via a POST, and then display the resulting page.
I can issue a POST in the background and capture the results, using
MSXML's
xmlHTTP functions.
I can display a webpage several different ways, using Tony's MSBrowser &
via startBrowser, and via shellExecute.
I can even capture a webpage in the background via GET using Lorrin
Moore's
grabIt library.
But, I can't figure out how to do both at the same time. Tony's MSBrowser
looked promising, but I need a SAFEARRAY data structure for the Navigate2
method to trigger the POSTdata, and that is out of my league.
My current webpage is pretty simple: a list of address fields to trigger
Google Maps. I can't use GET because the clients aren't limited to the
number
of addresses they can enter to get a route returned, and I'd run into the
URL length limit.
BTW, there are thousands of clients that will use this code, via Runtime
9.
Any other ideas?
Thanks,
Jim Moseley |
|
|
| Back to top |
|
|
|
| Tony McGuire... |
Posted: Thu Apr 23, 2009 5:45 pm |
|
|
|
Guest
|
Liz McGuire wrote:
Quote: But you did it on a web site - where the web OCX was processing the
request. He's trying to do it in the MS Browser OCX. At least, I think
that's the case...
Liz
I do both; websrv and simple web browser for generic client usage.
--
---------------
Tony McGuire
http://www.homebookexchange.com |
|
|
| Back to top |
|
|
|
| Jim Moseley... |
Posted: Sat Apr 25, 2009 10:13 am |
|
|
|
Guest
|
Tony McGuire <png.paradoxcommunity at (no spam) com> wrote:
Quote: I do both; websrv and simple web browser for generic client usage.
Do you invoke a POST and display the resultant webpage? I'm pretty stuck
here.
I tried earlier today to use MSXML to do a POST of my regular html page,
and got a nasty error ('405 Method not allowed') on the POST. I can GET
the page fine with the same code (shown below), but can't POST. I can use
IE directly and GET & POST at will, but the MSXML logic won't POST.
I'm pretty sure if I get this resolved, I'll run into issues of running 'local'
javascript (with warnings/errors), so I doubt this is my solution.
What I really need is a way to POST directly to either an Internet Explorer
page, or your MS Browser COM object form.
Thanks,
Jim Moseley
;------------------
method run(var eventInfo Event)
var
oaXMLHTTP oleAuto
endvar
if not oaXMLHTTP.open("Msxml2.XMLHTTP.3.0") then
errorShow("oaXMLHTTP.open - msxml2")
endif
soapURL = "http://mysite.com/maps/showMap.html"
envHead = "address1=jax"
try oaXMLHTTP^open("POST",soapURL, false);
onfail errorShow("on http^open - post") endtry
headersType = "application/x-www-form-urlencoded; charset=UTF-8"
try oaXMLHTTP^setRequestHeader("Content-Type", headersType)
onfail errorShow("set content-type") endtry
try oaXMLHTTP^send(envHead) ; sync so it'll wait
onfail errorShow("on http^send") endtry
resultXMLstr = oaXMLHTTP^responseText
msgInfo("result",resultXMLstr)
resultXMLstr.view()
endMethod
;---------------- |
|
|
| Back to top |
|
|
|
| Tony McGuire... |
Posted: Sat Apr 25, 2009 11:40 pm |
|
|
|
Guest
|
Jim Moseley wrote:
Quote: Tony McGuire <png.paradoaxcommunity at (no spam) com> wrote:
I do both; websrv and simple web browser for generic client usage.
Do you invoke a POST and display the resultant webpage? I'm pretty stuck
here.
I tried earlier today to use MSXML to do a POST of my regular html page,
and got a nasty error ('405 Method not allowed') on the POST. I can GET
the page fine with the same code (shown below), but can't POST. I can use
IE directly and GET & POST at will, but the MSXML logic won't POST.
I've only been 'kinda' watching this thread; I do not understand in the
slightest what you are trying to do at this point, nor why.
--
---------------
Tony McGuire
http://www.homebookexchange.com |
|
|
| Back to top |
|
|
|
|
|
All times are GMT
The time now is Wed Dec 09, 2009 1:25 pm
|
|