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.
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
Could you give me detailed information about your idea.
Thanks,
Laya
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
LLI
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, ti...@probo.com
Providenza & Boekelheide, Inc.
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
You are correct. Once you pointed it out, I now see what you were
suggesting.