Solved

Delphi/Intraweb - How to read Request info?

Posted on 2011-03-17
9
2,037 Views
Last Modified: 2012-05-11
I need to read the name/value pairs of hidden fields in forms.

I can create a simple html form, with method="get" action="www.my intraweb dll...", and read the data using WebApplication.RunParams, like this:

if WebApplication.RunParams.count > 0 then
    for i := 0 to WebApplication.RunParams.count-1 do
      mMemo1.Lines.Add('RunParam' + IntToStr(i) + '  '
                       + WebApplication.RunParams.Names(i)
                       + ' = ' + WebApplication.RunParams.ValueFromIndex(i));

When the simple html form uses method="post", I thought I could use Request.Form in the same way.  But there is no Request.Form.  There is Request.ContentFields and Request.QueryFields, but they do not contain the hidden fields in my form.  Where should I be looking for those name/value pairs?

I am using Delphi 2010, and the version of IntraWeb that comes with it.
0
Comment
Question by:WhiteBusLady
  • 5
9 Comments
 

Author Comment

by:WhiteBusLady
ID: 35169171
Guess it wasn't such a "dumb" question after all. I'd be happy to raise the points to 500 if I could find a way to do that via the EE mobile interface. I may not have a cabled connection until Sunday.
0
 

Author Comment

by:WhiteBusLady
ID: 35169193
Guess it wasn't such a "dumb" question after all. I'd be happy to raise the points to 500 if I could find a way to do that via the EE mobile interface. I may not have a cabled connection until Sunday.
0
 
LVL 24

Expert Comment

by:jimyX
ID: 35171385
Hi WhiteBusLady,
The first step of getting quick assistance is to ask the question in the right zone. You are putting your question in an irrelevant zones (or not directly related to your question).
I have requested the moderator's intervention to move this question to the right zone(s).
0
3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

 
LVL 21

Expert Comment

by:developmentguru
ID: 35181139
What web server are you using?  I found a comment in the update history (from AToZed) that states:

10.0.3

Fixed: "Cannot find submit component" with buttons and other submit action controls on frames.
Encoding of HTML literals has been changed to be less aggressive so it will no longer encode ,.-_ This helps with posting hidden fields to other servers which do not properly decode parameters.

This indicates to me that there are web servers that will not process hidden fields correctly in relation to older versions of IntraWeb.  So, the two variables would be your version of IntraWeb and your server.  The version of IntraWeb can be updated through AToZed without updating your version of Delphi (unless they require features in a newer version of Delphi for the latest tool set).  Of course, if a different web server would fix it, changing the web server might be an easy solution too.  Here is the link I found the quote on:
http://www.atozed.com/intraweb/history/10.0/index.en.aspx

I have to state that I am not an expert on IntraWeb.  If you need more assistance with IntraWeb you might want to try my approach and contact them directly.
0
 

Author Comment

by:WhiteBusLady
ID: 35182106
Server is IIS
0
 

Accepted Solution

by:
WhiteBusLady earned 0 total points
ID: 35213138
I finally found the problem.  In case it helps someone else:

Request.ContentFields does contain the incoming POSTed data.  The problem was the timing.  I was logging into the program first, then reading the data.  By which time it was already overwritten.  I needed to read Request.ContentFields and store the data elsewhere before authenticating the user.
0
 

Author Closing Comment

by:WhiteBusLady
ID: 35239213
I accepted my own answer because I finally figured it out.  No one else did.

I chose not to delete the question because I think the answer belongs in the KB.  Sure wish it had been there when I first looked.
0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Foreword (July, 2015) Since I first wrote this article, years ago, a great many more people have begun using the internet.  They are coming online from every part of the globe, learning, reading, shopping and spending money at an ever-increasing ra…
Envision that you are chipping away at another e-business site with a team of pundit developers and designers. Everything seems, by all accounts, to be going easily.
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

27 Experts available now in Live!

Get 1:1 Help Now