Announcements about new features or events.
Zdeno Bielik
Posts: 147 Joined: Thu Jan 28, 2010 9:24 am
Location: Nitra, Slovakia
Contact:
#11
Post
by Zdeno Bielik » Fri Apr 17, 2015 3:57 am
I don't understand. What is CHS?
ooops, sorry
CHS => CxpHttpServer
Zdeno Bielik
Posts: 147 Joined: Thu Jan 28, 2010 9:24 am
Location: Nitra, Slovakia
Contact:
#12
Post
by Zdeno Bielik » Sat Apr 18, 2015 2:55 am
Roger,
ok, CxpHttpServer now shows my test-form, but it is any problem with its validating, when I press on Submit button.
aVars is still empty.
I don’t know, if it is any my mistake in format of calling code (I did try more httpRequest/getForm() combinations without success)
or if Submit method doesn’t work yet.
Please, can you look at it, because I can’t continue work without this.
TIA & Regards
Zdeno
p.s. one more question: how is it possible show how many users are currently browsing/using CxpHttpServer or eventualy also concrete sub-page?
Attachments
test07.zip
(2.71 KiB) Downloaded 953 times
rdonnay
Site Admin
Posts: 4775 Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:
#13
Post
by rdonnay » Sat Apr 18, 2015 6:47 am
Zdeno -
I will look at your code this morning.
Sorry, but I have been very busy lately.
The eXpress train is coming - and it has more cars.
Zdeno Bielik
Posts: 147 Joined: Thu Jan 28, 2010 9:24 am
Location: Nitra, Slovakia
Contact:
#14
Post
by Zdeno Bielik » Sun Apr 19, 2015 2:16 am
Roger,
ok, I understand, I will wait.
here is some next info, may be it will helps you solve this problem:
when I changed POST method to GET method, it started work,
but now all sended data are included in url address and
are visible for all...
is: cHtml += '<form action="/MyTest02/Form01?submit" method="POST" >' + CRLF
was: cHtml += '<form action="/MyTest02/Form01?submit" method="GET" >' + CRLF
some debug infos after Submiting form when page is loaded again:
wtf ::httpRequest:getQueryString()
* when POST – just text submit
* when GET - ok: e.g.: login=zdeno&password=123456 etc...
wtf ::httpRequest:form
* HttpNameValueContainer -> empty list
wtf ::httpRequest:getForm()
* HttpNameValueContainer -> empty list
wtf ::MyTest02:GetVar( 'login' )
* when GET - ok: e.g.: zdeno
also, in ::classDescribe()[3] are only two items
Zdeno
rdonnay
Site Admin
Posts: 4775 Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:
#15
Post
by rdonnay » Mon Apr 20, 2015 6:49 am
I knew about the POST vs GET problem.
This is only a problem with WebHandler, not with IIS or Apache.
Steffen confirmed this and said it will be fixed.
::httpRequest:getQueryString() would return an empty string on a POST because that data is never part of the query string.
This is the difference between a POST and a GET.
GET always returns the data in the same way that it would be attached to the URL string.
Of course, this would also cause ::httpRequest:form:httpNameValueContainer to be empty because this is where POST information would go.
The HttpRequest() class is not very well documented yet.
Steffen has assured me that they are working on this.
The eXpress train is coming - and it has more cars.
Zdeno Bielik
Posts: 147 Joined: Thu Jan 28, 2010 9:24 am
Location: Nitra, Slovakia
Contact:
#16
Post
by Zdeno Bielik » Mon Apr 20, 2015 9:43 am
Roger,
ok, many thanks for this info.
I hope, fix and documentation too will be available soon...
Zdeno