Solved

what is wrong with this syntax ?

Posted on 2009-06-29
2
378 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
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 500 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, just open a new email message. In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…

864 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now