Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: Post external forms data to intraweb - Total confused


This question is not answered. Helpful answers available: 2. Correct answers available: 1.


Permlink Replies: 4 - Last Post: Jan 15, 2015 5:31 AM Last Post By: ib elfving
ib elfving

Posts: 33
Registered: 8/28/01
Post external forms data to intraweb - Total confused  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Dec 21, 2014 9:13 PM
Hi,
I'm a newbie, running intraweb ver. 14.0.34 (stand alone) on XE5 Delphi and love this combination, but do have a question.

In my application I need to open an external html page, that contains a form, and to get data from this form postet back to my intraweb program. I have total control over the contents of the html page, but do not know the names of the form fields when writing the application.

The application should function as follow:

1. The user enters various data on a page in the intraweb application, e.g. name, address
2. At some stage he select an external html-page (still in intraweb) that contains a form. Intraweb display the form, and the user fills in the fields in the form and press "post"
3. The control returns to intraweb, that reads the form fields and construct a print based on the data entered (point 1) and the contents of the "external" form

I've been browsing this forum and google, but is just getting more and more confused and frustrated, as the suggestions for solving this problem is pointing in many different directions.

Can anyone light my candle. Please be very specific as i am a newbie within intraweb

regards Ib
Alexandre Machado

Posts: 1,754
Registered: 8/10/13
Re: Post external forms data to intraweb - Total confused  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Dec 23, 2014 3:41 PM   in response to: ib elfving in response to: ib elfving
ib elfving wrote:
Hi,
I'm a newbie, running intraweb ver. 14.0.34 (stand alone) on XE5 Delphi and love this combination, but do have a question.

In my application I need to open an external html page, that contains a form, and to get data from this form postet back to my intraweb program. I have total control over the contents of the html page, but do not know the names of the form fields when writing the application.

Hum... how do you have total control over the contents, but does not know the names of form fields? I mean.... How do you expect to get the field content if you don't know which fields?
ib elfving

Posts: 33
Registered: 8/28/01
Re: Post external forms data to intraweb - Total confused  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Dec 23, 2014 7:29 PM   in response to: Alexandre Machado in response to: Alexandre Machado
Alexandre Machado wrote:
ib elfving wrote:
Hi,
I'm a newbie, running intraweb ver. 14.0.34 (stand alone) on XE5 Delphi and love this combination, but do have a question.

In my application I need to open an external html page, that contains a form, and to get data from this form postet back to my intraweb program. I have total control over the contents of the html page, but do not know the names of the form fields when writing the application.

Hum... how do you have total control over the contents, but does not know the names of form fields? I mean.... How do you expect to get the field content if you don't know which fields?

Q1: Total control of HTML, without knowing the field names

I am programming a system for producing labels for parcels. When shipping between various countries these parcels some times needs different kinds of additional documentation, for instance a proforma invoice, a safety note for batteries etc. (within EU, from EU to non EU etc). I cannot predict all these documents currently, and they might be changed by the local custom administration in the various countries at will.

I have solved this by "constructing" a script that the users use for creating a PDF file. Part of this script is a list of the variables that should be merged with the fields from the external HTML forms.

Imaging the following:
Currently the user needs to print a proforma invoice containing description of the shipped good. After some times rules are changed, and the user needs to add an extra field for some informations - for instance origin country for the goods or something else

In my system, the user changes the script to include this new field on the print out, changes the HTML page in order to be able to enter the origin country, and these data is processed by my system, but I did not know that he would need the field with "origin country" when I programmed the system.

Q2: how to get field names and values in the program

Normally, for instance in a CGI program, field names and values are passed to the program in a "request" that contains two stringlists - ContentFields (HTML-POST) and QueryFields (HTML-GET), and it is just a question of reading these lists to get the names and values of fields send from the HTML page

regards Ib
Alexandre Machado

Posts: 1,754
Registered: 8/10/13
Re: Post external forms data to intraweb - Total confused  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jan 8, 2015 3:28 AM   in response to: ib elfving in response to: ib elfving
Q2: how to get field names and values in the program

Normally, for instance in a CGI program, field names and values are passed to the program in a "request" that contains two stringlists - ContentFields (HTML-POST) and QueryFields (HTML-GET), and it is just a question of reading these lists to get the names and values of fields send from the HTML page

Yes, I was expecting somthing like that.

I have to create a new demo to show how to implement that in IW 14. Please note that you must use the latest IW 14.0.36 in order to get this working....

I'll keep you informed, ok?

Best regards
ib elfving

Posts: 33
Registered: 8/28/01
Re: Post external forms data to intraweb - Total confused  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jan 15, 2015 5:31 AM   in response to: Alexandre Machado in response to: Alexandre Machado
Hi Alexandre,
Thank you for your reply. I will look forward to your sample. Meanwhile I am trying to make a solution with the unique session id, as this seems to retain the "old" data if the id is in the return URL e.g. htp://127.0.0.1/12345/$/?batch=on where 12345 is the unique session id.

Just have to figure out if there is an easy way to change the html page, eg. use the delphi tags (<#tagname>) before/when calling the external HTML page, to avoid using javascript on the page (my users are no different from other users, they will be confused by the javascript)
regards ib
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02