This should work...

var ele = document.getElementById('idoftheselect');
GetSomeValue(parseInt(ele.value,10), callback);




On 4/25/06, INeedADip <[EMAIL PROTECTED]> wrote:
>
> If I do that I get an error:
> The object of type 'AjaxPro.JavaScriptNumber' could not converted to
> type 'MyEnum'
>
> If I actually put 'MyPage.MyEnum.Two' it works fine.
>
> I'm not a JavaScript expert so I've been playing around with something
> like:
>
> function getEnumValue(obj, val){
>  for(var item in obj)
>    if(obj[item] == val)
>      return item;
> }
>
> The doing something like:
> GetSomeValue(getEnumValue(MyPage.MyEnum,parseInt(document.getElementById('idoftheselect'))),
> callback);
>
> But that doesn't work because 'item' is a string......
> Has anyone else had a similar problem or am I an idiot?
>
>
> >
>


--
Best regards | Schöne Grüße
Michael

Microsoft MVP - Most Valuable Professional
Microsoft MCAD - Certified Application Developer

http://weblogs.asp.net/mschwarz/
http://www.schwarz-interactive.de/
mailto:[EMAIL PROTECTED]

--~--~---------~--~----~------------~-------~--~----~
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