473,397 Members | 1,972 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

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

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

Dec 7 '05 #1
8 1885
ll*@sos.state.tx.us 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.
Dec 7 '05 #2
ll*@sos.state.tx.us 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

Dec 8 '05 #3
lli
Hi Peter,

Could you give me detailed information about your idea.

Thanks,
Laya

Dec 8 '05 #4
ll*@sos.state.tx.us 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

Dec 8 '05 #5
lli
Thank you Peter. I will read it.

LLI

Dec 9 '05 #6
Peter Hansen <pe***@engcorp.com> wrote:
ll*@sos.state.tx.us 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, ti**@probo.com
Providenza & Boekelheide, Inc.
Dec 10 '05 #7
Tim Roberts wrote:
Peter Hansen <pe***@engcorp.com> wrote:
ll*@sos.state.tx.us 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

Dec 10 '05 #8
Peter Hansen <pe***@engcorp.com> 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, ti**@probo.com
Providenza & Boekelheide, Inc.
Dec 12 '05 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Nomen Nescio | last post by:
can anyone be so kind as to look at http://www.mysolution.ws/HYPOCRITE.php and let me know why it isn't passing the form data to http://www.mysolution.ws/insertHYPOCRITES.php for the most...
2
by: Matt | last post by:
I want to post the form data (http://server/page1.asp) to a modal dialog window (http://server/modaldialog.asp) with a desired height 200px by width 200px. Here's my attempts and problems: ...
1
by: Matt | last post by:
The following program submit a FORM DATA to a new window using HTTP POST, and postprocess.asp couldn't get the form data. If I do in GET method and pass by query string in windowURL, then it...
2
by: Matt | last post by:
I want to know how to submit the form data to a modal dialog window? The following is page1.asp, and when the user clicks submit button, it will post the form data to page2.asp by opening a new...
2
by: Parasyke | last post by:
A new problem has me puzzled. I have what appears to be a very stable database but suddenly I can't find my Database Window. I tried the Startup option of Display Database Window and hit the...
5
by: bill | last post by:
relative PHP newbie, not new to computing or web design Login page -get data page (bringing user name and password in form variables). get data page -display data page (bringing user name and...
4
by: pbd22 | last post by:
hi. could somebody tell me, when uploading a file, i know the form where the upload component is must have enctype=multipart/form-data but, is the same true for the form with the server code to...
3
by: andrewtayloruk | last post by:
I'm a newbie when it come to things php and i'm having a bit of trouble. I'm trying to insert data from an html form into a mysql database and can't get it to work. Just a few bits about my...
3
by: simora | last post by:
Hi: Need some working sample code to post hidden form data from a php page to a new popup window. 540 x 500 centered. The popup that I'm calling already is formatted and has a TITLE:web-2007.php...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.