Solved

Delphi/Intraweb - How to read Request info?

Posted on 2011-03-17
9
2,159 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
Resolve Critical IT Incidents Fast

If your data, services or processes become compromised, your organization can suffer damage in just minutes and how fast you communicate during a major IT incident is everything. Learn how to immediately identify incidents & best practices to resolve them quickly and effectively.

 
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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

An enjoyable and seamless user experience can go a long way on an eCommerce site. While a cohesive layout and engaging copy play roles in creating a positive user experience, some sites neglect aspects that seem marginal but in actuality prove very …
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
This tutorial walks through the best practices in adding a local business to Google Maps including how to properly search for duplicates, marker placement, and inputing business details. Login to your Google Account, then search for "Google Mapmaker…
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.

730 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