Go Back  HTML Forums - Free Webmaster Forums and Help Forums > WEBSITE DEVELOPMENT > Server Side Programming > PHP Programming
User Name:
Password:
 

Reply
Thread Tools   Display Modes
  View First Unread
 
Old 02-06-2010, 10:44 PM
  #1
dkperez
Novice (Level 1)
 
Join Date: Oct 2009
Posts: 4
iTrader: (0)
dkperez is an unknown quantity at this point
Tab Menu for multi-page form?

I've got a data entry form where a user optionally puts data in a couple sections. It's too big to fit on-screen, so currently it's a multi-column, spreadsheet-style form.

First, before I even chase this and waste everybody's time, is using tabs a good way to make a form that'd otherwise scroll through multiple sections?

To make it easier to use I'm thinking about using tabs. I've found a couple examples and can display the tabs fine, but I"m having trouble understanding how to do the interaction between the form and php. The list is a set of hrefs like

<li><a href="abcdform.php">a</a></li>
<li id="selected"><a href="#">b</a></li>

I can see that the first li is going to jump to "abcdform.php", but what does the "#" in the second li do?

I want this to be a single php file with the html in it and a single php file with all the code. How do I get php to know what tab was hit? I"m generating the table rows and data in the php so how do I get the right rows of data into the right tab section?
dkperez is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it? Reply With Quote
Old 02-07-2010, 04:29 PM
  #2
Horus_Kol
Mod of the Underlay
 
Horus_Kol's Avatar
 
Join Date: Jun 2002
Location: At a desk, hooked up and ready to rock
Posts: 17,495
iTrader: (0)
Horus_Kol is a glorious beacon of lightHorus_Kol is a glorious beacon of lightHorus_Kol is a glorious beacon of lightHorus_Kol is a glorious beacon of lightHorus_Kol is a glorious beacon of lightHorus_Kol is a glorious beacon of light
the hash (#) in a url is for local anchors (internal page links)... in this case, it's being used simply as a way to to have a valid link to the current page (the href parameter should not be empty - but having anything other than "#..." in there will cause a page reload)
__________________
New Photo Gallery: Modus InOperandi
Personal Blog: HorusKol
Articles on Programming and Development (PHP/HTML/CSS, C/C++, more): RandomTweak
Horus_Kol is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it? Reply With Quote
Old 02-08-2010, 07:10 AM
  #3
dkperez
Novice (Level 1)
 
Join Date: Oct 2009
Posts: 4
iTrader: (0)
dkperez is an unknown quantity at this point
Cool... So, how do I implement tabs for displaying different sections of a form? Or, DO I use tabs? Currently, the form is working, but I'm curious how to display the information differently (and hopefully better)...
dkperez is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it? Reply With Quote
Old 02-08-2010, 04:24 PM
  #4
Horus_Kol
Mod of the Underlay
 
Horus_Kol's Avatar
 
Join Date: Jun 2002
Location: At a desk, hooked up and ready to rock
Posts: 17,495
iTrader: (0)
Horus_Kol is a glorious beacon of lightHorus_Kol is a glorious beacon of lightHorus_Kol is a glorious beacon of lightHorus_Kol is a glorious beacon of lightHorus_Kol is a glorious beacon of lightHorus_Kol is a glorious beacon of light
the tabs thing... you'd need something in javascript... you have a couple of options:

1. load all of the content at once but hide some in hidden divs - this can cause a large page load, but make things simpler for POSTing the form data...

2. load the content dynamically via ajax requests - this will make for leaner initial load, but mean a bit more work in storing the collected form data for POST...


If you haven't already, I'd recommend including jQuery as a javascript at the top of your pages - then you will have some helper functions to make the javascript you need easier to write.

Now, I'm going to stop here - I've hopefully pointed you in a good direction, and will be happy to help with more specifics along the line - but afraid I haven't got time to code up a full working example for you.

so, yeah, have a read about javascript and hidden divs and/or ajax - browse a bit through jQuery, have a go, and come back if you have more questions.
__________________
New Photo Gallery: Modus InOperandi
Personal Blog: HorusKol
Articles on Programming and Development (PHP/HTML/CSS, C/C++, more): RandomTweak
Horus_Kol is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it? Reply With Quote
Reply
KEEP TABS
SPONSORS
 
Boxedart

 
 


 
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
  
 
 
 



 
  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 Off
HTML code is Off
Thread Tools
Display Modes

Forum Jump

 

All times are GMT -5. The time now is 05:44 AM.

   

Mascot team created by Drawshop.com

Powered by vBulletin® Version 3.6.7
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.

Server Monitoring by ENIACmonitor 0.01
HTMLforums.com © Big Resources, Inc. Web Design by BoxedArt.com
vRewrite 1.5 beta SEOed URLs completed by Tech Help Forum and Chalo Na.