ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
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.
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.
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.
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.
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.