Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / ASP.NET > Combobox > Javascript error - Object doesn't support this property or method.
RadControls for ASP.NET are no longer supported (see this page for reference). In case you have inquiries about the Telerik ASP.NET AJAX controls, post them in the pertinent ASP.NET AJAX forums.

Not answered Javascript error - Object doesn't support this property or method.

Feed from this thread
  • Sid avatar

    Posted on Apr 4, 2011 (permalink)

    Hi,

    This is code I use in RadComboBox in OnClientBlur="StopPostBack" event.

    function StopPostBack(sender, args) {
            args.set_cancel(true);
    }

    It's working Ok in Firefox but not in IE8.
    In IE8 I'm getting following error: Object doesn't support this property or method.

    Best Regards

  • Posted on Apr 5, 2011 (permalink)

    Hello,


    One suggestion would be invoking postback explicitly whenever you need instead of setting AutoPostBack ptoprty to "True".

    A sample code, you can find here:
    Autopostback only when list item selected and not text entered

    Also, go through the following forum: Disable postback

    Thanks,
    Princy.

  • Sid avatar

    Posted on Apr 5, 2011 (permalink)

    Yes I also tried suggested solutions with AutoPostBack=false and triggering PostBack in JavaScript, but then I run into two new problems or strange behaviours caused by JS __doPostBack;
    1. I'm using UpdateProgress control to display some animation during PostBack, if PostBack is triggered with JS __doPostBack, UpdateProgress animation is not displayed.
    2. I'm also using ModalPopupExtender which is displaced when i use JS __doPostBack.

    Thanks,
    Sid

  • Dimitar Terziev Dimitar Terziev admin's avatar

    Posted on Apr 12, 2011 (permalink)

    Hi Sid,

    Could you specify what exactly is the scenario that you want to implement.

    In general the OnClientBlur event doesn't have event arguments as input parameter and most important this event could not be canceled. The only input parameter is an instance of the combobox which has fired the event.

    The event handler function declaration is as following:
    function OnClientBlur(combobox)
    {
        //custom implementation
    }



    Greetings,
    Dimitar Terziev
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get now >>

  • Sid avatar

    Posted on Apr 13, 2011 (permalink)

    Hi,

    I'm using RadComboBox with AutoPostBack="true", because I'm handling OnIndexChanged event.
    The problem is when I click on RadComboBox just to open it and then click outside (not selecting item) of RadComboBox then PostBack is triggered. This is not Ok, because I want to trigger PostBack just on OnIndexChanged. So I try to stop postback on client side with OnClientBlur event.

    As I described in previous post triggering postback with javascript is not an option, because it change behavior of my form.

    regards

  • Dimitar Terziev Dimitar Terziev admin's avatar

    Posted on Apr 19, 2011 (permalink)

    Hi Sid,

    Could you specify whether you are using our classic control or RadControls for ASP.NET AJAX ?

    In case you are using the classic controls, my suggestion is to subscribe on the OnClientSelectedIndexChanging event and cancel it, if there is not item selected. Thus the server-side SelectedIndexChanged event won't be fired. In order to cancel the client-side event just return false in the event handler function.

    Regards,
    Dimitar Terziev
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get now >>

  • Sid avatar

    Posted on Apr 20, 2011 (permalink)

    Hi,

    I'm using RadControls for ASP.NET AJAX.

    best regards

  • Dimitar Terziev Dimitar Terziev admin's avatar

    Posted on Apr 26, 2011 (permalink)

    Hello Sid,

    In case you are using the Ajax suit of our controls, you could adopt the same approach, but this time you should cancel the OnClientSelectedIndexChanging event using the set_cancel method of the event arguments.

    Regards,
    Dimitar Terziev
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get now >>

  • Sid avatar

    Posted on May 6, 2011 (permalink)

    Hi,
    I came up with this code
    function CancelPostBack(sender, eventArgs) {
        // alert(sender.get_selectedIndex());
        if (sender.get_selectedIndex() == 0) {
            eventArgs.set_cancel(true);
        }
    }

    which cancels post back if index is 0. Why 0? Because if I click outside of combo returned selected index is 0.
    But this function doesn't work, because default value (when combo is loaded) of index is also 0 so now postback never happen?!?
    How can I determine If click was made outside combo box?
    regards

  • Dimitar Terziev Dimitar Terziev admin's avatar

    Posted on May 11, 2011 (permalink)

    Hello Sid,

    In case you don't have AllowCustomText  set to True, then the first item will always be preselected.

    What seems strange is the fact that, if you don't have AllowCustomText set and you open the RadComboBox without making any selection and then click somewhere else on the page, the server-side OnSelectedIndexChanged shouldn't be fired.

    Could you specify the exact version of the controls you are using?

    Greetings,
    Dimitar Terziev
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get now >>

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / ASP.NET > Combobox > Javascript error - Object doesn't support this property or method.