Hello,
There is what I want to do.
I have a boolean virable in javaScrit and I want to place a check box image beside a menu when this variable is true and no image when the variable is false.
I have some dynamic scripting stuff in my menu and every thing is working fine. I realise
that all the scripting tag in the menu definition is executed only once (in the dumpmenu i guess). I don’t understand the execution sequence of the menu and the purpose of the function dumpmenu.
How can I do that ?
here is my Sample :
------ My_menu_definition.js -----------
[...]
// My global variable.
var _checked = true;
// When I select the menu, the variable is flipped and the Checkbox image SHOULD flip
addmenu(menu=["debug",
,,100,1,"",prop1,,,menuTransition(),,,,,,,,,,,,
,"<script>test()</script>Voir Document","javascript:onClick=flip()",,,0
,"langue ...","show-menu=langue",,,0
])
function test()
{
if(_checked)
{
document.write("<img src=../js/menu/checked.gif border=0> ");
}
}
// Flip the check box variable !
function flip()
{
_checked = !_checked;
}
[...]
Dynamically flip checkbox beside menu …
-
- Beginner
- Posts: 1
- Joined: Fri Aug 09, 2002 5:24 pm