Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Aug 27th, 2005, 10:55 AM   #1
Zeteg
Newbie
 
Join Date: Aug 2005
Posts: 13
Rep Power: 0 Zeteg is on a distinguished road
Need help with a realtime branching menu

I hope it's called a branching menu. I really have no experience with JavaScript, and I'm in DIRE need of a real time branching menu. When I say no experience, I mean, I can fiddle around with it, so I'd be grateful if someone could help me....

www.dashgaming.com/test

You can see my pitiful attempt to create a menu there... What I want is for when I click Bew, a menu to pop up (like it does now). And, when I click Eep, for the Bew menu to go away, like it does now. However, I'm not sure that my code is efficient, and there's a lot of formatting problems (like the Eep not being right under the Bew) that I can't seem to fix.

If someone could *please* write me a piece of code for a real time menu that does what http://www.shoprogers.com/store/wire...M5LSLET3SADKPB does, but in real time, and has lines seperating different <td>, I'd be totally grateful!

Thanks in advance!
Zeteg is offline   Reply With Quote
Old Aug 27th, 2005, 10:57 AM   #2
Polyphemus_
Expert Programmer
 
Polyphemus_'s Avatar
 
Join Date: Aug 2005
Location: Rotterdam, the Netherlands
Posts: 942
Rep Power: 4 Polyphemus_ is on a distinguished road
Well, i'm pretty sure no one in here is so bored to go writing code for anyone.

I've taken a look at your code though:
	<table width='140'>
		<tr>
		<td width='100%' class='menu'><a href="javascript:ShowMenu('1')">Bew</a></td></tr>		
		<td width='100%' class='main'><div id='menu_1' style='display:none'>	
						<table width='100%'>
							<tr><td width='100%' class='main'>1</td></tr>
							<tr><td width='100%' class='main'>3</td></tr>

							<tr><td width='100%' class='main'>4</td></tr>
							<tr><td width='100%' class='main'>5</td></tr>
						</table>
		</tr>
						

		<tr>
		<td width='100%' class='menu'><a href="javascript:ShowMenu('2')">Eep</a></td>		
		<td width='100%'  class='main'><div id='menu_2' style='display:none'>f</div></td>

		</tr>
	</table

This looks pretty fucked up. Al td's should have to be in a tr, and this is not the case everywhere in your code. A TR means Table Row, so you should use this one to continue on a new line. TD means Table Data, and this is the equavelent to a column.
Polyphemus_ is offline   Reply With Quote
Old Aug 27th, 2005, 10:59 AM   #3
Zeteg
Newbie
 
Join Date: Aug 2005
Posts: 13
Rep Power: 0 Zeteg is on a distinguished road
Well, can you help me with unspacing the Bew and the Eep then please? =)
Zeteg is offline   Reply With Quote
Old Aug 27th, 2005, 11:01 AM   #4
DaWei
Resident Grouch
 
DaWei's Avatar
 
Join Date: Jun 2005
Posts: 6,453
Rep Power: 10 DaWei is on a distinguished road
What the hell do you mean by "real time"?? There is a LOT of sample menuing code on the web. Have you Googled with terms like Javascript and Menu?
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code.
Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers
DaWei is offline   Reply With Quote
Old Aug 27th, 2005, 11:02 AM   #5
Polyphemus_
Expert Programmer
 
Polyphemus_'s Avatar
 
Join Date: Aug 2005
Location: Rotterdam, the Netherlands
Posts: 942
Rep Power: 4 Polyphemus_ is on a distinguished road
Quote:
Originally Posted by Zeteg
Well, can you help me with unspacing the Bew and the Eep then please? =)
See the edit
Welcome to the forums, btw
Polyphemus_ is offline   Reply With Quote
Old Aug 27th, 2005, 11:06 AM   #6
Zeteg
Newbie
 
Join Date: Aug 2005
Posts: 13
Rep Power: 0 Zeteg is on a distinguished road
I just fixed the second part. I know what TDs and TRs are, and the second part was just me testing things and not bothering to fix it 'cause the first part wasn't working properly.

Any idea why there's a space...?

Thanks for the welcome, and I did change the script so everything has a TR and TD. It's still spaced
Zeteg is offline   Reply With Quote
Old Aug 27th, 2005, 11:13 AM   #7
Polyphemus_
Expert Programmer
 
Polyphemus_'s Avatar
 
Join Date: Aug 2005
Location: Rotterdam, the Netherlands
Posts: 942
Rep Power: 4 Polyphemus_ is on a distinguished road
what do you mean by 'spaced', actually?
Polyphemus_ is offline   Reply With Quote
Old Aug 27th, 2005, 11:18 AM   #8
Zeteg
Newbie
 
Join Date: Aug 2005
Posts: 13
Rep Power: 0 Zeteg is on a distinguished road
I attached a picture of the menu to the post. The space is where the red part is - you can compare it to the original =) www.dashgaming.com/test

I don't know why it's there... urgh.
Attached Images
File Type: jpg space.JPG (2.5 KB, 10 views)
Zeteg is offline   Reply With Quote
Old Aug 27th, 2005, 11:22 AM   #9
Ooble
I eat cake for breakfast.
 
Ooble's Avatar
 
Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 9 Ooble is on a distinguished road
OK... this doesn't even work for me. The <a> should be inside the <td>, not the other way around.
__________________
Me :: You :: Them
Ooble is offline   Reply With Quote
Old Aug 27th, 2005, 11:27 AM   #10
Zeteg
Newbie
 
Join Date: Aug 2005
Posts: 13
Rep Power: 0 Zeteg is on a distinguished road
Thank you. I put the <a> inside the <td> but I don't believe it makes too much of a difference. There's still a space =(
Zeteg is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

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

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
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 9:34 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC