This is a migrated thread and some comments may be shown as answers.

Javascript Warning Expected Expression

1 Answer 107 Views
Grid
This is a migrated thread and some comments may be shown as answers.
David Penny
Top achievements
Rank 2
David Penny asked on 10 Oct 2008, 11:31 AM
Hi,

I have been using the following Javascript to get the current values from a Combox for a while now.  Have recently updated to VS2008 and I now get a warning squiggle which says "Expected Expression".

var
ProjectsCombo = <%=ddlProject.ClientID %>;

Everything still seems to work OK, but I was just wondering whether I should be using a different syntax here to avoid the warning?

I am using the RadControls for ASP.NET Ajax Q2 2008 with latest service pack.

David Penny

 

1 Answer, 1 is accepted

Sort by
0
Yana
Telerik team
answered on 10 Oct 2008, 12:36 PM
Hi David,

I suggest you use the following code to get the client-side object of RadComboBox:

var ProjectsCombo = $find("<%= ddlProject.ClientID %>");  

Regards,
Yana
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Grid
Asked by
David Penny
Top achievements
Rank 2
Answers by
Yana
Telerik team
Share this question
or