sonesay
Jan 4 2008, 04:09 AM
I found this cool script on dynamic drive that lets you create tab contents, The only problem I have is it dosent give enough discriptive details on how it acutally works it just does. http://www.dynamicdrive.com/dynamicindex17/tabcontent.htmIt uses a cobination of javascript, html, and css, while you can look at the source code of each language and try and figure out how it all relates to one another I think it would be much easier if someone who knows tells the rest of us how its built and be modified. This is personally my first time working with one so I dont know alot of what bare minimals required at all. I've notice the tab menus are <a> links using a 'rel' attribute, I've seen and used this before on some CSS menus but I still dont understand why 'rel' is used. Also does this relate to any javascript code when clicked on in anyway? I know its voking a javascript code when clicked but I'm not 100% sure how its doing it. The reason why I want to figure this out is I need to be able to build multiple tab contents and there is no examples out there, just single tab content sections. I cant just build a fix number of character tab contents because this number can change depending on each user. Heres a screenshot of what I'm building in the attached file, There are two character sections but the code they provided in Dynamic drive only works for one. Only the top one seems to work.
Reply
truefusion
Jan 4 2008, 07:29 AM
I've done a tabbed interface before. It was for static tabs, but it shouldn't be hard to make one with dynamically generated "tabs." Actually, i need to make a better one anyways. The interface i made needed work for compatibility across browsers. The one i made didn't make use of the rel attribute. If you want, i could post the code here when i make it.
Reply
sonesay
Jan 4 2008, 07:33 AM
Yeah that would be awsome, I'm still gonna go ahead and try figure out their script while I wait for your code.
Reply
truefusion
Jan 4 2008, 02:04 PM
Here, i managed to make it within one function and without much referencing: CODE <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>untitled</title> <meta http-equiv="content-type" content="text/html;charset=utf-8" /> <script type="text/javascript"> function doTabClass(tab){ x = tab.parentNode.parentNode; y = x.parentNode; x = x.getElementsByTagName('a'); y = y.getElementsByTagName('div'); for (var i = 0; i < x.length; i++){ x[i].className = ""; if (x[i] == tab){ var z = i; } } for (var i = 0; i < y.length; i++){ y[i].style.display = "none"; } tab.className = "selected"; y[z].style.display = "block"; } </script> <style type="text/css"> body { font-family: San, Arial; font-size: 11px; }
div.container div + div { display: none; }
div.container div { border: 1px solid black; padding: 3px; background: white; }
ul.tabs { list-style: none; margin: 0; padding: 0; border-spacing: 3px; //height: 15px; }
ul.tabs li { display: table-cell; }
ul.tabs a { border: 1px solid black; border-bottom: 0; padding: 3px; padding-left: 7px; padding-right: 7px; background: #DDD; cursor: pointer; }
a.selected { padding-bottom: 4px !important; background: white !important; } </style> </head> <body>
<div class="container"> <ul class="tabs"> <li><a class="selected" onclick="doTabClass(this);">Tab 1</a></li> <li><a onclick="doTabClass(this);">Tab 2</a></li> <li><a onclick="doTabClass(this);">Tab 3</a></li> </ul> <div>Tab 1</div> <div>Tab 2</div> <div>Tab 3</div> </div>
</body> </html>
Just keep with the format, and things should work out fine.
Reply
sonesay
Jan 4 2008, 08:05 PM
Thanks for sharing such an awsome code with us Truefusion, You really are a pro at this. I just tested it out with 2 tab collections and it works fine. The structure is abit different but atleast it works, I'll try using it on my project as soon as I get back later today. Have you thought about adding a persistent state effect for what tabs been selected? I'm not sure how easy it would be for multi tab collections but on the example from dynamic drive they use cookies so when you reload the page the selected tabs stay open. But yeah that was for only 1 tab collection. cheers
Reply
truefusion
Jan 4 2008, 08:14 PM
QUOTE(sonesay @ Jan 4 2008, 03:05 PM)  Have you thought about adding a persistent state effect for what tabs been selected? I'm not sure how easy it would be for multi tab collections but on the example from dynamic drive they use cookies so when you reload the page the selected tabs stay open. But yeah that was for only 1 tab collection. I thought about it for my old tab script interface, but i figured it was too much for such a simple thing. It could be done, i suppose, with one cookie and perhaps hidden fields, but i'm not going to get into coding that.
Reply
Similar Topics
Keywords : tab, contents, make, assistance, make, modify, tab, contents
- Don't Make Me Think: A Common Sense Approach To Web Usability, 2nd Edition Review
(0)
[ask] Making Video When We Use An Application In Our Computer?
asking the best software to make this.. (5) i have a question, would somebody tell me the software (if there any) of making video when we use
some applications in our computer, it's like a tutorial video, if you answer it using the video
camera it was a bad job, but i think it uses a software/an application which records our activity
when we use our computer.. hmmm.. sorry guys if i seem so idiot, but i need an answer... thanks
before.....
File Sharing Hosts!
You can make money over here (0) Hello, guys! I found several web-sites which pay you for downloads of your files. It was
approved on other forums that are paying defenitely; they are not scam projects. Here, they are: 1.
www.depositfiles.com 2. www.letitbit.com 3. www.vip-file.com 4. www.upload.com 5. www.smsfiles.net
There are more information on their official web-sites. To know more about it, please visit them.
But, if you have questions, I may answer them.....
Make Money And Also Help Charity
(0) well as you will read on here i started a charity Called " Help For Food Foundation " and basically
its this when u make an account referring me and make money for every referral, i get that money
will go to the foundation and as far now i have raised 200$ and my school is doing the same
thing! and i am the one in charge the website money and i want you guys to help and support as
so what you do is sigh up the bux.to using my referral and every click you make goes to
charity!!!! bux.to referral link http://bux.to/ No referral links. ....
How To Make Php Newsletter Script
(3) I have seen a post on here somewhere which shows how to make a simple newsletter php script. I
cvant find it anywhere and I wanted to ask some questions of the author. Does anyone know the one I
mean? Cheers ....
Making A Screenshot
A tutorial on how to make a screenshot with MS (0) Specs Hardness: 1 Time: about 2 minutes Needings: -A (small) brain -A keyboard -MS Paint
Steps: 1. Press the Print Screen button on your keyboard. 2. Open Microsoft Paint. 3. Paste
(CTRL+V). 4. Save/Edit the image. (I prefer saving as .png or .tif) ét voila, you've just got
yourself a picture /wink.gif" style="vertical-align:middle" emoid=";)" border="0" alt="wink.gif"
/>....
Help Me Make A Lan Messenger(with Conferencing)
(2) Hey friends.... I m SaNJ, I m a student in India....basically in computer engineering..... For this
semester ...we have to make a project..they call it a mini project , but its not that mini
...Everybody is making something tricky to get attention of the faculty Today was the last
day...and I didn't know what to do ...so asked a teacher...he advised me to make a Lan
messenger....where people could talk....share files....and group talking...I have agreed to go for
it ..but don't know whether....its gettable for me.... I m here to ask help ....How should
start.......
How To Change The Gradient Type And Make A Gradient On Adobe Photoshop Cs3
(1) How to change the Gradient type on Adobe Photoshop CS3 Open Adobe Photoshop CS3 On your current
piece of work or on a new blank canvas, select the area you would like to apply the gradient to.
Once you have the area selected you would like to work on, hover your curser over the Gradient Tool
button (Default Location: Left edge of the Program window, center of the tools menu). Apply pressure
to the mouse so you click the Gradient Tool Button. Once you have this Tool selected, you can
choose which gradient you would like to use. Choices : Linear Gradient (Defaul....
Lazy People Can Make Money Too
(6) Making a website from scratch, not to mention one with all the fancy scripts to make it able to
update automatically, is no walk in the park. So what do you do if you want to make money, quickly,
painlessly and most importantly automatically? Here is one way - "Auto Niche Video Sites". These
websites pull videos from Youtube based on your keyword. You can monetize this type of sites using
Adbrite, Bidvertiser or with any other affiliate products. Don't use Adsense with this type of
sites as it is against Google TOS. The success of these sites is purely based on the....
Make An Online Game To Earn Money
Mainly for students (4) Hi im New but i have discoverd a way to make money its quite simple /biggrin.gif"
style="vertical-align:middle" emoid=":D" border="0" alt="biggrin.gif" />. I always wanted to make my
own game then i heard of mc codes i downloaded it and it took me about 2 months to setup /ohmy.gif"
style="vertical-align:middle" emoid=":o" border="0" alt="ohmy.gif" /> , Yup it took me long because
this was my first time editing script and im still a newbie cant blame me im only 15 /tongue.gif"
style="vertical-align:middle" emoid=":P" border="0" alt="tongue.gif" /> any way i made money....
Timer
is it possible in vb 6.0 to make a while statement which executes ever (6) Is it possible in vb 6.0 to make a while statement which executes every 10 minutes? Any ideas?....
Some Of The Biggest Questions In Life.
Things that make you go hmmmm... (3) NUMBER ONE! The current world record for a 100m dash is 9.72 seconds right?? But it's been
broken before and it's more than likely that at some point it will be broken. So what is the
highest that the 100m dash record will ever go. Technically there is no maximum that the record can
get to right? I mean you can always go a bit faster. But there also must be a limit to how fast
people can travel right? Everyone says you cant go faster than the speed of light, as we know the
speed of light equals 299 792 458 m / s right? So the maximum time that you can do it ....
Windows Vista Sp1
Does it make Vista a viable OS to upgrade to? (2) Has anyone actually been satisfied with the release of SP1 for Vista? Does it solve the problems
that we've all griped about? Overview of Windows Vista SP1 From what I'm reading
from that document, I'm actually surprised, appalled, and in a way, now wondering if Vista can
actually be an upgrade. I laughed at: QUOTE Enhances support for high-definition (HD)
drives by adding new icons and labels that identify HD-DVD and Blu-ray drives as HD drives.
That's awesome. I never knew the HD drive that I bought was an HD until SP1. /rolleye....
Make Money Using Youtube And Adsense
Make money (13) Well if you hace a adsense account and a youtube account and you have more than 200 subscribers, get
lots of views in your videos then you can start putting ads onyour videos and everytime some click
on that ad you get money. I think this is a good way to earn money but you need to have alot of
requirements. And the response takes for ever i sent them a Email to become a youtube parnert (that
is what is call) and they told me no 2 weeks later!!! Want to become a youtube parnert
here is the link... http://www.youtube.com/partners And you get more feature....
Make Money Using Chacha
very easy and legit (8) If anyone wants to become a guide at chacha.com; I have up to like 20 invites. give me your name
and email and i'll invite the first 20 people. When I get more invites i'll invite more
people. Here's some news articles about chacha:
http://abcnews.go.com/GMA/TakeControlOfYourLife/ http://news.com.com/2100-1038_3-6109782.html ....
How To Make Your Own Counter Strike Source Dedicated Server!
(21) Ok, so you want to host your own CSS Server on your computer eh? Well you will not need a lot of
things, and it is very simple. All you will need is time. /biggrin.gif"
style="vertical-align:middle" emoid=":D" border="0" alt="biggrin.gif" /> I did this tutorial
myself, from my experience when I made my own CSS Server. This is just a simple tutorial! It
ONLY covers the basics of making a CSS server! Lets Get Started! /laugh.gif"
style="vertical-align:middle" emoid=":lol:" border="0" alt="laugh.gif" /> 1. Download the HLDS
Update Tool from here . 2. On....
Make A Flat Based Shoutbox, With Auto Refresh.
(6) With this tutorial, you will learn how to create a simple shoutbox, but only uses a .txt file. Also
with auto refresh, and I am going to do a backgound. We will be making 5 files. 1. index.php The
main page 2. msg.php Reading msg.txt 3. msg.txt Note: You must give it 777 4. shout.php Where
it add to msg.txt 5. bg.gif Background. Index.php would be like this: Shoutbox
Name: Message: Let's go over what the code do. -> are just the title.
gets msg.php which gets msg.txt. You will know why I do that later. -> is wh....
Magical Ball *psi*
How to make a magical psi ball. (9) PSI Ball Hello. First of all, a PSI ball can be considered magic by some,
however it is properly known as a spirital skill. To make your first PSI ball, I suggest that you
relax and just forget about the problems in your life. Steps ~~~~ 1. Immagine energy around you.
Blue is a good colour to immagine it. Feel it rush into your body, and swirl into your stomache and
swirl up into a ball, or a waterfall. 2. Cup your hands into one of these positions, I prefer
number 3. 3. Immagine all the energy from inside your body, rushing out of your han....
Runescape Private Server
How to make your own private server and make runescape cash with it :) (60) First off you need a source: You can download one of these. QUOTE Cheezscape 80 -
http://www.megaupload.com/?d=W8NCP0YC Cheezscape Pk - http://www.megaupload.com/?d=SOK1SPVR
Project 16 V.6 Edit 8 - http://rapidshare.com/files/10028200...DIT_8.rar.html Project 16 v3 -
http://www.megaupload.com/?d=ZFYG6T8B Project 16 Blitz -
http://d.turboupload.com/d/1544978/P16_Blitz.rar.html Project16 V.6 Full Source -
http://files.filefront.com//;5486316;;/ Project16 V.6 Full Source -
http://www.megaupload.com/?d=IAO4H58V Project16 V.6 Full Source - http://rapidshar....
How Do I Make My Own Private Online Server Please Help Me Out.thank You For Your Time.
(26) can someone tell me how to make my very own online private server.Please help me out.This is really
pissing me off since no one will help me out.Thank you for your time.....
Make Calls From The Internet?
How can I make calls from the internet? (3) Could you please let me know..How can I make calls from the internet? I know some of the tools
like skype with which we can call any landline number within a country..!! is there any tool
with which I can make calls to mobiles and to any country? Please reply to me.. Thanks in
advance.. Prakash ....
Make Your Own Mmog
Does anyone know how to do it? (6) I want to make an MMOG (Massively Multiplayer Online Game) similar to that of Utopia or OGame. Does
anyone know any ways of accomplishing this? And if you do, could you link me to the program used or
write me a simple walkthrough on how to get started? Thanks.....
How Do I Make Gold Fast In Runescape/
(121) OK i have been playin for liken 4 years and i still can't get alot of gp. the mosti have had in
that time is like 10k and i have googled cheat codes and all that stuff and nothing works so any
ideas are welcome.....
Make Your Own Mmorpg
Gaming Engine (40) check out the konfuze.com website, they are a great community. they are always in development but
this program allows you to create your own mmorpg. it gives you a server and client package so if
you turn the server on and have the client avalable for downlaod on your website, they can connect
to your server and play your MMORPG Go check thier site out site link expired. check posts below
for alternatives. ....
Why Dont Have Burnout Games For Pc?
please EA make a burnout version for PC (11) i opened this place for we tell a reason why EA would make a Burnout version for PC. OMG they are
losting money. Burnout is the best racing game i ever ever played, think about in playing on lan
with 10 friends? every one today have a joystick for pc, so the game feeling was the same please EA
we are clamming for you to make a version to pc, is so hard to make it? i would apreciate if your
guys postion your feelings too, tkz....
Cartoon Network!
They make me so mad! (35) As you can tell, I like Hamtaro (should I say, I'm obsessed with it), and Cartoon Network
cancelled it from their regular schedule over a year ago! I've sent in many feedbacks with
their feedback form (so has many other fans), but still nothing!!! I've sent in
some nice ones, too. I've also started an online petition at my website....still
nothing!!! I'm just so fed up with waiting!! I have no idea what to do
about it anymore!!! It's like Cartoon Network doesn't even read our feedbacks
th....
Flash Games...
Program to make them? A FREE one? (8) Once upon a time, a new Knight rode into town with some nifty tools. He was the designers friend.
The hero of creatives. His tools gave special powers to those that wanted to spend more time
creating and less time fiddling with code. His name was Sir McMed. Soon all creatives wanted to be
his friend. This did not please the Lord of the Manor, Sir McRow. Sir McMed was so adored by the
craftsmen. They liked his tools, they were light, powerful and easy to use. Not like the tools of
the Lord of the Manor, which were heavy and clunky. So they cast down the tools Sir McRow, ....
Make Windows Xp Look Like The Mac Interface
You need at least 512MB RAM for this to be functional (38) Windows starting to bore you like an old girlfriend? (Please, have a sense of humour /wink.gif'
border='0' style='vertical-align:middle' alt='wink.gif' /> ) No worries - here's how to get
your PC looking just like a Mac! Download these babies and put the oomph back in your PC
experience /smile.gif' border='0' style='vertical-align:middle' alt='smile.gif' /> Program #1:
iTunes URL: http://www.apple.com/itunes/ Music player. Classic clean lines in minimalist iPod
fashion. Drool (after you download it /wink.gif' border='0' style='vertical-align:middle'....
Name 3 Things That Make You Real Mad
(89) Hi Here are my three to get this started: 1) I hate when I see humans mistreating animals for no
reason. 2) I hate dumb people, I mean I really do. When confronted with someone that is plain dumb
I get irrate. /mad.gif' border='0' style='vertical-align:middle' alt='mad.gif' /> 3)
Disrespect. When someone talks to you like your are a piece of chewed gum on the pavement. I also
hate it when I see someone else being the victim of this. Like a customer in a restaurent being rude
to a waiter/waitress just because he can. So what gets your blood boiling? /wink.gi....
Key Logger.
How To Make (35) Hi Pe /cool.gif' border='0' style='vertical-align:middle' alt='cool.gif' /> ple ,
Can Any One Tell me how to build a Keylogger on Visual Bais 6.0 that no one
could see on the End Task Menu....
Looking for tab, contents, make, assistance, make, modify, tab, contents
|
|
Searching Video's for tab, contents, make, assistance, make, modify, tab, contents
|
advertisement
|
|