Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > how to put form and display its result(data from database) on the same window?

Reply
Thread Tools

how to put form and display its result(data from database) on the same window?

 
 
lli@sos.state.tx.us
Guest
Posts: n/a
 
      12-07-2005
Hi Guys,

I have designed a web application. In its one window I put a form. User
can click submit button of this form to run a pathon script to get data
from database. Then User get a new window which display the result. Now
I want to put the form and display data on the same window. How I can
do this?

If I use frameset, I need to put form in a html file and put data in a
table in scond html file. How I can do this?


Any help is appreciated.



LLI

 
Reply With Quote
 
 
 
 
Xavier Morel
Guest
Posts: n/a
 
      12-07-2005
wrote:
> Hi Guys,
>
> I have designed a web application. In its one window I put a form. User
> can click submit button of this form to run a pathon script to get data
> from database. Then User get a new window which display the result. Now
> I want to put the form and display data on the same window. How I can
> do this?
>
> If I use frameset, I need to put form in a html file and put data in a
> table in scond html file. How I can do this?
>
>
> Any help is appreciated.
>
>
>
> LLI
>


Submit to the file holding the form, and display the data only when
informations came from the form, no need to use framesets here.
 
Reply With Quote
 
 
 
 
Peter Hansen
Guest
Posts: n/a
 
      12-07-2005
wrote:
> I have designed a web application. In its one window I put a form. User
> can click submit button of this form to run a pathon script to get data
> from database. Then User get a new window which display the result. Now
> I want to put the form and display data on the same window. How I can
> do this?


The most modern approach to this, and one which appears to be evolving
into a defacto standard, is AJAX (see http://en.wikipedia.org/wiki/AJAX
and others).

It's a non-trivial solution to your problem, however, at least in terms
of the learning curve involved.

-Peter

 
Reply With Quote
 
lli@sos.state.tx.us
Guest
Posts: n/a
 
      12-08-2005
Hi Peter,

Could you give me detailed information about your idea.

Thanks,


Laya

 
Reply With Quote
 
Peter Hansen
Guest
Posts: n/a
 
      12-08-2005
wrote:
> Could you give me detailed information about your idea.


I believe I just did.

Really, as I said, this is "non-trivial". I can't give you a three
minute tutorial that will help you at all, especially if you haven't
read the information I pointed you to. (The page I pointed you to
actually links to the following one, in case you didn't notice:
http://en.wikipedia.org/wiki/Ajax_%28programming%29 )

-Peter

 
Reply With Quote
 
lli@sos.state.tx.us
Guest
Posts: n/a
 
      12-09-2005
Thank you Peter. I will read it.

LLI

 
Reply With Quote
 
Tim Roberts
Guest
Posts: n/a
 
      12-10-2005
Peter Hansen <> wrote:

> wrote:
>> I have designed a web application. In its one window I put a form. User
>> can click submit button of this form to run a pathon script to get data
>> from database. Then User get a new window which display the result. Now
>> I want to put the form and display data on the same window. How I can
>> do this?

>
>The most modern approach to this, and one which appears to be evolving
>into a defacto standard, is AJAX (see http://en.wikipedia.org/wiki/AJAX
>and others).
>
>It's a non-trivial solution to your problem, however, at least in terms
>of the learning curve involved.


It's also a serious case of overkill for the rather simple problem he
presented. All he needs is one function to create the form, and one
function to create the results, and do:

def PresentTable():
PrintTheForm()
if i_have_received_data:
PrintTheResultTable()
--
- Tim Roberts,
Providenza & Boekelheide, Inc.
 
Reply With Quote
 
Peter Hansen
Guest
Posts: n/a
 
      12-10-2005
Tim Roberts wrote:
> Peter Hansen <> wrote:
>> wrote:
>>>... Now
>>>I want to put the form and display data on the same window.

>>
>>The most modern approach to this...is AJAX (see http://en.wikipedia.org/wiki/AJAX
>>and others).
>>It's a non-trivial solution to your problem, however, at least in terms
>>of the learning curve involved.

>
> It's also a serious case of overkill for the rather simple problem he
> presented. All he needs is one function to create the form, and one
> function to create the results, and do:
>
> def PresentTable():
> PrintTheForm()
> if i_have_received_data:
> PrintTheResultTable()


Well, it's a matter of interpretation, isn't it? Given his vague
requirements above, it's quite valid to assume that he wants to avoid
the effects of the browser loading a new page, even if that page looks
like the previous one a lot. You may be quite right in your *guess*
that he doesn't need that, but there isn't enough information present in
his request for either of us to know.

(But you're quite correct *if he doesn't care about refreshing the
window when the form is submitted* that Ajax is overkill. I should
probably have asked for more detail in the question before suggesting Ajax.)

-Peter

 
Reply With Quote
 
Tim Roberts
Guest
Posts: n/a
 
      12-12-2005
Peter Hansen <> wrote:
>
>Well, it's a matter of interpretation, isn't it? Given his vague
>requirements above, it's quite valid to assume that he wants to avoid
>the effects of the browser loading a new page, even if that page looks
>like the previous one a lot. You may be quite right in your *guess*
>that he doesn't need that, but there isn't enough information present in
>his request for either of us to know.


You are correct. Once you pointed it out, I now see what you were
suggesting.
--
- Tim Roberts,
Providenza & Boekelheide, Inc.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
Its a bird, its a plane, its.. um, an Attribute based System? thunk Ruby 14 04-03-2010 10:08 AM
Its a bird, its a plane, its.. um, an Attribute based System? thunk Ruby 0 04-01-2010 10:25 PM
Its a bird, its a plane, no ummm, its a Ruide thunk Ruby 1 03-30-2010 11:10 AM
how to display form processing on same screen as form? murrayatuptowngallery Javascript 3 07-21-2007 06:53 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57