INeedADip schrieb:

> addNamespace("Mypage")
> MyPage.MyEnum = { "One":0,"Two":1,"Three":2 }
> 
> How do I pass this enum in my JavaScript?
> I know I can do something like GetSomeValue(MyPage.MyEnum.Two,
> callback);
> 
> But this puts a burdon on everything else.  I have drop downs and
> select boxes throught my HTML that have the numeric values:
> 
> Select One: <select><option value="0">One</options><option
> value="1">Two</option>.....</select>
> 
> My question is how can I do something like:
> 
> GetSomeValue(MyPage.MyEnum[1], callback);

MyPage.MyEnum.Two is simply a 1. All way you need is the

var ele = document.getElementById('idoftheselect');

GetSomeValue(ele.value, callback);


-- 

Freundliche Grüße

Albert Weinert

http://der-albert.com

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Ajax.NET Professional" group.

To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]

For more options, visit this group at http://groups.google.com/group/ajaxpro

The latest downloads of Ajax.NET Professional can be found at 
http://www.ajaxpro.info
-~----------~----~----~----~------~----~------~--~---

Reply via email to