CXP / HTTP Samples

Announcements about new features or events.
Message
Author
Zdeno Bielik
Posts: 147
Joined: Thu Jan 28, 2010 9:24 am
Location: Nitra, Slovakia
Contact:

Re: CXP / HTTP Samples

#11 Post by Zdeno Bielik »

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:

Re: CXP / HTTP Samples

#12 Post by Zdeno Bielik »

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 803 times

User avatar
rdonnay
Site Admin
Posts: 4728
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: CXP / HTTP Samples

#13 Post by rdonnay »

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:

Re: CXP / HTTP Samples

#14 Post by Zdeno Bielik »

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

User avatar
rdonnay
Site Admin
Posts: 4728
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: CXP / HTTP Samples

#15 Post by rdonnay »

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:

Re: CXP / HTTP Samples

#16 Post by Zdeno Bielik »

Roger,

ok, many thanks for this info.
I hope, fix and documentation too will be available soon...

Zdeno

Post Reply