jquery-ui-dialog

jQuery ui dialog image for the title

与世无争的帅哥 提交于 2020-01-13 11:27:08
问题 Is it possible when specifying a jQuery UI dialog box, to have an image be placed for my title instead of just plain text? Thanks 回答1: You can provide any HTML as the title option, like this: $("#dialog").dialog({ title: '<img src="myImage.jpg" />' });​​​​​​​​​​​ You can see an example in action here Or, as another demo to annoy the hell out of your users, you could do this: $("<div />").dialog({ title: '<marquee>Hello</marquee>' });​ 来源: https://stackoverflow.com/questions/3543532/jquery-ui

JQuery Clear Form on close

随声附和 提交于 2020-01-10 03:04:49
问题 I have the below JQuery Dialog script, I'm trying to find out how to fire off a function that clears the form when I close the dialog. function clearForm() { $(':input','#calcQuery') .not(':button, :submit, :reset, :hidden') .val(''); }; // form popup $(document).ready(function() { //var dataString = $("#calcQuery").serialize(); $("#formBox").dialog({ bgiframe: true, autoOpen: false, height: 600, width: 400, modal: false, closeOnEscape: true, title: "Calculator", buttons: { "Calculate":

jQuery dialog box not in center in Chrome

落爺英雄遲暮 提交于 2020-01-06 18:45:08
问题 in FF and Internet Explorer the dialog box shws up in the center, but in chrome it ends up on the left side. How can i fix this? code ( self is the object this is in): $('form').live('submit',function(e){ e.preventDefault(); var $this = this; console.log('click submit') $('<div>', {html: 'Are you sure you want to submit this table?<br/> All undo information will be lost.'}) .dialog({ modal: true, title: 'Are You Sure?', buttons: { ok: function(){ $.get($this.action,$($this).serialize()+'&page

How to open a jQuery dialog box as login form on clicking a URL from menu bar

十年热恋 提交于 2020-01-06 13:57:49
问题 I have a menu bar. Now as per my need I have to open a login form as soon as menu bar menu is clicked. I have seen opening a jQuery dialog box with screen lock as soon as the URL is clicked and if the user has provided the correct Username and Password he will navigate to the required page else dialog box in screen Lock will say "Please Enter Correct Username and Password". Here is my menu bar link code in HTML. <div> <ul> <li><a href="extension.jsp">ExtensionWise</a></li> <li><a href=

HTML5 form validation with Html Service

家住魔仙堡 提交于 2020-01-05 12:11:30
问题 I'm trying to use HTML5 form validation when using Google Apps Script HTML Service. As another user asked, according to the documentation example, you must use a button input instead of a submit input. Using a submit button seems to do the validation, but the server function is called anyway. The answer given to that user didn't work for me. Also, I want to call two functions when submitting the form and this can make it more complex. This is what I'm trying to do: The user fills a form and I

Create button array for jquery dialog

吃可爱长大的小学妹 提交于 2020-01-05 08:38:29
问题 Is it possible to create a button array then append it to a jQuery dialog? Something along these lines. Forgive my errorful code within the for loop, just not sure how to do this at all. function setAutoDialog() { var testArray = ["T1", "T2"]; $('#autoDialog').dialog({ autoOpen: false, width: 'auto', }); var buttons = {}; for(var i=0; i<testArray.length; i++){ buttons += [testArray[ix] : Test()] } $('#autoDialog').dialog('option', 'buttons', buttons); } function Test() { alert("worked"); }

jquery dialog - which button opened the dialog?

痞子三分冷 提交于 2020-01-05 08:08:35
问题 In the example below, how can you use the event and ui objects to detect which link opened the dialog? Can't seem to get $(event.target).attr("title"); to work properly, and I'm having trouble finding documentation on the 'ui object that is passed. Thanks! $("#dialog_support_option_form").dialog({ link_title = $(event.target).attr("title"); alert(link_title); }); $("a").live("click", function() { btn_rel = $(this).attr("rel"); $(btn_rel).dialog("open"); }); <a class="btn pencil" rel="#dialog

jquery dialog - which button opened the dialog?

狂风中的少年 提交于 2020-01-05 08:07:56
问题 In the example below, how can you use the event and ui objects to detect which link opened the dialog? Can't seem to get $(event.target).attr("title"); to work properly, and I'm having trouble finding documentation on the 'ui object that is passed. Thanks! $("#dialog_support_option_form").dialog({ link_title = $(event.target).attr("title"); alert(link_title); }); $("a").live("click", function() { btn_rel = $(this).attr("rel"); $(btn_rel).dialog("open"); }); <a class="btn pencil" rel="#dialog

Dynamically choosing the close effect on a jquery-ui-dialog

最后都变了- 提交于 2020-01-04 15:14:31
问题 I'm using this dialog: $("#myDialog").dialog({ hide: {effect: "fade", duration: 3000}, buttons: { Save: function() { $.post(someurl, function() { $("#myDialog").dialog( "close" ); }); }, Cancel: function() { $("#myDialog").dialog( "close" ); } } }); I have two close actions that are different semantically: Close after success - in this case I want to slowly fade out the dialog (I'm also displaying a green Vee icon, not shown in the above code snippet). Close after cancel - I would like to

jQuery UI confirmation dialog - manipulating output

依然范特西╮ 提交于 2020-01-04 05:31:21
问题 I need to modify the dialog confirmation buttons. I want to have the confirm and cancel buttons swapped around (so cancel is to the right not the left of the confirm button). I also want to change the background image on the confirm button so that it's a different colour. I thought about doing this in seperate jQuery code so that I don't have to dig into the UI code and modify it. First of all can this be done? Secondly if I grab the div with the css class 'ui-dialog-buttonpane' as my