LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 02-26-2004, 02:11 PM   #1
patpawlowski
Member
 
Registered: Mar 2003
Location: Centreville, Virginia
Distribution: Mandrak, Red Hat
Posts: 163

Rep: Reputation: 30
Unhappy OK, I give!


I have been reading JavaScript code and tutorials all day. I am trying to make a pop open menu and can't seem to find any answers. Can anyone explain to me or point me in the right direction? My plan is, from what little I have understood so far, to:

1) create a table of links
2) keep that table hidden until a mousover event calls the JS code
3) make the table apear over the top of other elements on the page

I have found that if I use:

<STYLE="display:none"> the table isn't visible
if I change it to: <STYLE="display:''">then it is visible

I stole this from someone elses script.

However I can't figure out how to change this with JS.

I also need to know how to set the coords for the table.

Thanks,

Last edited by patpawlowski; 02-26-2004 at 02:12 PM.
 
Old 02-26-2004, 03:08 PM   #2
chewysplace
Member
 
Registered: Sep 2003
Distribution: Slackware 10 w/ Kernel 2.6.8
Posts: 176

Rep: Reputation: 30
maybe Java is not what you should be using?
 
Old 02-26-2004, 03:36 PM   #3
h/w
Senior Member
 
Registered: Mar 2003
Location: New York, NY
Distribution: Debian Testing
Posts: 1,286

Rep: Reputation: 46
pat - http://www.kryogenix.org/code/browser/nicetitle/ - see this (i havent really spent anytime on it myself, but i think it should be of help.)
chewy - dont know if you're just being funny there, and if you're not, java != js. if you are, let's not confuse the others who ask in earnest.
 
Old 02-26-2004, 03:40 PM   #4
chewysplace
Member
 
Registered: Sep 2003
Distribution: Slackware 10 w/ Kernel 2.6.8
Posts: 176

Rep: Reputation: 30
no, not being funny. i realize he asked for java script. thats pretty much a given. so i dont spell everything out to appease you, thats not what i'm here for.
 
Old 02-26-2004, 03:44 PM   #5
h/w
Senior Member
 
Registered: Mar 2003
Location: New York, NY
Distribution: Debian Testing
Posts: 1,286

Rep: Reputation: 46
if someone asks questions bout "C++", will you reply back with everything written as "C" to save on the typing cos it's a "given" to you? it's not a question of appeasement - it's for clarity. maybe the person who posted might get it (or not), but someone passing by and seeing java where js is being talked bout will think somethings wrong.

anyway ...
 
Old 02-26-2004, 03:48 PM   #6
chewysplace
Member
 
Registered: Sep 2003
Distribution: Slackware 10 w/ Kernel 2.6.8
Posts: 176

Rep: Reputation: 30
the man was talking about scripting in the conversation if you didnt notice. so if i were to tell him to try php, do i, for the sake of "clarity" have to say "php scripting"? no you dont have to.
 
Old 02-26-2004, 04:08 PM   #7
h/w
Senior Member
 
Registered: Mar 2003
Location: New York, NY
Distribution: Debian Testing
Posts: 1,286

Rep: Reputation: 46
for doin pat's 1-2-3, are you suggesting to him that he use PHP? are you outta your mind?

if someone asks for a solution in XYZ, and just cos you have no idea about XYZ, are you gonna tell em to try ABC just cos you know (or whatever you know of it) ABC?

and umm ... stop makin a fool outta yourself now. you gave the SUN Java website when pat asked for a js resource. i need not say more.

if you don't know something, and you have some time on your hands, you DO NOT have to reply to every post here.

you wasted his time sending him to the java website and made him search through it lookin for a solution. you may have time to waste, but people do not post here with the same resources to waste as you.

Last edited by h/w; 02-26-2004 at 06:04 PM.
 
Old 02-27-2004, 08:34 AM   #8
patpawlowski
Member
 
Registered: Mar 2003
Location: Centreville, Virginia
Distribution: Mandrak, Red Hat
Posts: 163

Original Poster
Rep: Reputation: 30
Moving on. I have made some inroads towards my menu. Unfortunately I wasn't receiving emails re: the posts to this thread and just now checked it. Thanks for the link h/w, I will check it out. Interestingly enough I always knew that JS & Java were different but assumed it was a similar relationship as VB, VBS, & VBA. I just read last night that JS was developed by Netscape completely independently of Sun and Java. Originally it was called LiveScript and they changed the name to sort of get on the Java bandwagon. At least that's what the book said.

Regarding PHP, that's actually what I'm using to create the tables that will become the menus but PHP's functionality essentially ends once the page is loaded. With PHP you would have reload the page everytime you opened a menu. Wouldn't that be fun with dial-up?

Anyway:

Right now I have created my menu's, I can have them appear and dissapear and I am begining to work on locating them on the screen. However, I have about 30 sub-menus with the main menu always visible. Each menu has it's own class and id which are identical. i.e. class=xyz id=xyz they are named m1, m2, m3, .... etc. I can easily pass the id/class or just the number to the function but I can't figure out how to incorporate it into the property name. I need to set the property like such:

document.all.mX.style.display="";

If I try to concatenate

menuname = "m"+cat_id;
then
document.all.menuname.style.display=""

JS takes it as a literal which is understandable once you look at but I can't think of a way around it.

Any ideas?

Last edited by patpawlowski; 02-27-2004 at 08:39 AM.
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
I give up! futurist Mandriva 3 09-05-2005 02:59 PM
What if I were to give up? pterandon Linux - Wireless Networking 1 04-19-2005 01:37 PM
No one can give me my [d] Forced2Morph Linux - Newbie 9 10-22-2004 06:05 PM
I give up LinuxSeeker Linux - General 8 02-12-2004 10:31 PM
I Give Up ixion Linux - General 11 02-17-2003 06:08 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 06:12 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration