Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > Problem getting info from multiple HTML pages

Reply
Thread Tools

Problem getting info from multiple HTML pages

 
 
antonyliu2002@yahoo.com
Guest
Posts: n/a
 
      09-01-2005
Hi, friends,

First please take a look at my sample HTML page at:

http://members.lycos.co.uk/wodesite/

Each of the tabs is linked to its corresponding HTML form page. One
can browse each form by clicking on the tabs.

Those pages are actually gonna be HTML forms in which the user supplies
his personal info and then click a "submit" button to send the info to
the database.

Now, I want to be able to collect all in once all the user-input data
from all of the separate HTML forms linked to the tabs, and then do a
single "submit" action to send the data to the database.

But, I am not sure how I can get such user-input data in different HTML
forms all in once. Any solution to this problem? Thanks.

I know that it is doable if I combine all the forms into a single HTML
page, but then I will have a very lengthy form, which eventually ruins
the beauty or the advantage of the tabs I've created.

Please ask if I did not make it clear what I wanna do.

 
Reply With Quote
 
 
 
 
antonyliu2002@yahoo.com
Guest
Posts: n/a
 
      09-01-2005
In other words, what I want is like the "Internet Options" form of
Microsoft Internet Explorer.

The Internet Options form has the following tabs:

General Security Privacy Content Connections Programs Advanced

We can click any of these tabs and change the settings and finally when
we click the "Apply" button, all settings from all tabs are saved.

Is this doable with the Web?

 
Reply With Quote
 
 
 
 
Benjamin Niemann
Guest
Posts: n/a
 
      09-01-2005
http://www.velocityreviews.com/forums/(E-Mail Removed) wrote:

> Hi, friends,
>
> First please take a look at my sample HTML page at:
>
> http://members.lycos.co.uk/wodesite/
>
> Each of the tabs is linked to its corresponding HTML form page. One
> can browse each form by clicking on the tabs.
>
> Those pages are actually gonna be HTML forms in which the user supplies
> his personal info and then click a "submit" button to send the info to
> the database.
>
> Now, I want to be able to collect all in once all the user-input data
> from all of the separate HTML forms linked to the tabs, and then do a
> single "submit" action to send the data to the database.
>
> But, I am not sure how I can get such user-input data in different HTML
> forms all in once. Any solution to this problem? Thanks.
>
> I know that it is doable if I combine all the forms into a single HTML
> page, but then I will have a very lengthy form, which eventually ruins
> the beauty or the advantage of the tabs I've created.
>
> Please ask if I did not make it clear what I wanna do.


Two possible options:

1.) You create a single, large form. You could 'simulate' several pages by
showing only a part of it at a time and hiding the rest of it (using CSS).
The page switching will involve JavaScript, so make sure that a user agent
without JS will always see the full form without hidden parts. There may be
some issues with form values not being sent, if the corresponding input
element is not visible when the form submitted (I think, I remember
something like this, but I'm not sure, so better do some research on this
topic. At least this approach is possible, as I've seen it various times
'in the wild'). Finding a good, understandable way to indicate
missing/wrong data is probably quite a challenge.

2.) Convert the link that point to different parts of the form into submit
buttons. Collect the data, but do not write it to the DB - store it in
session variables or create hidden input fields to carry the values through
all forms.

The first approach is faster, as no additional page reloads are needed. But
an implementation is not for the faint-hearted. The second approch is more
robust and the one I would choose (and have often implemented).


--
Benjamin Niemann
Email: pink at odahoda dot de
WWW: http://www.odahoda.de/
 
Reply With Quote
 
antonyliu2002@yahoo.com
Guest
Posts: n/a
 
      09-02-2005
Thx, Ben.

I thought of both, too. For solution 1, I am not sure how to
dynamically hide divs of a single HTML page using Javascript. Any
idea?

Meanwhile, I'll try implementing solution 2.

Benjamin Niemann wrote:
> (E-Mail Removed) wrote:
>
> > Hi, friends,
> >
> > First please take a look at my sample HTML page at:
> >
> > http://members.lycos.co.uk/wodesite/
> >
> > Each of the tabs is linked to its corresponding HTML form page. One
> > can browse each form by clicking on the tabs.
> >
> > Those pages are actually gonna be HTML forms in which the user supplies
> > his personal info and then click a "submit" button to send the info to
> > the database.
> >
> > Now, I want to be able to collect all in once all the user-input data
> > from all of the separate HTML forms linked to the tabs, and then do a
> > single "submit" action to send the data to the database.
> >
> > But, I am not sure how I can get such user-input data in different HTML
> > forms all in once. Any solution to this problem? Thanks.
> >
> > I know that it is doable if I combine all the forms into a single HTML
> > page, but then I will have a very lengthy form, which eventually ruins
> > the beauty or the advantage of the tabs I've created.
> >
> > Please ask if I did not make it clear what I wanna do.

