Client Side Things
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Codewalkers ForumsOther TechnologiesClient Side Things

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Codewalkers Forums Sponsor:
  #1  
Old February 15th, 2006, 11:30 AM
Pabs Pabs is offline
Contributing User
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Canada
Posts: 100 Pabs User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 20 h 52 m 22 sec
Reputation Power: 2
forms and multiple tabs

hi there
I have some code that will generate a page with multiple tabs. (it uses CSS)

what I want to do is have each tab be a section of a form. imagine a huge form with 150 fields for instance. take that form and put 50 fields in each of the three tabs.

now, what I would like is for the user to be able to go on tab one, fill out his/her info, then go to tab 2 and continue and then three... once done they would hit the submit button and all info from all three tabs would be sent out to be processed (added to DB in my case)

what is the easiest way to accomplish this??

also, once the user is on tab two..can he come back to tab 1 and still see all the info they put in? or would it disappear.?
once it would reload that page, wouldn’t all info be lost ? or is there a way to do this?

if you need more info to understand let me know and I’ll try and explain myself better

Pabs



Reply With Quote
  #2  
Old February 15th, 2006, 11:36 PM
Doik's Avatar
Doik Doik is offline
Contributing User
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: ger
Posts: 337 Doik User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 9 h 44 m 13 sec
Reputation Power: 2
Send a message via ICQ to Doik
RE: forms and multiple tabs

there are imho 2 ways to archieve that.
First one is client-side, second one is server side.

Client Side solution would be javascript. You will have to put all your items in one huge form, dividing it up into several <div> tags. All, except the first one are hidden by default. If you click on "tab2", all divs will be set to hidden via javascript, except of the second one.
Since it is *one* page, that does not need to be reloaded, no data is lost. Disadvantages: users may have JS disabled, users may click the "back" button of their browser to return to tab one, which means they might ruin *all* their inputs. ja for hiding / unhiding div elements:
Code:
 function hide(id) {
   document.getElementById(id).style.display='none';
 } 
 function show(id){
   document.getElementById(id).style.display='block';  
 }

second one would be php, you just have to store every input made in lots of hidden fields, since the page is reloaded by advancing one tab.

Reply With Quote
  #3  
Old February 16th, 2006, 03:17 AM
Pabs Pabs is offline
Contributing User
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Canada
Posts: 100 Pabs User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 20 h 52 m 22 sec
Reputation Power: 2
RE: forms and multiple tabs

thanks...did end up finding some code...will use JS for the time being... the users that will use this form will have it on


thanks

Reply With Quote
Reply

Viewing: Codewalkers ForumsOther TechnologiesClient Side Things > forms and multiple tabs


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway