473,508 Members | 2,133 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Where I should call this function?

Where I should call this function?
If I call it in href doesn't work. (I want to make a simple menu)

function MostrarMenu(objeto) {
esta_abierto = document.getElementById(objeto).style.display;
document.getElementById("menu_preguntas").style.di splay='none';
if (esta_abierto == 'none') {
document.getElementById(objeto).style.display='non e';
alert("Estaba cerrado");
}
else {
document.getElementById(objeto).style.display='non e' ;

alert("Estaba abierto");
}
}

<li><a href="preguntas.shtml"
nclick="MostrarMenu('menu_preguntas')";Preguntas</a></li>
<div id="menu_preguntas" style="display:block">
<ul>
<li><a href="preg_html.shtml" title="Preguntas sobre
HTML">HTML</a></li>
<li><a href="preg_css.shtml" title="Preguntas sobre
CSS">CSS</a></li>
<li><a href="preg_javascript.shtml" title="Preguntas sobre
JavaScript">JavaScript</a></li>
<li><a href="preg_php.shtml" title="Preguntas sobre
PHP">PHP</a></li>
</ul>
Dec 14 '06 #1
1 1027
Asarus wrote on 14 dec 2006 in comp.lang.javascript:
if (esta_abierto == 'none') {
document.getElementById(objeto).style.display='non e';
alert("Estaba cerrado");
}
else {
document.getElementById(objeto).style.display='non e' ;
document.getElementById(objeto).style.display='' ;

alert("Estaba abierto");
}
}


--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Dec 14 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
1698
by: MackS | last post by:
Hi I'm new to Python and would like to know if the following is possible. Say I have one lower-level object A and one user-interface object B. Suppose B.CallingMethod() calls A.CalledMethod(),...
2
2857
by: urocrane | last post by:
i'm using visual c++ and it doesn't seem to have graphics header file. where can i get it? i've always had a wierd thought about prototypes, do you really need them? in my case, i think it looks...
5
1778
by: ypul | last post by:
the code below given is connection class ... now I want to use the connection in another class , by using the getConnection method. where should I call con.dispose() ? in connection class or...
6
25772
by: Lenn | last post by:
Hi, I have a DLL with unmanaged function written in C. I need to call from managed C# code, where should DLL have to placed, bin folder system32? And can this location be changed. I haven't...
11
6601
by: Yelena Varshal via AccessMonster.com | last post by:
Hello, I have a problem with one of msaccess.exe API calls that work on my desctop but does not work on the laptop from within MS ACCESS. There is a lot of differences between 2 computers...
20
5184
by: Frank-O | last post by:
Hi , Recently I have been commited to the task of "translating" some complex statistical algorithms from Matlab to C++. The goal is to be three times as fast as matlab ( the latest) . I've...
23
1938
by: Steven D'Aprano | last post by:
I defined a nested function: def foo(): def bar(): return "bar" return "foo " + bar() which works. Knowing how Python loves namespaces, I thought I could do this:
9
3696
by: DanielJohnson | last post by:
I am wondering where does the value returned by main goes. Suppoes main returns some number say 42, where is it stored. Supposed a shell script call a C program and the program returns the value...
4
1727
by: 1230987za | last post by:
Hi, Let's say I have the following class: class foo { public: foo(); void addItem(int item); private:
0
7326
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
7046
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7498
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5629
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5053
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4707
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3182
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
766
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
418
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.