Wednesday, March 21, 2012

Parameters... :(

Hi,

I have a menu with divs (items)...and I want to make one function to handle all menu items..

I have the following code:

var sCurrentPage = "";

<font size=2></font></p><p><font color=#0000ff size=2>function</font><font size=2> MouseClick(sender)
{
</font><font color=#0000ff size=2> if</font><font size=2> ($(sCurrentPage))
$(sCurrentPage).style.backgroundColor = </font><font color=#800000 size=2>"#FFFFFF"</font><font size=2>;
</font><font size=2>
sCurrentPage = sender.get_id();
$(sCurrentPage).style.backgroundColor = <font color=#800000 size=2>"#BBBBFF"</font><font size=2>;
</font></font><font size=2>}</font></p><p><font size=2></font>...</p><p>//my atlas script</p><font size=2><p><label id=</p></font><font color=#800000 size=2>"MenuItemNutriente"</font><font size=2>>
</font><font size=2><behaviors>
<clickBehavior </font><font size=2>click=</font><font color=#800000 size=2>"MouseClick"</font><font size=2> />
</behaviors>
</label><p></p></font>

The "sender" parameter is allways the clickBehavior object. How can I get the Label object that are firing the event?

thanx :)

I'm having trouble parsing all the HTML formatting above - does this question involve the Atlas Control Toolkit?

No comments:

Post a Comment