Note that there are some explanatory texts on larger screens.

plurals
  1. PORadcombobox won't blur when modal dialog pops up
    primarykey
    data
    text
    <p>I have a radcombobox that has both postback and non postback items within an aspx page. On one of the non postback items it pops up a modal dialog through jQuery. The code in the dialog works just find, but I have to click the action button ('Save') twice to run the dialog's code. This is due to the radcombobox having focus. Is there any way to remove focus from the radcombobox programatically so that I only click once? I have tried .blur() but it is not working. Thanks.</p> <pre><code>function onClientSelectedIndexChanged(sender, eventArgs) { var text = eventArgs.get_item().get_text(); var combo = $find("&lt;%= rdbxActions.ClientID %&gt;"); combo.set_text(text); if (text == "Filter By Date" || text == "Filter By Publication") { __doPostBack("rdbxActions", '{\"Command\" : \"Select\"}'); } else { combo.blur(); } } </code></pre> <p>Where the dialog happens...</p> <pre><code>function onClientSelectedIndexChanging(sender, eventArgs) { var text = eventArgs.get_item().get_text(); var combo = $find("&lt;%= rdbxActions.ClientID %&gt;"); combo.set_text(text); if (text != "Filter By Date" &amp;&amp; text != "Filter By Publication") { eventArgs.set_cancel(true); if (text != "Actions") { $("#dialog-save").dialog({ resizable: false, height: 170, modal: true, buttons: { "Save": function () { var pageUrl = '&lt;%=ResolveUrl("~/WebService/SaveNewSearch.asmx")%&gt;' var thisSearchName = $("#searchNameText").val(); //get current keyword string //get the parameter value $.urlParam = function (name) { var results = new RegExp('[\\?&amp;]' + name + '=([^&amp;#]*)').exec(window.location.href); return results[1] || 0; } //put url into a variable var thisKeywordString = decodeURIComponent($.urlParam('kws')); var thisUser = userLoggedIn; $.ajax({ type: "POST", url: pageUrl + "/SaveThisNewSearch", data: JSON.stringify({ searchName: thisSearchName, keywordString: thisKeywordString, userId: thisUser }), contentType: "application/json; charset=utf-8", dataType: "json", success: OnSaveSearchSuccess, error: OnSaveSearchError }); function OnSaveSearchSuccess(response) { //.text(response.d); //Show Saved Search Dialog var searchNameString = response.d; $("#dialog-modal p").text(searchNameString); //show the dialog with the save message $("#dialog-modal").dialog({ resizable: false, height: 140, hide: "fade", open: function (event, ui) { var dlg = $(this); setTimeout(function () { dlg.dialog("close"); }, 2000); }, modal: true }); } function OnSaveSearchError(response) { alert(response.status + " " + response.statusText); } $(this).dialog("close"); }, Cancel: function () { $(this).dialog("close"); } } }); } } } </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload