Questions for Jade HTML Thin Client Using HTML Documents

For questions and postings not covered by the other forums
ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Questions for Jade HTML Thin Client Using HTML Documents

Postby ConvertFromOldNGs » Fri Aug 07, 2009 12:47 pm

by tyc >> Sun, 20 Mar 2005 3:33:47 GMT

Hi,
We have the following questions when we trying to test Jade HTML Thin Client with HTML Document. We are using Jade6021 Ansi version.
1.In a HTML page, there are a submit button and hyperlink, we found that the processRequest method is executed for both submit and hyperlink (go to another page). How to distinguish the two kinds of processRequest?
2.We use the getHttpValue method to get the input on web page, but we found that if the input text includes Blank or +, @, #, $, %, ^, &, these characters will be returned as ASCII value., E.g. + will be %2B, We hope that we can get the string directly from the input text on web page, that is, To get what you input. How to do it?

Many Thanks,
Scott

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: Questions for Jade HTML Thin Client Using HTML Documents

Postby ConvertFromOldNGs » Fri Aug 07, 2009 12:47 pm

by Stephen >> Mon, 21 Mar 2005 1:48:34 GMT

1. You can check if either a page is being requested, or if details are being submitted, by comparing the query string with the http string. If a page is being requested these are both the same. If details are being submitted from a form, then they are different.
The query string always contains the page that was requested, and the http string will now contain all the form elements submitted and their values. Do a write statement on the http string and the query string at the start of the processRequest method to see the difference.

Eg. I have checks looking for certain strings within the http string to find out what the user is requesting.
If its the logon page they have requested then I do would something like this:
if httpString = queryString then
//send the page for the logon on
else
//this is the results coming back
endif;

Eg. If the following is the queryString and httpString respectively: WebTender&logon
UserName=testing&Password=123456

Because they are different, I know they are submitted the details back. I know from whats in the queryString that they are trying to logon, so I check the values in the httpString to see if the correct details have been entered.

2. On the WebSession class I have 2 methods mGetQueryParameter and mGetHttpParameter. These both take a string to look for and return the value of that parameter in either the http string or the query string.

Using the above example, if I called mGetHttpParameter("password") this would return "123456".
But I do the following within the mGetHttpParameter method before returning the value:
1. Replace "+" with " "
2. Look for any "%" characters in the text, and convert that and the next 2 characters from hex to ascii to get the final value to return.

Eg, if the httpString is : WebTender&blurb=heres%2Bthis%20one mGetHttpParameter("blurb") would return "heres+this one"

Hope that helps.
Stephen

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: Questions for Jade HTML Thin Client Using HTML Documents

Postby ConvertFromOldNGs » Fri Aug 07, 2009 12:47 pm

by tyc >> Mon, 21 Mar 2005 8:59:03 GMT

Hi Stephen,
Thanks for your help first,
I can find the attribute httpString, where is the queryString?

Please advise,
Thanks

Scott

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: Questions for Jade HTML Thin Client Using HTML Documents

Postby ConvertFromOldNGs » Fri Aug 07, 2009 12:47 pm

by Stephen >> Mon, 21 Mar 2005 20:50:00 GMT

They are both parameters for the method processRequest: processRequest(httpString: String; queryString: String) updating;


Return to “General Discussion”

Who is online

Users browsing this forum: No registered users and 16 guests