>
> Two possible options:
>
> 1.) You create a single, large form. You could 'simulate' several pages by
> showing only a part of it at a time and hiding the rest of it (using CSS).
> The page switching will involve JavaScript, so make sure that a user agent
> without JS will always see the full form without hidden parts. There may be
> some issues with form values not being sent, if the corresponding input
> element is not visible when the form submitted (I think, I remember
> something like this, but I'm not sure, so better do some research on this
> topic. At least this approach is possible, as I've seen it various times
> 'in the wild'). Finding a good, understandable way to indicate
> missing/wrong data is probably quite a challenge.
>
> 2.) Convert the link that point to different parts of the form into submit
> buttons. Collect the data, but do not write it to the DB - store it in
> session variables or create hidden input fields to carry the values through
> all forms.
>
> The first approach is faster, as no additional page reloads are needed. But
> an implementation is not for the faint-hearted. The second approch is more
> robust and the one I would choose (and have often implemented).
>
>
> --
> Benjamin Niemann
> Email: pink at odahoda dot de
> WWW: http://www.odahoda.de/


 
Reply With Quote
 
Neredbojias
Guest
Posts: n/a
 
      09-02-2005
With neither quill nor qualm, (E-Mail Removed) quothed:

> Thx, Ben.
>
> I thought of both, too. For solution 1, I am not sure how to
> dynamically hide divs of a single HTML page using Javascript. Any
> idea?


ID the divs and use document.getElementById
("id_name").style.visibility="hidden";

Back on: document.getElementById("id_name").style.visibilit y="visible";

--
Neredbojias
Contrary to popular belief, it is believable.
 
Reply With Quote
 
Benjamin Niemann
Guest
Posts: n/a
 
      09-03-2005
(E-Mail Removed) wrote:

> I thought of both, too. For solution 1, I am not sure how to
> dynamically hide divs of a single HTML page using Javascript. Any
> idea?


Implementing correctly (cross browser support, non-JS browser support, good
usability...) this is pretty difficult. Unless you are already a
JavaScript/CSS expert, you should not try it (unless it is ok, if it will
take several months until you got it right).

> Meanwhile, I'll try implementing solution 2.


That's what I would suggest.

--
Benjamin Niemann
Email: pink at odahoda dot de
WWW: http://www.odahoda.de/
 
Reply With Quote
 
TheWebJunkie@webtv.net
Guest
Posts: n/a
 
      09-03-2005
You can also do it with cookies. The links to change pages should be
buttons, with JavaScript onClick instructions to set a session cookie
containing that page's form information. Have the cookie read and
processed by the subsequent page. The trick is that different browsers
process JavaScript-set cookies differently, but for the most part the
procedure works.

 
Reply With Quote
 
antonyliu2002@yahoo.com
Guest
Posts: n/a
 
      09-06-2005
Benjamin Niemann wrote:
> (E-Mail Removed) wrote:
>
> > I thought of both, too. For solution 1, I am not sure how to
> > dynamically hide divs of a single HTML page using Javascript. Any
> > idea?

>
> Implementing correctly (cross browser support, non-JS browser support, good
> usability...) this is pretty difficult. Unless you are already a
> JavaScript/CSS expert, you should not try it (unless it is ok, if it will
> take several months until you got it right).
>
> > Meanwhile, I'll try implementing solution 2.

>
> That's what I would suggest.


Hi,

I am seriously considering solution 2. But if we convert the links on
the tabs to submit buttons, will they look like the dumb 3-dimensional
"submit" buttons like we see everywhere on the web? If that is the
case, I don't like the idea, because I won't be able to use my nice
cute tabs.

Thanks.

 
Reply With Quote
 
Rincewind
Guest
Posts: n/a
 
      09-07-2005
On 6 Sep 2005 15:06:16 -0700, (E-Mail Removed) wrote:

> am seriously considering solution 2. But if we convert the links on
> the tabs to submit buttons, will they look like the dumb 3-dimensional
> "submit" buttons like we see everywhere on the web? If that is the
> case, I don't like the idea, because I won't be able to use my nice
> cute tabs.


You can change the submit button to look just the same as your "cute tabs".
 
Reply With Quote
 
antonyliu2002@yahoo.com
Guest
Posts: n/a
 
      09-07-2005
Rincewind wrote:
> On 6 Sep 2005 15:06:16 -0700, (E-Mail Removed) wrote:
>
> > am seriously considering solution 2. But if we convert the links on
> > the tabs to submit buttons, will they look like the dumb 3-dimensional
> > "submit" buttons like we see everywhere on the web? If that is the
> > case, I don't like the idea, because I won't be able to use my nice
> > cute tabs.

>
> You can change the submit button to look just the same as your "cute tabs".


By using images? It's probably not a good idea to turn the cute tabs
into images because they scale very well right now as texts.
Apparently they wouldn't if they are turned into images.

 
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
Master pages for plain HTML pages? Cirene ASP .Net 3 04-30-2008 02:14 PM
getting variables from Html pages =?Utf-8?B?SmFtZXM=?= ASP .Net 2 11-16-2007 06:47 PM
URGENT: Process html pages as aspx pages. jainamber@gmail.com ASP .Net 1 10-31-2006 09:27 PM
need start point for getting html info from web nephish@xit.net Python 4 10-31-2005 02:28 PM
Getting HTML source from web pages to include in my ASP scripts Chris ASP General 2 09-03-2003 09:16 PM



Advertisments