?
Solved

what is wrong with this syntax ?

Posted on 2009-06-29
2
Medium Priority
?
385 Views
Last Modified: 2012-05-07
I am getting a javascript error when I put this syntax on aspx page - what is wrong with this  OnClientSelectedIndexChanged='<%# "ShowPercentage(\"" + Container.FindControl("rcbActivityCodes").ClientID + "\",  \"" + Container.FindControl("rntPercentage").ClientID + "\")" %>' ?  
                 
<telerik:RadComboBox ID="rcbActivityCodes"  EnableAjaxSkinRendering="true" runat="server"
                       OnClientSelectedIndexChanged='<%# "ShowPercentage(\"" + Container.FindControl("rcbActivityCodes").ClientID + "\",  \"" + Container.FindControl("rntPercentage").ClientID + "\")" %>' >

Open in new window

0
Comment
Question by:tech_question
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 39

Expert Comment

by:abel
ID: 24740278
That depends on what that renders to when your page is loaded and/or whether ShowPercentage does not exist and/or what error you get. Can you update with answers to these three questions?
0
 
LVL 12

Accepted Solution

by:
wht1986 earned 2000 total points
ID: 24740322
On the telerik controls, you can specify that function.  OnClientSelectedIndexChanged has a specific signature it looks for.  Please see the documentation here
http://www.telerik.com/help/aspnet-ajax/combo_clientsideonclientselectedindexchanged.html

basically all you can do is specify the name of the jabascript method
<telerik:RadComboBox  ID="RadComboBox1"  runat="server" OnClientSelectedIndexChanged="OnClientSelectedIndexChanged" />

The parameter values are set by telerik code
function OnClientSelectedIndexChanged(sender, eventArgs)
{
 var item = eventArgs.get_item();
 sender.set_text("You selected " + item.get_text());
}
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses
Course of the Month10 days, 18 hours left to enroll

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question