开发者

DropDownList + OnSelectedIndexChanged + AutoPostBack=False

开发者 https://www.devze.com 2022-12-19 18:16 出处:网络
is it possible to force dropdown list to fire OnSelectedIndexChanged event without AutoPostBack=True?

is it possible to force dropdown list to fire OnSelectedIndexChanged event without AutoPostBack=True?

i told that because i have some RadComboBoxes(telerik) I开发者_Python百科n My Form

i am controling their focus with JQuery

such as this code when my form loads:

<script src="../JQuery/jquery-1.4.1.js" language="javascript" type="text/javascript"></script>
        <script type="text/javascript">
            $(function() {
                $('input[id$=RadcbCoNameInInsert_Input]').focus();

</script>

so when AutoPostBack=True and OnSelectedIndexChanged fires after it's code telerik skin acts and finally i lost my radcombobox focus ... i mean that radcombobox skin code is against my jquery code ...

how can i force radcombo box to focus after it's postback or how can i disable it's autopostback to keep my focus on radcombobox?

(i am so amateur about jquery.)

best regards


Invoking focus() directly on a jQuery object simply invokes the onfocus (focus) event handler. You must invoke focus on the DOM elements instead, to get the browser to focus on it:

$('input[id$=RadcbCoNameInInsert_Input]').get().focus();

See http://api.jquery.com/get/ for accessing the underlying DOM elements.

0

精彩评论

暂无评论...
验证码 换一张
取 消