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

L

lli

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
 
X

Xavier Morel

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.
 
P

Peter Hansen

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
 
P

Peter Hansen

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_(programming) )

-Peter
 
T

Tim Roberts

Peter Hansen said:
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()
 
P

Peter Hansen

Tim said:
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
 
T

Tim Roberts

Peter Hansen said:
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top