Solved

Delphi/Intraweb - How to read Request info?

Posted on 2011-03-17
9
2,011 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
Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

 
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Accessibility and Usability are two concepts that seem to be closely related.  But, too many people seem to have a distorted perception of them. During last five years, those two words have come to the day-to-day work of almost every web develope…
"In order to have an organized way for empathy mapping, we rely on a psychological model and trying to model it in a simple way, so we will split the board to three section for each persona and a scenario and try to see what those personas would Do,…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

708 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

12 Experts available now in Live!

Get 1:1 Help Now