Search Results

Search found 21131 results on 846 pages for 'jquery dialog'.

Page 6/846 | < Previous Page | 2 3 4 5 6 7 8 9 10 11 12 13  | Next Page >

  • Changing the title of jQuery-UI dialog-box with in another dialog-box's function...

    - by Brian Ojeda
    Why doesn't doesn't the second jQuery-UI dialog box title change when popped. The first dialog box I change the title of the box with using the following .attr("title", "Confirm") -- it change the title of the first box to 'Confirm', like it should have. Now when the second box pops up it should change the title to 'Message' since did the same thing for the second box -- .attr("title", "Message"). Right? But it doesnt. It keep the title from before. However, the message change like it should have. I have tested in IE8, Chrome, and FF3.6. <div id="dialog-confirm" title=""></div> <-- This is the html before jQuery functions. Javascript / jQuery $('#userDelete').click(function() { $(function() { var dialogIcon = "<span class=\"ui-icon ui-icon-alert\"></span>"; var dialogMessage = dialogIcon + "Are you sure you want to delete?"; $("#dialog-confirm").attr("title", "Confirm").html(dialogMessage).dialog({ resizable: false, height: 125, width: 300, modal: true, buttons: { 'Delete': function() { $(this).dialog('close'); $.post('user_ajax.php', {action: 'delete', aId: $('[name=aId]').val() }, function(data) { if(data.success){ var dialogIcon = "<span class=\"ui-icon ui-icon-info\"></span>"; var dialogMessage = dialogIcon + data.message; $('#dialog-confirm').attr("title", "Message"); $('#dialog-confirm').html(dialogMessage); $('#dialog-confirm').dialog({ resizable: false, height: 125, width: 300, modal: true, buttons: { 'Okay': function() { $(this).dialog('close'); var url = $_httpaddress + "admin/index.php" $(location).attr('href',url); } // End of Okay Button Function } //--- End of Dialog Button Script });//--- End of Dialog Function } else { $_messageConsole.slideDown(); $_messageConsole.html(data.message); } }, 'json'); }, //--- End of Delete Button Function 'Cancel': function() { $(this).dialog('close'); } //--- End of Cancel Button Function } //--- End of Dialog Button Script }); //--- End of Dialog Script }); //--- End of Dialog Function return false; }); Thank you for you assistant, if you choose to help.

    Read the article

  • CKEditor Modal Issues.

    - by RavenHursT
    So I'm using CKeditor inside of a jQueryUI dialog. The issue I'm having is when you click on a button like the "link" button, the modal that pops up, won't let me type anything into it's inputs. I can change the values of the pull downs, I can drag the modal around the screen, and I can click on the buttons. But when I attempt to type into the text inputs, nothing happens. Has anyone else come across this? If so, did they find a solution? Thanks! Maybe this has something to do with it? http://dev.jqueryui.com/ticket/4309 But I'm using 1.7.2...

    Read the article

  • How to get the Focus on one of Buttons of JQuery Dialog on ASP.NET MVC page?

    - by Rita
    Hi I have an ASP.NET MVC page(Registration). On loading the page, i am calling Jquery Dialog with Agree and Disagree buttons on that Dialog. 1). How to set the focus to Agree button by default? 2). How to disable the X (Close) Mark that is on Top right corner? (So that i don't want the user to close that dialog simply). Code: $("#dialog-confirm").dialog({ closeOnEscape: false, autoOpen: <%= ViewData["autoOpen"] %>, height: 400, width: 550, modal: true, buttons: { 'Disagree': function() { location.href = "/"; }, 'Agree': function() { $(this).dialog('close'); $(this).focus(); } }, beforeclose: function(event, ui) { var i = event.target.id; var j = 0; } }); Appreciate your responses. Thanks

    Read the article

  • How do I get a jQuery dialog window to display only if a form validates when I click the submit butt

    - by user338413
    I've got a form that is using jQuery validation. When the user clicks the submit button, a dialog window displays thatshows the fields the user filled out along with the data the user entered. It asks the user if this information is correct. If it is, the user clicks the submit button in the dialog window and the form is submitted. If the user clicks the 'Fix it' button, the dialog window closes and the user returns to the form. My problem is my dialog window displays when the user clicks the form's submit button even if there are errors in the form. I only want to display the dialog window if the form data is validated by jQuery. How do I do this? I'm thinking of something like: if ((#form).validates() == true) { $('#verification_dialog').dialog('open'); } Is there a way in jQuery to determine whether the whole form has validated? Or do I have to create my own function to do this?

    Read the article

  • Jquery UI dialog initiation? Is there a way to bind it?

    - by Raja
    I am trying to bind the dialog initiation (which happens in document ready) to a live or delegate for a div. Something like this for click event: $("#divSelectedContacts").delegate("span", "hover", function () { $(this).toggleClass("strikeOut"); }); for this: $("#divContacts").dialog('destroy').dialog({ bgiframe: true, resizable: false, autoOpen: false, height: 600, width: 425, modal: true, overlay: { backgroundColor: '#000', opacity: 0.5 }, buttons: { Cancel: function () { //basically do nothing $(this).dialog("close"); }, 'Done': function () { //get all the selected ppl and store it in To //alert($("#divSelectedContacts").html()); $("#divTo").empty().html($("#divSelectedContacts").html()); $(this).dialog("close"); } } }); Is this possible to use delegate for this so that it is bound forever? The main problem is I dynamically load the html in one of the tabs and when I include the dialog script in the HTML then it creates multiple dialogs and does not work. Any help is much appreciated. Thanks in advance.

    Read the article

  • Looking into the JQuery Image Zoom Plugin

    - by nikolaosk
    I have been using JQuery for a couple of years now and it has helped me to solve many problems on the client side of web development.  You can find all my posts about JQuery in this link. In this post I will be providing you with a hands-on example on the JQuery Image Zoom Plugin.If you want you can have a look at this post, where I describe the JQuery Cycle Plugin.You can find another post of mine talking about the JQuery Carousel Lite Plugin here.I will be writing more posts regarding the most commonly used JQuery Plugins. I have been using extensively this plugin in my websites.You can use this plugin to move mouse around an image and see a zoomed in version of a portion of it. In this hands-on example I will be using Expression Web 4.0.This application is not a free application. You can use any HTML editor you like. You can use Visual Studio 2012 Express edition. You can download it here.  You can download this plugin from this link I launch Expression Web 4.0 and then I type the following HTML markup (I am using HTML 5) <html lang="en">  <head>    <title>Liverpool Legends</title>        <meta http-equiv="Content-Type" content="text/html;charset=utf-8" >        <link rel="stylesheet" type="text/css" href="style.css">        <script type="text/javascript" src="jquery-1.8.3.min.js"> </script>     <script type="text/javascript" src="jqzoom.pack.1.0.1.js"></script>        <script type="text/javascript">        $(function () {            $(".nicezoom").jqzoom();        });    </script>       </head>  <body>    <header>        <h1>Liverpool Legends</h1>    </header>        <div id="main">            <a href="championsofeurope-large.jpg" class="nicezoom" title="Champions">        <img src="championsofeurope.jpg"  title="Champions">    </a>          </div>            <footer>        <p>All Rights Reserved</p>      </footer>     </body>  </html>   This is a very simple markup. I have added one large and one small image (make sure you use your own when trying this example) I have added references to the JQuery library (current version is 1.8.3) and the JQuery Image Zoom Plugin. Then I add 2 images in the main div element.Note the class nicezoom inside the href element. The Javascript code that makes it all happen follows.    <script type="text/javascript">        $(function () {            $(".nicezoom").jqzoom();        });    </script>     It couldn't be any simpler than that. I view my simple in Internet Explorer 10 and it works as expected. I have tested this simple solution in all major browsers and it works fine.Inside the head section we can add another Javascript script utilising some more options regarding the zoom plugin.   <script type="text/javascript">            $(function () {        var options = {                  zoomType: 'standard',                  lens:true,                  preloadImages: true,                  alwaysOn:false,                  zoomWidth: 400,                  zoomHeight: 350,                  xOffset:190,                  yOffset:80,                  position:'right'                          };          $('.nicezoom').jqzoom(options);      });         </script> I would like to explain briefly what some of those options mean. zoomType - Other admitted option values are 'reverse','drag','innerzoom' zoomWidth - The popup window width showing the zoomed area zoomHeight - The popup window height showing the zoomed area xOffset - The popup window x offset from the small image.  yOffset - The popup window y offset from the small image.  position - The popup window position.Admitted values:'right' ,'left' ,'top' ,'bottom' preloadImages - if set to true,jqzoom will preload large images. You can test it yourself and see the results in your favorite browser. Hope it helps!!!

    Read the article

  • jquery.ui.draggable.js and jquery.ui.widget.js conflict

    - by Daniel S
    hello I had a working application, which uses a jquery ui dialog. I wanted to make the dialog draggable. As far as I know the only thing needed is the jquery.ui.draggable.js script. So I added it to the scripts I am using, but know I get the following error (as shown in the firebug console): base is not a constructor The relevante line in jquery.ui.widget.js is: var basePrototype = new base(); This is how I am adding all the scripts: <script type="text/javascript" src="/media/development-bundle/jquery-1.4.2.js"></script> <script type="text/javascript" src="/media/development-bundle/ui/jquery.ui.core.js"></script> <script type="text/javascript" src="/media/development-bundle/ui/jquery.ui.widget.js"></script> <script type="text/javascript" src="/media/development-bundle/ui/jquery.ui.draggable.js"></script> <script type="text/javascript" src="/media/development-bundle/ui/jquery.ui.position.js"></script> <script type="text/javascript" src="/media/development-bundle/ui/jquery.ui.autocomplete.js"></script> <script type="text/javascript" src="/media/development-bundle/ui/jquery.ui.dialog.js"></script> Am I doing something wrong? or is this a problem with jquery? Thanks in advance for any help

    Read the article

  • JQuery Autocomplete plugin not working with JQuery 1.4.1

    - by Russ Clark
    I've been using the JQuery Autocomplete plugin with JQuery version 1.3.2, and it has been working great. I recently updated JQuery in my project to version 1.4.2, and the Autocomplete plugin is now broken. The JQuery code to add items to a textbox on my web page doesn't seem to be getting called at all. Does anyone know if the JQuery Autocomplete plugin is incompatible with JQuery version 1.4.2, and if there is a fix for this problem? Here is some sample code I've built in an ASP.Net web site (which works fine if I change the JQuery file to jquery-1.3.2.js, but nothing happens using jquery-1.4.2.js): <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title>Untitled Page</title> <script type="text/javascript" src="js/jquery-1.4.2.js" ></script> <script type="text/javascript" src="js/jquery.autocomplete.js" ></script> <script type="text/javascript"> $(document).ready(function() { var data = "Core Selectors Attributes Traversing Manipulation CSS Events Effects Ajax Utilities".split(" "); $(':input:text:id$=sapleUser').autocomplete(data); }); </script> </head> <body> <form id="form1" runat="server"> API Reference: <input id="sapleUser" autocomplete="off" type="text" runat="server" /> (try "C" or "E") </form> </body> </html>

    Read the article

  • Include OpenX ad in a jquery-ui dialog?

    - by planetclaire
    I'm loading some content into a jquery-ui dialog via .ajax. That's all working fine but now I've been given an OpenX ad to embed into the dialog & can't figure out how to do it. I know all the script is stripped when coming in via ajax, & I know how to use $.getScript to load .js files for use in the dialog, but the OpenX ad script I've got uses document.write so I think it's expecting to be embedded inline into the desired position on the page. I've tried appending the escaped script string into the div on ajax success of the main content as below, but this results in the page being redirected to a page with just the ad on it. Attempt shown below: $("#" + idHelpPage).find(".adScript").append("<script type='text/javascript'>var m3_u = (location.protocol=='https:'?'https://d1.openx.org/ajs.php':'http://d1.openx.org/ajs.php');var m3_r = ... etc etc I'm ok with jquery but not great with javascript, would really appreciate any help! Also if you want to see any other code.

    Read the article

  • add new option to dropdownlist after jquery dialog and post

    - by RememberME
    I have a form to enter subcontracts. On this form I have a dropdownlist of all companies in the system. Next to it is a button "Create Company". This button opens a jquery dialog which allows the user to create a new company. Once the dialog closes, the new company needs to be added to the dropdownlist and selected. If I refresh, it's there, but I need to do it without refreshing the form b/c I don't want the user to loose everything that they've entered into the other fields. I'm not sure how to do this b/c I don't have the guid of the new company. My jquery dialog: $('#popupCreateCompany').dialog( { autoOpen: false, modal: true, buttons: { 'Add': function() { var dialog = $(this); var form = dialog.find('input:text, select'); $.post('/company/create', $(form).serialize(), function() { dialog.dialog('close'); }) }, 'Cancel': function() { $(this).dialog('close'); } } }); $("#create-company").click(function() { $('#popupCreateCompany').dialog('open'); }); Company field: <label for="company">Company:</label> <%= Html.DropDownList("company", Model.SelectCompanies, "** Select Company **") %> <%= Html.ValidationMessage("Company", "*") %> <button type="button" id="create-company" >Create Company</button>

    Read the article

  • IE7 is not positioning dialog properly on window resize

    - by Ergec
    Like I said, IE7 (and IE6 but I don't really care IE6 that much) doesn't position dialog properly on window resize. When window is re sized, dialog goes down and down. IE8 FF Chrome Safari all work properly and position and re size dialog just fine but IE7 it re sizes the dialog but positions incorrectly. Anybody know some fix about this? $("#mydialog").dialog({ autoOpen: false, bgiframe: true, resizable: false, modal: true, title: "", height: 400, overlay: { backgroundColor: '#000', opacity: 0.5 } }); $(window).resize(function(){ $('#mydialog').dialog("option", "height", $(window).height() - 40); $('#mydialog').dialog('option', 'position', 'center'); }); $("#mydialog").dialog("open");

    Read the article

  • JqueryUI dialog box causes button to lose styling

    - by superexsl
    Hey everyone, I'm using JQueryUI dialog boxes and, while it works, it seems to remove any CSS styling on the button that opens the dialog. I have to manually refresh the page to get the styling back. An example button which launches the dialog: (button_submit is my CSS theme and launc_popup is used to detect the button click in JQuery. <asp:Button ID="btnLaunch" CssClass="button_sub launch_popup" runat="server" Text="Dialog..." CausesValidation="false" OnClientClick="return false;" /> My jquery: $('.launch_popup').click(function() { $("#dialog-form").dialog("open"); }); My dialog-form: $("#dialog-form").dialog({ autoOpen: false, height: 300, width: 300, modal: true, buttons: { 'Close': function() { $(this).dialog('close'); } } }); This happens to all the buttons that open dialogs. Is there a way to 'restyle' the button without refreshing the page? (It's in an updatepanel if that makes a difference, although this bit's client-side so not sure if that should affect it). Thanks for any help

    Read the article

  • Problem for opening jQuery dialog box in ie8

    - by user291247
    Hello, I am using jQuery dialog box and having problem to open it in ie8 in other browsers it will opens but having problem in ie8 only. Also I have one more problem some times ajax request is not working in my dialog box on any browser. code. // Dialog $('#login_div').dialog({ autoOpen: false, width: 600, buttons: { "Cancel": function() { $(this).dialog("close"); } } }); // Dialog Link - login_div $('#dialog_link').click(function(){ $('#login_div').dialog({ autoOpen: false }); //$('#login_div').show(); $('#login_div').dialog('open'); return false; });

    Read the article

  • Jquery Dialog - Is there a way to open it without registering it using .dialog?

    - by Raja
    This is my problem. I have a page with multiple tabs. I load those tabs dynamically and one of those tabs is a message container (mail). Every time I click a folder link (Inbox, Sent Mail etc) I reload just that tab alone with appropriate content. I use Jquery dialog to pick contacts and I have to load contacts everytime. Since I reload the whole tab content every time JQuery Dialog registers (or creates) the whole div content. To avoid this I did this: if ($("#ui-dialog-title-divContacts").length == 0) { //if dialog data is not created then make dialog $("#divContacts").dialog({ bgiframe: true, resizable: false, autoOpen: false, height: 600, width: 425, modal: true, overlay: { backgroundColor: '#000', opacity: 0.5 }, buttons: { Cancel: function () { //basically do nothing $(this).dialog("close"); }, 'Done': function () { $("#divTo").empty().html($("#divSelectedContacts").html()); $(this).dialog("close"); } } }); } I went to generated viewsource in FF and found that only one instance is being created. My problem now is it is not showing the dialog. Is there a way by which I can open this dialog without registering it. Any help is much appreciated.

    Read the article

  • Appending html code to a section inside a dialog window isn't working in IE6

    - by user338413
    I'm using jQuery's validation on a form. When the form is validated, I'm using a submitHandler to fill a dialog with data from the form then I open the dialog to display it. Works great except for in IE6. Nothing displays. I've tried initializing the dialog before and after running the validation code but neither makes a difference. Here's the validation code: $("#acct").validate({ ... submitHandler: function() { fillVerificationDialog(); $("#verification_dialog").dialog('open'); return false; } }); Here's the fillVerificationDialog: function fillVerificationDialog() { $("#dialog-data").empty(); $("<span class='label'>").text("First Name: ").appendTo("#dialog-data"); $("<span class='value'>").text($("#firstname").val()).appendTo("#dialog-data"); $("<br/>").appendTo("#dialog-data"); ... }

    Read the article

  • jquery ui dialog - live not working?

    - by ile
    I'm using this dialog: http://docs.jquery.com/UI/Dialog To open dialog I do it this way: $('a.openModal').live("click", function() { var idArr = $(this).attr('id').split("OpenNote"); var id = idArr[1]; alert($(".modalNote#dialog-modal" + id).html()); $(".modalNote#dialog-modal" + id).dialog('open'); return false; }); This dialog is used to display content of note when title is clicked. When I generated html on pageload, then this works fine, but if I add html dynamically then dialog won't open. It is also not hidden when it's appended to div. Is it possible to open it "on-fly"?

    Read the article

  • Ajax-based data loading using jQuery.load() function in ASP.NET

    - by hajan
    In general, jQuery has made Ajax very easy by providing low-level interface, shorthand methods and helper functions, which all gives us great features of handling Ajax requests in our ASP.NET Webs. The simplest way to load data from the server and place the returned HTML in browser is to use the jQuery.load() function. The very firs time when I started playing with this function, I didn't believe it will work that much easy. What you can do with this method is simply call given url as parameter to the load function and display the content in the selector after which this function is chained. So, to clear up this, let me give you one very simple example: $("#result").load("AjaxPages/Page.html"); As you can see from the above image, after clicking the ‘Load Content’ button which fires the above code, we are making Ajax Get and the Response is the entire page HTML. So, rather than using (old) iframes, you can now use this method to load other html pages inside the page from where the script with load function is called. This method is equivalent to the jQuery Ajax Get method $.get(url, data, function () { }) only that the $.load() is method rather than global function and has an implicit callback function. To provide callback to your load, you can simply add function as second parameter, see example: $("#result").load("AjaxPages/Page.html", function () { alert("Page.html has been loaded successfully!") }); Since load is part of the chain which is follower of the given jQuery Selector where the content should be loaded, it means that the $.load() function won't execute if there is no such selector found within the DOM. Another interesting thing to mention, and maybe you've asked yourself is how we know if GET or POST method type is executed? It's simple, if we provide 'data' as second parameter to the load function, then POST is used, otherwise GET is assumed. POST $("#result").load("AjaxPages/Page.html", { "name": "hajan" }, function () { ////callback function implementation });   GET $("#result").load("AjaxPages/Page.html", function () { ////callback function implementation });   Another important feature that $.load() has ($.get() does not) is loading page fragments. Using jQuery's selector capability, you can do this: $("#result").load("AjaxPages/Page.html #resultTable"); In our Page.html, the content now is: So, after the call, only the table with id resultTable will load in our page.   As you can see, we have loaded only the table with id resultTable (1) inside div with id result (2). This is great feature since we won't need to filter the returned HTML content again in our callback function on the master page from where we have called $.load() function. Besides the fact that you can simply call static HTML pages, you can also use this function to load dynamic ASPX pages or ASP.NET ASHX Handlers . Lets say we have another page (ASPX) in our AjaxPages folder with name GetProducts.aspx. This page has repeater control (or anything you want to bind dynamic server-side content) that displays set of data in it. Now, I want to filter the data in the repeater based on the Query String parameter provided when calling that page. For example, if I call the page using GetProducts.aspx?category=computers, it will load only computers… so, this will filter the products automatically by given category. The example ASPX code of GetProducts.aspx page is: <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="GetProducts.aspx.cs" Inherits="WebApplication1.AjaxPages.GetProducts" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title></title> </head> <body> <form id="form1" runat="server"> <div> <table id="tableProducts"> <asp:Repeater ID="rptProducts" runat="server"> <HeaderTemplate> <tr> <th>Product</th> <th>Price</th> <th>Category</th> </tr> </HeaderTemplate> <ItemTemplate> <tr> <td> <%# Eval("ProductName")%> </td> <td> <%# Eval("Price") %> </td> <td> <%# Eval("Category") %> </td> </tr> </ItemTemplate> </asp:Repeater> </ul> </div> </form> </body> </html> The C# code-behind sample code is: public partial class GetProducts : System.Web.UI.Page { public List<Product> products; protected override void OnInit(EventArgs e) { LoadSampleProductsData(); //load sample data base.OnInit(e); } protected void Page_Load(object sender, EventArgs e) { if (Request.QueryString.Count > 0) { if (!string.IsNullOrEmpty(Request.QueryString["category"])) { string category = Request.QueryString["category"]; //get query string into string variable //filter products sample data by category using LINQ //and add the collection as data source to the repeater rptProducts.DataSource = products.Where(x => x.Category == category); rptProducts.DataBind(); //bind repeater } } } //load sample data method public void LoadSampleProductsData() { products = new List<Product>(); products.Add(new Product() { Category = "computers", Price = 200, ProductName = "Dell PC" }); products.Add(new Product() { Category = "shoes", Price = 90, ProductName = "Nike" }); products.Add(new Product() { Category = "shoes", Price = 66, ProductName = "Adidas" }); products.Add(new Product() { Category = "computers", Price = 210, ProductName = "HP PC" }); products.Add(new Product() { Category = "shoes", Price = 85, ProductName = "Puma" }); } } //sample Product class public class Product { public string ProductName { get; set; } public decimal Price { get; set; } public string Category { get; set; } } Mainly, I just have sample data loading function, Product class and depending of the query string, I am filtering the products list using LINQ Where statement. If we run this page without query string, it will show no data. If we call the page with category query string, it will filter automatically. Example: /AjaxPages/GetProducts.aspx?category=shoes The result will be: or if we use category=computers, like this /AjaxPages/GetProducts.aspx?category=computers, the result will be: So, now using jQuery.load() function, we can call this page with provided query string parameter and load appropriate content… The ASPX code in our Default.aspx page, which will call the AjaxPages/GetProducts.aspx page using jQuery.load() function is: <asp:RadioButtonList ID="rblProductCategory" runat="server"> <asp:ListItem Text="Shoes" Value="shoes" Selected="True" /> <asp:ListItem Text="Computers" Value="computers" /> </asp:RadioButtonList> <asp:Button ID="btnLoadProducts" runat="server" Text="Load Products" /> <!-- Here we will load the products, based on the radio button selection--> <div id="products"></div> </form> The jQuery code: $("#<%= btnLoadProducts.ClientID %>").click(function (event) { event.preventDefault(); //preventing button's default behavior var selectedRadioButton = $("#<%= rblProductCategory.ClientID %> input:checked").val(); //call GetProducts.aspx with the category query string for the selected category in radio button list //filter and get only the #tableProducts content inside #products div $("#products").load("AjaxPages/GetProducts.aspx?category=" + selectedRadioButton + " #tableProducts"); }); The end result: You can download the code sample from here. You can read more about jQuery.load() function here. I hope this was useful blog post for you. Please do let me know your feedback. Best Regards, Hajan

    Read the article

  • Re-opening closed dialog puts it in the start position after moving it

    - by semmelbroesel
    I'm using multiple instances of the JQuery-UI dialog along with draggable and resizable. Whenever I drag or resize one of the dialog boxes, the position and dimensions of the current box are saved to a database and then loaded the next time the page opens. This is working well. However, when I close a dialog box and re-open it using a button, jQuery sets the position of the box back to its original location in the center of the screen. Furthermore, I use a show effect to slide the box off to the left on closing and in from the left on re-opening. I found two ways to update its position when the slide in animation is done, however, it still slides into the center of the screen, and I have yet to find a way to get it to slide in towards the location it is supposed to have. Here are the parts of the code that play a part in this: $('.box').dialog({ closeOnEscape: false, hide: { effect: "drop", direction: 'left' }, beforeClose: function (evt, ui){ var $this = $(this); SavePos($this); // saves the dimensions to db }, dragStop: function() { var $this = $(this); SavePos($this); }, resizeStop: function() { var $this = $(this); SavePos($this); }, open: function() { var $this = $(this); $this.dialog('option', { show: { effect: "drop", direction: 'left'} } ); if (init) // meaning only load this code when the page has finished initializing { // tried it both ways - set the position before and after the effect - no success UpdatePos($this.attr('id')); // I tried this section with promise() and effect / complete - I found no difference $this.parent().promise().done(function() { UpdatePos($this.attr('id')); }); } } }); function UpdatePos(key) { // boxpos is an object holding the position for each box by the box's id var $this = $('#' + key); //console.log('updating pos for box ' + boxid); if ($this && $this.hasClass('ui-dialog-content')) { //console.log($this.dialog('widget').css('left')); $this.dialog('option', { width: boxpos[key].width, height: boxpos[key].height }); $this.dialog('widget').css({ left: boxpos[key].left + 'px', top: boxpos[key].top + 'px' }); //console.log('finished updating pos'); //console.log($this.dialog('widget').css('left')); } } The button that re-opens the box has this code on it to make that happen: var $box = $('#boxid'); if ($box) { if ($box.dialog('isOpen')) { $box.dialog('moveToTop'); } else { $box.dialog("open") } } I don't know what jQuery-UI does to the box as it hides it (other than display:none) or to make it slide in, so maybe there's something I'm missing here that might help... Basically, I need JQuery to remember the box' position and put the box back into that location when it is re-opened. It took me days to make it this far, but this is one obstacle I have yet to overcome. Maybe there's a different way I can re-open the box? Thanks! EDIT: Forgot - this issue ONLY happens when I use my UpdatePos function to set the location of a box (i.e. on page load). When I drag a box with my mouse, close it, and re-open it, everything works. So I'm guessing there's one more storage location for the box' position that I'm missing here... EDIT2: After more messing with it, my code for debugging now looks like this: open: function() { var $this = $(this); console.log('box open'); console.log($this.dialog('widget').position()); // { top=0, left=-78.5} console.log($this.dialog('widget').css('left')); $this.dialog('option', { show: { effect: "drop", direction: 'left'} } ); if (init) { UpdatePos($this.attr('id')); $this.parent().promise().done(function() { console.log($this.dialog('widget').position()); // { top=313, left=641.5} console.log($this.dialog('widget').css('left')); UpdatePos($this.attr('id')); console.log($this.dialog('widget').position()); // { top=121, left=107} console.log($this.dialog('widget').css('left')); }); } The results I'm getting are: box open Object { top=0, left=-78.5} -78.5px Object { top=313, left=641.5} 641.5px Object { top=121, left=107} 107px So looks to me as if the widget is being moved off screen (left=-78.5) and then moved for the animation, and then my code moves it into the location that it should be in (121/107). The position() results for $box.position() or $box.dialog().position() do not change during this debugging section. Maybe this will help someone here - I'm still out of ideas here... ... and I just discovered that when I drag the item around myself, then close and re-open it, it is very unpredictable. Sometimes, it will end up in the correct location horizontally, but not vertically. Sometimes, it will end up back in the center of the screen...

    Read the article

  • Looking into the JQuery Carousel Lite Plugin

    - by nikolaosk
    I have been using JQuery for a couple of years now and it has helped me to solve many problems on the client side of web development. You can find all my posts about JQuery in this link. In this post I will be providing you with a hands-on example on the JQuery Carousel Lite Plugin.If you want you can have a look at this post, where I describe the JQuery Cycle Plugin. I will be writing more posts regarding the most commonly used JQuery Plugins. I have been using extensively this plugin in my websites.You can show a portion of a set of images with previous and next navigation.In this hands-on example I will be using Expression Web 4.0.This application is not a free application. You can use any HTML editor you like.You can use Visual Studio 2012 Express edition. You can download it here. You can download this plugin from this linkI launch Expression Web 4.0 and then I type the following HTML markup (I am using HTML 5)<html lang="en">  <head>    <title>Liverpool Legends</title>        <meta http-equiv="Content-Type" content="text/html;charset=utf-8" >        <link rel="stylesheet" type="text/css" href="style.css">        <script type="text/javascript" src="jquery-1.8.3.min.js"> </script>     <script type="text/javascript" src="jcarousellite_1.0.1.min.js"></script>      <script type="text/javascript">        $(function () {            $(".theImages").jCarouselLite({                btnNext: "#Nextbtn",                btnPrev: "#Previousbtn"            });        });    </script>       </head>  <body>    <header>        <h1>Liverpool Legends</h1>    </header>        <div id="main">           <img id="Previousbtn" src="previous.png" />        <div class="theImages">            <ul>                <li><img src="championsofeurope.jpg"></li>                <li><img src="steven_gerrard.jpg"></li>                <li><img src="ynwa.jpg"></li>                <li><img src="dalglish.jpg"></li>                <li><img src="Souness.jpg"></li>                  </ul>    </div>    <img id="Nextbtn" src="next.png" />          </div>            <footer>        <p>All Rights Reserved</p>      </footer>     </body>  </html>  This is a very simple markup. I have added my photos (make sure you use your own when trying this example)I have added references to the JQuery library (current version is 1.8.3) and the JQuery Carousel Lite Plugin. Then I add 5 images in the theImages div element.The Javascript code that makes it all happen follows.  <script type="text/javascript">        $(function () {            $(".theImages").jCarouselLite({                btnNext: "#Nextbtn",                btnPrev: "#Previousbtn"            });        });    </script>I also have added some basic CSS style rules in the style.css file. body{background-color:#efefef;color:#791d22;}       #Previousbtn{position:absolute; left:5px; top:100px;}#Nextbtn {position:absolute; left:812px; top:100px;}.theImages {margin-left:145px;margin-top:10px;} It couldn't be any simpler than that. I view my simple in Internet Explorer 10 and it works as expected.I have tested this simple solution in all major browsers and it works fine.Hope it helps!!!

    Read the article

  • Looking into the JQuery Cycle Plugin

    - by nikolaosk
    I have been using JQuery for a couple of years now and it has helped me to solve many problems on the client. You can find all my posts about JQuery in this link. In this post I will be providing you with a hands-on example on the JQuery Cycle Plugin.I have been using extensively this plugin in my websites.You can rotate a series of images using various transitions with this plugin.It is a slideshow type of experience. I will be writing more posts regarding the most commonly used JQuery Plugins.  In this hands-on example I will be using Expression Web 4.0.This application is not a free application. You can use any HTML editor you like.You can use Visual Studio 2012 Express edition. You can download it here.  You can download this plugin from this link I launch Expression Web 4.0 and then I type the following HTML markup (I am using HTML 5) <!DOCTYPE html><html lang="en">  <head>    <title>Liverpool Legends</title>        <meta http-equiv="Content-Type" content="text/html;charset=utf-8" >            <script type="text/javascript" src="jquery-1.8.3.min.js"> </script>     <script type="text/javascript" src="jquery.cycle.all.js"></script>              <script type="text/javascript">        $(function() {            $('#main').cycle({ fx: 'fade'});        });    </script>       </head>  <body>    <header>        <h1>Liverpool Legends</h1>    </header>        <div id="main">                   <img src="championsofeurope.jpg" alt="Champions of Europe">                        <img src="steven_gerrard.jpg" alt="Steven Gerrard">                        <img src="ynwa.jpg" alt="You will never walk alone">                       </div>            <footer>        <p>All Rights Reserved</p>      </footer>     </body>  </html> This is a very simple markup. I have added three photos (make sure you use your own when trying this example)I have added references to the JQuery library (current version is 1.8.3) and the JQuery Cycle Plugin. Then I have added 3 images in the main div element.The Javascript code that makes it all happen follows.  <script type="text/javascript">        $(function() {            $('#main').cycle({ fx: 'fade'});        });    </script>  It couldn't be any simpler than that. I view my simple in Internet Explorer 10 and it works as expected. I have this series of images transitioning one after the other using the "fade" effect. I have tested this simple solution in all major browsers and it works fine.We can have a different transition effect by changing the JS code. Have a look at the code below       <script type="text/javascript">        $(function() {            $('#main').cycle({                     fx: 'cover',        speed: 500,        timeout: 2000                        });        });    </script>   We set the speed to 500 milliseconds, that is the speed we want to have for the ‘cover’ transition.The timeout is set to two seconds which is the time the photo will show until the next transition will take place.We can customise this plugin further but this is a short introduction to the plugin.Hope it helps!!!

    Read the article

  • run as dialog always pops up

    - by user12006
    I recently got some malware on a machine that I don't use for much (partly intentional). I've cleaned it, but now everytime I open any .exe the 'Run As' dialog pops up asking me which user I want to use to run the program. What causes this, and what's the fix for it? edit My process to remove the malware was as such: Disconnected from the network Deleted DisableTaskMgr reg key Inspected with Process Explorer and Task Manager and noticed that all applications were being run within another executable located in Documents and Settings...\Temp\Some.exe The system tray application was also in Documents and Settings...\Temp\SomeOther.exe I suspected that a service was in place as the system tray application would restart if it was killed, but couldn't find any service that I didn't recognize. Removed permissions from Some.exe and SomeOther.exe (on those files only) Restarted and deleted Some.exe and SomeOther.exe Deleted startup entries that were created Ran AVG Free and Windows Defender to remove anything else (they would be killed immediately before the two .exe's were removed) Cleaned registry via CCleaner note that system restores would finish saying something to the effect of 'couldn't restore system: there were no changes made'. I attempted to restore to a week ago, and I only got the malware yesterday.

    Read the article

  • What is the "standard" JQuery treeview that most people use? It seems the most popular plugin isn't

    - by Pete Alvin
    I've chosen JQuery as my JavaScript library but now I'm a bit frustrated by the JQuery plugin site... the site kinda sucks... the plugin area isn't designed very well and I can only find a few treeviews. The one with the most votes (link text) isn't supported anymore. Can someone please point me to an industrial strength treeview? Desired Features: 1. stable 2. async / ajax would be nice 3. drag and drop nodes would be nice I've been delighted so far with JQueryUI--nice design. But, how come it doesn't come with a standard tree view? Pete

    Read the article

  • Jquery Accordion and Fading

    - by Slick Willis
    I am trying to create a jquery accordion that fades the header of the accordion out when the page is loaded then fades it in when the mouse hovers. The accordion also opens when the mouse hovers. I am able to get all of this working, the problem I am having is when the accordion opens the header moves away and the mouse is no longer on it to keep it lit. I would like the links to keep the header lit as well as if the mouse is on the header itself. Below is the code that I wrote for it. <html> <head <script type='text/javascript' src='http://accidentalwords.squarespace.com/storage/jquery/jquery-1.4.2.min.js'></script> <script type='text/javascript' src='http://accidentalwords.squarespace.com/storage/jquery/jquery-custom-181/jquery-ui-1.8.1.custom.min.js'></script> </head> <body bgcolor="black"> <style = "css/text"> .links { font-family: "Georgia", "Verdana", serif; line-height: 30px; margin-left: 20px; margin-top: 5px; } .Title { font-family: "Geneva", "Verdana", serif; font-weight: bold; font-size: 2em; text-align: left; font-variant: small-caps; border-bottom: solid 2px #25FF00; padding-bottom:5px; margin-bottom: 10px; } </style> <script type="text/javascript"> $(document).ready(function(){ $(".Title").fadeTo(1,0.25); $(".Title").hover(function () { $(this).stop().fadeTo(250,1) .closest(".Title").find(".links").fadeTo(250,0.75); }, function() { $(this).stop().fadeTo(250,0.25); }); }); $(function() { $("#accordion").accordion({ event: "mouseover" }); }); </script> <p>&nbsp</p> <div id="accordion"> <div class="Title"><a href="#"STYLE="TEXT-DECORATION: NONE; color: #25FF00;">Reference</a></div> <div class="links"> <a href="http://docs.jquery.com/Main_Page" STYLE="TEXT-DECORATION: NONE; color: #25FF00;">Jquery Documentation/Help</a><br> <a href="http://stackoverflow.com/" STYLE="TEXT-DECORATION: NONE; color: #25FF00;">Stack Overflow</a><br> <a href="http://www.w3schools.com/" STYLE="TEXT-DECORATION: NONE; color: #25FF00;">w3schools.com</a><br> </div> <div class="Title"><a href="#"STYLE="TEXT-DECORATION: NONE; color: #FF7200;">Gaming</a></div> <div class="links"> <a href="http://docs.jquery.com/Main_Page" STYLE="TEXT-DECORATION: NONE; color: #FF7200;">Jquery Documentation/Help</a><br> <a href="http://stackoverflow.com/" STYLE="TEXT-DECORATION: NONE; color: #FF7200;">Stack Overflow</a><br> <a href="http://www.w3schools.com/" STYLE="TEXT-DECORATION: NONE; color: #FF7200;">w3schools.com</a><br></div> <div class="Title"><a href="#"STYLE="TEXT-DECORATION: NONE; color: #00DEFF;">Grub</a></div> <div class="links"> <a href="http://docs.jquery.com/Main_Page" STYLE="TEXT-DECORATION: NONE; color: #00DEFF;">Jquery Documentation/Help</a><br> <a href="http://stackoverflow.com/" STYLE="TEXT-DECORATION: NONE; color: #00DEFF;">Stack Overflow</a><br> <a href="http://www.w3schools.com/" STYLE="TEXT-DECORATION: NONE; color: #00DEFF;">w3schools.com</a><br> </div> <div class="Title"><a href="#"STYLE="TEXT-DECORATION: NONE; color: #F8FF00;">Drinks</a></div> <div class="links"> <a href="http://docs.jquery.com/Main_Page" STYLE="TEXT-DECORATION: NONE; color: #F9FF00;">Jquery Documentation/Help</a><br> <a href="http://stackoverflow.com/" STYLE="TEXT-DECORATION: NONE; color: #F8FF00;">Stack Overflow</a><br> <a href="http://www.w3schools.com/" STYLE="TEXT-DECORATION: NONE; color: #F8FF00;">w3schools.com</a><br> </div> </div> </body> </html>

    Read the article

  • Actionscript 2.0 mx.managers.CreatePopUp dialog triggers onRollOver for events underneath it

    - by user317112
    All, On the main stage I have a button that is highlighted on rollover. I am using mx.managers.CreatePopUp to create a dialog box that pops up and takes user information. When the dialog box appears above the button, mousing over the dialog box triggers the highlight for the button beneath it. Can you provide some suggestions as to what the issue might be caused by? (I am fairly new to Flash so any suggestions would be helpful. Just looking for things to experiment with to get the correct behavior.) Other info that might be helpful: I've noticed that when I create a modal version of the dialog box, this behavior does not occur. Dismissing the modal dialog disables the entire stage. Fixing this issue would also solve my problem, but I've been unsuccessful thus far. Thanks in advance.

    Read the article

  • jQuery: Can't get tooltip plugin to work

    - by Rosarch
    I'm trying to use this tooltip plugin: http://bassistance.de/jquery-plugins/jquery-plugin-tooltip/. I can't seem to get it to work. <head> <script type="text/javascript" src="/static/JQuery.js"></script> <script type="text/javascript" src="/static/jquery-ui-1.8.1.custom.min.js"></script> <script type="text/javascript" src="/static/jquery.json-2.2.min.js"></script> <script type="text/javascript" src="/static/jquery.form.js"></script> <script type="text/javascript" src="/static/js-lib/jquery.bgiframe.js"></script> <script type="text/javascript" src="/static/js-lib/jquery.delegate.js"></script> <script type="text/javascript" src="/static/js-lib/jquery.dimensions.js"></script> <script type="text/javascript" src="/static/jquery.tooltip.js"></script> <script type="text/javascript" src="/static/sprintf.js"></script> <script type="text/javascript" src="/static/clientside.js"></script> </head> I try it out in a simple example: clientside.js: $(document).ready(function () { $("#set1 *").tooltip(); }); The target html: <div id="set1"> <p id="welcome">Welcome. What is your email?</p> <form id="form-username-form" action="api/user_of_email" method="get"> <p> <label for="form-username">Email:</label> <input type="text" name="email" id="form-username" /> <input type="submit" value="Submit" id="form-submit" /> </p> </form> <p id="msg-user-accepted"></p> </div> Unfortunately, nothing happens. What am I doing wrong?

    Read the article

< Previous Page | 2 3 4 5 6 7 8 9 10 11 12 13  | Next Page >