Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 10 of 12 total
Thread Using the Results of a Submit.
Tue, Jul 10 2012 6:49 PMPermanent Link

Steve Gill

Avatar

I have a test app that is using the form features of TPanel to submit data to a PHP app.  It works fine and I get the results (sent back from the PHP app) displaying on a TPage in my EWB app.  

What I'd like to do is display the individual data elements in a bunch of TEdit components, for example, instead of a TPage component.  I can't work out how to capture the individual data elements returned.

Does anyone know how to do this (not expecting Tim to answer)?

Thanks.

Steve
Wed, Jul 11 2012 12:24 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Steve,

<< Does anyone know how to do this (not expecting Tim to answer)? >>

Well, you got me anyways. Wink

Firstly, I'm adding an OnLoad event shortly that will allow you to know when
the submittal response is back from the web server.  Secondly, I also need
to surface the document that is encapsulated in the TPage component so that
you can "get at" the response in a programmatic fashion.  Currently, there
isn't any way to do so, except for descendant components.

This will be in the next build that I'm uploading later today.

Tim Young
Elevate Software
www.elevatesoft.com



Wed, Jul 11 2012 5:39 PMPermanent Link

Steve Gill

Avatar

<< Firstly, I'm adding an OnLoad event shortly that will allow you to know when
the submittal response is back from the web server.  Secondly, I also need
to surface the document that is encapsulated in the TPage component so that
you can "get at" the response in a programmatic fashion.  Currently, there
isn't any way to do so, except for descendant components.

This will be in the next build that I'm uploading later today.>>

That's excellent!  Thanks Tim.
Thu, Jul 12 2012 7:12 PMPermanent Link

Steve Gill

Avatar

Hi Tim,

<< This will be in the next build that I'm uploading later today.>>

Was there a build last night?  I noticed a new build under my account but it doesn't seem to have the features you mentioned.
Fri, Jul 13 2012 12:00 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Steve,

<< Was there a build last night?  I noticed a new build under my account but
it doesn't seem to have the features you mentioned. >>

Sorry, I forgot to add them.  A new build is up there now that has this
stuff:

http://www.elevatesoft.com/manual?action=viewcomp&id=ewb1&comp=TPage

Just use the OnLoad to know when the page is loaded (blank URLs do *not*
trigger the event), and use the DocumentText to retrieve the document as a
string.

If you need anything else, just let me know.

Tim Young
Elevate Software
www.elevatesoft.com
Fri, Jul 13 2012 7:06 PMPermanent Link

Steve Gill

Avatar

<< Sorry, I forgot to add them.  A new build is up there now that has this
stuff:

http://www.elevatesoft.com/manual?action=viewcomp&id=ewb1&comp=TPage

Just use the OnLoad to know when the page is loaded (blank URLs do *not*
trigger the event), and use the DocumentText to retrieve the document as a
string.

If you need anything else, just let me know.  >>

Cool, thanks Tim.
Mon, Jul 16 2012 5:59 PMPermanent Link

Steve Gill

Avatar

<< If you need anything else, just let me know. >>

You shouldn't have offered. Smile 

I'm hesitant to ask these questions as I don't want to pull you away from finishing off the final release, so please only answer them if you have the time.  Otherwise, I'm happy to wait until the release has been, um, released. Smile

I'm not quite getting how to retrieve the data.  If I use the OnLoad event I can retrieve the html data returned by the DocumentText property.  Should I parse this text to extract the data?

Also, I'm not sure how to use the URL property of the TPage object.  Should this be pointing to another form in  the app?

Thanks.

Steve
Wed, Jul 18 2012 11:42 AMPermanent Link

Mark Brooks

Slikware

Avatar

Steve,

This is also a subject "close to my heart" but I am out of the country until tomorrow and so not able to try Tim's new modifications. However I can probably give you a steer on how to achieve your requirements:

<<I'm not quite getting how to retrieve the data.  If I use the OnLoad event I can retrieve the html data returned by the DocumentText property.  Should I parse this text to extract the data?>>

In a word, yes!

<<Also, I'm not sure how to use the URL property of the TPage object.  Should this be pointing to another form in  the app?>>

The TPage control is used to render the contents of a specific URL. By setting the URL property you instruct the TPage control to "load" the page at that address. I think it essentially displays the contents in an iFrame. In this way you can view other URLs embedded within your EWB app. When used in conjunction with the submit mechanism, however, there is no need to set the URL since the TPage is hooked up to receive the submit response. So, you just perform the submit, waits for the OnLoad then check the DocumentText (parsing as required). URL is not relevant in this scenario (I think ........).

Mark
Wed, Jul 18 2012 12:03 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Steve,

<< I'm hesitant to ask these questions as I don't want to pull you away from
finishing off the final release, so please only answer them if you have the
time.  Otherwise, I'm happy to wait until the release has been, um,
released. Smile>>

Quick questions aren't a problem.

<< I'm not quite getting how to retrieve the data.  If I use the OnLoad
event I can retrieve the html data returned by the DocumentText property.
Should I parse this text to extract the data? >>

Normally you would make this easier on yourself by only returning content
from the web server application with a Content-Type of text/plain.  That way
you can parse the response much easier because you'll only get back output
that looks like this:

<HEAD></HEAD><BODY><PRE>Text here</PRE></BODY>

<< Also, I'm not sure how to use the URL property of the TPage object.
Should this be pointing to another form in  the app? >>

No, you don't set it to anything for form submittal output.

There is an issue with the OnLoad, however.  I just noticed that it doesn't
fire for form submittals because it is filtering out blank URLs, and form
submittals don't set the URL.  There's also an issue with IE where it
duplicates form variables when sent that I need to figure out/fix (FF and
others don't do it).

If you have any other questions, please let me know.

Tim Young
Elevate Software
www.elevatesoft.com
Wed, Jul 18 2012 12:29 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Steve,

The problem with the duplicated form variables on submit was with some
recent changes to the internal web server for UTF-8 handling.  It's fixed
now and I uploaded a new EWB build that includes this fix and the fix for
the blank URL OnLoad firing for the TPage component, so you can continue
with your development.

If you have any other questions, please let me know.

Tim Young
Elevate Software
www.elevatesoft.com
Page 1 of 2Next Page
Jump to Page:  1 2
Image