Search Results

Search found 71443 results on 2858 pages for 'file dialog'.

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

  • Android Class which extends Dialog, how to clear TextViews before it is displayed

    - by wuntee
    I have a class that extends android.app.Dialog, the layout is done in an xml file, and the setup (button listeners, etc) is done on the onCreate method. My problem is that whenever the dialog is displayed, then dismissed, and displayed again, the Editable TextViews are still populated with the information that was displayed previously. What is the common way to clear these text fields? Remember - this is a separate class that extends Dialog - so there is no 'onDialogCreate' like Activity has. Or, perhaps I am extending the wrong class? There is just a lot of processing being done, and do not want to have all the code in the main Activity. I would like it to be in a separate Class. I tried to extend AlertDialog, but it does not create the border like Dialog does. Any help would be great. The dialog is shown via the Activity: protected Dialog onCreateDialog(int id) { switch(id){ case DIALOG_NEW_SAFE: return(new NewSafeDialog(this)); default: return(null); } }

    Read the article

  • jquery dialog button

    - by Nishima
    Hi All, Can anyone tell em how can call a function with parameters on a dialog and call that same function from somwhere else also. function showEditDialog(TagDivId, id, type, bFlag) { try { stickyinfo = new Array(); jQuery('#'+TagDivId).dialog({ autoOpen: false, height : 535, width:320, modal: true, resizable:false, //closeOnEscape:false, buttons: { Cancel: function() { jQuery(this).dialog('close'); }, 'OK': function showEditDialogOkFunc(id) { //stickyinfo.clear(); //Register Collaboba Tag with the Server. var color = jQuery('#' + id).css('background-color'); var tagid = document.getElementById(id); if(tagid != null) { GetTagInformation(id, stickyinfo); } else { return false; } } } catch(e) { alert(e); } } Is it ok the way i m calling showEditDialogOkFunc(id) and can i call this function from anywhere else.Since it's a dialog function will it get all the properies of the dialog defined above the ok function.And if i call the OK function from anuwhere else will it get all the properties of the dialog o not. Thanks

    Read the article

  • jQuery - UI Dialog - looking for a smart solution for a timed close

    - by AnApprentice
    Hello, I wrote the following: // Called with setTimeout(magicDialogDelayedClose, 2500); function magicDialogDelayedClose() { $(".ui-dialog").fadeOut(function() { dialog_general.dialog('close'); }); } The above is called with setTimeout when I show a notice dialog that I want to auto close in 2.5 secs. The problem I'm noticing with this is that if the use Manually closes a dialog this timer still is running. If the user then opens a new dialog (which is very possible) the timer can then close that NEW dialog. What's a smart way to handle this?j

    Read the article

  • Gaining Reference to the Dialog from Dialog content

    - by coffeeaddict
    Here's my scenario: I've got a div on Page A. When an event happens (whatever I define, a click, whatever), I do a div.Dialog, set its properties and open it The data inside is returned from an async .ajax call that grabs the data from a url and appends it to the div by calling div.html(data) inside the .ajax callback, so it's essentially loading a PageB by getting the data (content) and appending it to the div that's calling the dialog("open")...nothing special here I don't think. My question: In Page B, how do I reference the dialog so I can do some things to it? For instance in Page B's content that I received back from that .ajax call and added to the div via .html(data), there is a button and when clicked I need to close the dialog. Right now my buttons are not working because one of them closes out the dialog and the other should redirect to a new page but both do not work now because I have no reference to the dialog that it's in to manipulate it.

    Read the article

  • Fixing/Extending Standard Windows File Open/Save Dialog [closed]

    - by scunliffe
    Possible Duplicate: Change left side link of the Save As Dialog for a DropBox one? Almost every time I use the standard Windows (XP) File Open/Save Dialog I get frustrated in how long it takes me to navigate to where I want to go. :-( (I won't even get into the MS Office dialog that makes things even worse) This is the dialog I'm referring to (with some notes) Notes: Wouldn't a Drive list be handy in here? C:\, D:\, E:\, etc. What about a breadcrumb URI? (the magenta list of links) Why isn't Program Files one of the icons on the left? (green) I'm always going in there for something Why can't I type "../../../" to navigate up multiple directories in the File name box? (blue) There has got to be some utilities out there that can "hijack" or "overwrite" this core windows dialog to provide a much better set of options. I'm looking for any/all solutions to help fix this dialog.

    Read the article

  • how to set the border = 0 on GtkBox (dialog-Vbox-Element) in Glade on Dialog, which was creadted via "quickly add dialog"

    - by Marian Lux
    To make the Toolbar look native in Ubuntu (like the application in this video: https://www.youtube.com/watch?feature=player_embedded&v=sO8hiPreNBg), I don't want to show a border. In my main window of my application I am able to set the property for the border width to zero on the GtkBox under tab "common". But on a dialog (created via "quickly add dialog") there is no option on the GtkBox to set the property under "common". The property for the border width sill not appears under common! What can I do to solve this problem? I tried to create a Window-Element and tried to delete the Dialog-Element. Result: Then I was able to set this property in Glade but I could not do anything with the Window-Element and its Child-Elements (e.g. set the native look for its toolbar) in the corresponding .py-File (for the ui-File) because I destroyed dependencies...

    Read the article

  • Simplifying Jquery code HELP!

    - by user342391
    I am trying to load two modal dialog boxes with Jquery. Both of them load separate pages using ajax. The only problem is that only one of them works. I think I need to simplify my code but am unsure how. <script type="text/javascript"> $(document).ready(function(){ var dialogOpts = { modal: true, bgiframe: true, autoOpen: false, height: 400, width: 550, draggable: true, resizeable: true, title: "Your campaign rates", }; $("#ratesbox").dialog(dialogOpts); //end dialog $('#ratesbutton').click( function() { $("#ratesbox").load("rate_sheet/index.php", [], function(){ $("#ratesbox").dialog("open"); } ); return false; } ); }); </script> <script type="text/javascript"> $(document).ready(function(){ var dialogOptsPass = { modal: true, bgiframe: true, autoOpen: false, height: 400, width: 550, draggable: true, resizeable: true, title: "Change your pasword", }; $("#passwordbox").dialog(dialogOptsPass); //end dialog $('#passwordbutton').click( function() { $("#passwordbox").load("change_password/index.php", [], function(){ $("#passwordbox").dialog("open"); } ); return false; } ); }); </script> Is it posible to combine the two scripts????

    Read the article

  • Jquery dialog confirmation, confirm form post

    - by user342391
    I am trying to display jquery's dialog confirmation before submitting a form. But I can't get it to popup up only when the form is submitted this is the code: $(function remove() { $("#dialog-confirm").dialog({ resizable: false, height:200, modal: true, buttons: { 'Delete campaign': function() { return true ; $(this).dialog('close'); }, Cancel: function() { return false; $(this).dialog('close'); } } }); }); Dialog confirmation content <div id="dialog-confirm" title="Delete ?" style="display:none;"> <p><span class="ui-icon ui-icon-alert" style="float:left; margin:0 7px 20px 0;"></span>This will be permanently deleted and cannot be recovered. Are you sure?</p> </div> Form submit content <form style="display: inline;" action="remove.php" method="post"" onsubmit="return remove()">

    Read the article

  • jQuery Dialog form serialize reposting incorrect data on subsequent uses

    - by Ben Dauphinee
    I'm working with forms inside jQuery Dialog, and am having some issues with the data it's posting. First load and save works fine, posts the correct data. Until I refresh the page though, every subsequent load seems to work, as in the correct data is in the form, however, when saved, the data from the first load is what is posted every time. function formdialog(url, tack, divid, scriptload){ $.getJSON(url+tack+"/form", function(data){ var formwin = '<div><form id="formdialog">'+data['form']+'</form></div>'; var dialog = $(formwin).dialog({ title: data['title'], autoOpen: false, modal: true, buttons: { "Save": function(){ $.post(url+tack+"/process", $("#formdialog").serialize(), function(data){ alert($("#formdialog").serialize()); $(this).dialog('close'); $(this).remove(); } ); }, "Cancel": function(){$(this).dialog('close'); $(this).remove();} } }); dialog.dialog("open"); }); } $(function(){ $("a.edlnk").click(function(){ var url = $(this).attr("href"); formdialog(CONFIG_HREF_SITE+"ajax/"+appControl, "/"+url, divid); return false; }); });

    Read the article

  • jquery ui dialog open multiple dialog boxes using the same class on the button and the content div

    - by MichaelAntoni
    Hello there, i want to open multiple dialog boxes by using the same class on both the button and the content div. The below works but only for the first time. jQuery('.helpDialog').hide(); jQuery('.helpButton').click(function() { jQuery(this).next('.helpDialog').dialog({ autoOpen: true, title: 'Help', width: 500, height: 300, position: [180,10], draggable: true, resizable: false, modal: false }); return false; }); we know the reason for this http://blog.nemikor.com/2009/04/08/basic-usage-of-the-jquery-ui-dialog/ "the second call is ignored because the dialog has already been instantiated on that element." But when i fix that problem by trying the code below, the dialog box no longer opens. Can anyone help? Thanks in advance jQuery('.helpDialog').hide(); jQuery(function() { jQuery('.helpDialog').dialog({ autoOpen: false, modal: true, title: 'Info', width: 600, height: 400, position: [200,0], draggable: false }); }); jQuery('.helpButton').click(function() { jQuery(this).next('.helpDialog').dialog('open'); return false; });

    Read the article

  • $this.attr() stops Jquery dialog from opening

    - by user342391
    I am using the following code to post my form data to player/index.php and open it in a dialog. Because I have multiple of these forms in my table I need to use $(this). But now it doesn't open in a dialog. New code (doesn't open dialog but display data in url): $("#recordingdialog").dialog({ //other options, width, height, etc... modal: true, bgiframe: true, autoOpen: false, height: 200, width: 350, draggable: true, resizeable: true, title: "Play Recording",}); $(this).click(function() { $.post('player/index.php', $(this).attr('form').serialize(), function (data) { $("#recordingdialog").html(data).dialog("open"); }); return false; }); Old code (only works on one form): $("#recordingdialog").dialog({ //other options, width, height, etc... modal: true, bgiframe: true, autoOpen: false, height: 550, width: 550, draggable: true, resizeable: true, title: "Play Recording",}); $("#wavajax button").click(function() { $.post('player/index.php', $("#wavajax").serialize(), function (data) { $("#recordingdialog").html(data).dialog("open"); }); return false; });

    Read the article

  • Using the jQuery UI Library in a MVC 3 Application to Build a Dialog Form

    - by ChrisD
    Using a simulated dialog window is a nice way to handle inline data editing. The jQuery UI has a UI widget for a dialog window that makes it easy to get up and running with it in your application. With the release of ASP.NET MVC 3, Microsoft included the jQuery UI scripts and files in the MVC 3 project templates for Visual Studio. With the release of the MVC 3 Tools Update, Microsoft implemented the inclusion of those with NuGet as packages. That means we can get up and running using the latest version of the jQuery UI with minimal effort. To the code! Another that might interested you about JQuery Mobile and ASP.NET MVC 3 with C#. If you are starting with a new MVC 3 application and have the Tools Update then you are a NuGet update and a <link> and <script> tag away from adding the jQuery UI to your project. If you are using an existing MVC project you can still get the jQuery UI library added to your project via NuGet and then add the link and script tags. Assuming that you have pulled down the latest version (at the time of this publish it was 1.8.13) you can add the following link and script tags to your <head> tag: < link href = "@Url.Content(" ~ / Content / themes / base / jquery . ui . all . css ")" rel = "Stylesheet" type = "text/css" /> < script src = "@Url.Content(" ~ / Scripts / jquery-ui-1 . 8 . 13 . min . js ")" type = "text/javascript" ></ script > The jQuery UI library relies upon the CSS scripts and some image files to handle rendering of its widgets (you can choose a different theme or role your own if you like). Adding these to the stock _Layout.cshtml file results in the following markup: <!DOCTYPE html> < html > < head >     < meta charset = "utf-8" />     < title > @ViewBag.Title </ title >     < link href = "@Url.Content(" ~ / Content / Site . css ")" rel = "stylesheet" type = "text/css" />     <link href="@Url.Content("~/Content/themes/base/jquery.ui.all.css")" rel="Stylesheet" type="text/css" />     <script src="@Url.Content("~/Scripts/jquery-1.5.1.min.js")" type="text/javascript"></script>     <script src="@Url.Content("~/Scripts/modernizr-1.7.min . js ")" type = "text/javascript" ></ script >     < script src = "@Url.Content(" ~ / Scripts / jquery-ui-1 . 8 . 13 . min . js ")" type = "text/javascript" ></ script > </ head > < body >     @RenderBody() </ body > </ html > Our example will involve building a list of notes with an id, title and description. Each note can be edited and new notes can be added. The user will never have to leave the single page of notes to manage the note data. The add and edit forms will be delivered in a jQuery UI dialog widget and the note list content will get reloaded via an AJAX call after each change to the list. To begin, we need to craft a model and a data management class. We will do this so we can simulate data storage and get a feel for the workflow of the user experience. The first class named Note will have properties to represent our data model. namespace Website . Models {     public class Note     {         public int Id { get ; set ; }         public string Title { get ; set ; }         public string Body { get ; set ; }     } } The second class named NoteManager will be used to set up our simulated data storage and provide methods for querying and updating the data. We will take a look at the class content as a whole and then walk through each method after. using System . Collections . ObjectModel ; using System . Linq ; using System . Web ; namespace Website . Models {     public class NoteManager     {         public Collection < Note > Notes         {             get             {                 if ( HttpRuntime . Cache [ "Notes" ] == null )                     this . loadInitialData ();                 return ( Collection < Note >) HttpRuntime . Cache [ "Notes" ];             }         }         private void loadInitialData ()         {             var notes = new Collection < Note >();             notes . Add ( new Note                           {                               Id = 1 ,                               Title = "Set DVR for Sunday" ,                               Body = "Don't forget to record Game of Thrones!"                           });             notes . Add ( new Note                           {                               Id = 2 ,                               Title = "Read MVC article" ,                               Body = "Check out the new iwantmymvc.com post"                           });             notes . Add ( new Note                           {                               Id = 3 ,                               Title = "Pick up kid" ,                               Body = "Daughter out of school at 1:30pm on Thursday. Don't forget!"                           });             notes . Add ( new Note                           {                               Id = 4 ,                               Title = "Paint" ,                               Body = "Finish the 2nd coat in the bathroom"                           });             HttpRuntime . Cache [ "Notes" ] = notes ;         }         public Collection < Note > GetAll ()         {             return Notes ;         }         public Note GetById ( int id )         {             return Notes . Where ( i => i . Id == id ). FirstOrDefault ();         }         public int Save ( Note item )         {             if ( item . Id <= 0 )                 return saveAsNew ( item );             var existingNote = Notes . Where ( i => i . Id == item . Id ). FirstOrDefault ();             existingNote . Title = item . Title ;             existingNote . Body = item . Body ;             return existingNote . Id ;         }         private int saveAsNew ( Note item )         {             item . Id = Notes . Count + 1 ;             Notes . Add ( item );             return item . Id ;         }     } } The class has a property named Notes that is read only and handles instantiating a collection of Note objects in the runtime cache if it doesn't exist, and then returns the collection from the cache. This property is there to give us a simulated storage so that we didn't have to add a full blown database (beyond the scope of this post). The private method loadInitialData handles pre-filling the collection of Note objects with some initial data and stuffs them into the cache. Both of these chunks of code would be refactored out with a move to a real means of data storage. The GetAll and GetById methods access our simulated data storage to return all of our notes or a specific note by id. The Save method takes in a Note object, checks to see if it has an Id less than or equal to zero (we assume that an Id that is not greater than zero represents a note that is new) and if so, calls the private method saveAsNew . If the Note item sent in has an Id , the code finds that Note in the simulated storage, updates the Title and Description , and returns the Id value. The saveAsNew method sets the Id , adds it to the simulated storage, and returns the Id value. The increment of the Id is simulated here by getting the current count of the note collection and adding 1 to it. The setting of the Id is the only other chunk of code that would be refactored out when moving to a different data storage approach. With our model and data manager code in place we can turn our attention to the controller and views. We can do all of our work in a single controller. If we use a HomeController , we can add an action method named Index that will return our main view. An action method named List will get all of our Note objects from our manager and return a partial view. We will use some jQuery to make an AJAX call to that action method and update our main view with the partial view content returned. Since the jQuery AJAX call will cache the call to the content in Internet Explorer by default (a setting in jQuery), we will decorate the List, Create and Edit action methods with the OutputCache attribute and a duration of 0. This will send the no-cache flag back in the header of the content to the browser and jQuery will pick that up and not cache the AJAX call. The Create action method instantiates a new Note model object and returns a partial view, specifying the NoteForm.cshtml view file and passing in the model. The NoteForm view is used for the add and edit functionality. The Edit action method takes in the Id of the note to be edited, loads the Note model object based on that Id , and does the same return of the partial view as the Create method. The Save method takes in the posted Note object and sends it to the manager to save. It is decorated with the HttpPost attribute to ensure that it will only be available via a POST. It returns a Json object with a property named Success that can be used by the UX to verify everything went well (we won't use that in our example). Both the add and edit actions in the UX will post to the Save action method, allowing us to reduce the amount of unique jQuery we need to write in our view. The contents of the HomeController.cs file: using System . Web . Mvc ; using Website . Models ; namespace Website . Controllers {     public class HomeController : Controller     {         public ActionResult Index ()         {             return View ();         }         [ OutputCache ( Duration = 0 )]         public ActionResult List ()         {             var manager = new NoteManager ();             var model = manager . GetAll ();             return PartialView ( model );         }         [ OutputCache ( Duration = 0 )]         public ActionResult Create ()         {             var model = new Note ();             return PartialView ( "NoteForm" , model );         }         [ OutputCache ( Duration = 0 )]         public ActionResult Edit ( int id )         {             var manager = new NoteManager ();             var model = manager . GetById ( id );             return PartialView ( "NoteForm" , model );         }         [ HttpPost ]         public JsonResult Save ( Note note )         {             var manager = new NoteManager ();             var noteId = manager . Save ( note );             return Json ( new { Success = noteId > 0 });         }     } } The view for the note form, NoteForm.cshtml , looks like so: @model Website . Models . Note @using ( Html . BeginForm ( "Save" , "Home" , FormMethod . Post , new { id = "NoteForm" })) { @Html . Hidden ( "Id" ) < label class = "Title" >     < span > Title < /span><br / >     @Html . TextBox ( "Title" ) < /label> <label class="Body">     <span>Body</ span >< br />     @Html . TextArea ( "Body" ) < /label> } It is a strongly typed view for our Note model class. We give the <form> element an id attribute so that we can reference it via jQuery. The <label> and <span> tags give our UX some structure that we can style with some CSS. The List.cshtml view is used to render out a <ul> element with all of our notes. @model IEnumerable < Website . Models . Note > < ul class = "NotesList" >     @foreach ( var note in Model )     {     < li >         @note . Title < br />         @note . Body < br />         < span class = "EditLink ButtonLink" noteid = "@note.Id" > Edit < /span>     </ li >     } < /ul> This view is strongly typed as well. It includes a <span> tag that we will use as an edit button. We add a custom attribute named noteid to the <span> tag that we can use in our jQuery to identify the Id of the note object we want to edit. The view, Index.cshtml , contains a bit of html block structure and all of our jQuery logic code. @ {     ViewBag . Title = "Index" ; } < h2 > Notes < /h2> <div id="NoteListBlock"></ div > < span class = "AddLink ButtonLink" > Add New Note < /span> <div id="NoteDialog" title="" class="Hidden"></ div > < script type = "text/javascript" >     $ ( function () {         $ ( "#NoteDialog" ). dialog ({             autoOpen : false , width : 400 , height : 330 , modal : true ,             buttons : {                 "Save" : function () {                     $ . post ( "/Home/Save" ,                         $ ( "#NoteForm" ). serialize (),                         function () {                             $ ( "#NoteDialog" ). dialog ( "close" );                             LoadList ();                         });                 },                 Cancel : function () { $ ( this ). dialog ( "close" ); }             }         });         $ ( ".EditLink" ). live ( "click" , function () {             var id = $ ( this ). attr ( "noteid" );             $ ( "#NoteDialog" ). html ( "" )                 . dialog ( "option" , "title" , "Edit Note" )                 . load ( "/Home/Edit/" + id , function () { $ ( "#NoteDialog" ). dialog ( "open" ); });         });         $ ( ".AddLink" ). click ( function () {             $ ( "#NoteDialog" ). html ( "" )                 . dialog ( "option" , "title" , "Add Note" )                 . load ( "/Home/Create" , function () { $ ( "#NoteDialog" ). dialog ( "open" ); });         });         LoadList ();     });     function LoadList () {         $ ( "#NoteListBlock" ). load ( "/Home/List" );     } < /script> The <div> tag with the id attribute of "NoteListBlock" is used as a container target for the load of the partial view content of our List action method. It starts out empty and will get loaded with content via jQuery once the DOM is loaded. The <div> tag with the id attribute of "NoteDialog" is the element for our dialog widget. The jQuery UI library will use the title attribute for the text in the dialog widget top header bar. We start out with it empty here and will dynamically change the text via jQuery based on the request to either add or edit a note. This <div> tag is given a CSS class named "Hidden" that will set the display:none style on the element. Since our call to the jQuery UI method to make the element a dialog widget will occur in the jQuery document ready code block, the end user will see the <div> element rendered in their browser as the page renders and then it will hide after that jQuery call. Adding the display:hidden to the <div> element via CSS will ensure that it is never rendered until the user triggers the request to open the dialog. The jQuery document load block contains the setup for the dialog node, click event bindings for the edit and add links, and a call to a JavaScript function called LoadList that handles the AJAX call to the List action method. The .dialog() method is called on the "NoteDialog" <div> element and the options are set for the dialog widget. The buttons option defines 2 buttons and their click actions. The first is the "Save" button (the text in quotations is used as the text for the button) that will do an AJAX post to our Save action method and send the serialized form data from the note form (targeted with the id attribute "NoteForm"). Upon completion it will close the dialog widget and call the LoadList to update the UX without a redirect. The "Cancel" button simply closes the dialog widget. The .live() method handles binding a function to the "click" event on all elements with the CSS class named EditLink . We use the .live() method because it will catch and bind our function to elements even as the DOM changes. Since we will be constantly changing the note list as we add and edit we want to ensure that the edit links get wired up with click events. The function for the click event on the edit links gets the noteid attribute and stores it in a local variable. Then it clears out the HTML in the dialog element (to ensure a fresh start), calls the .dialog() method and sets the "title" option (this sets the title attribute value), and then calls the .load() AJAX method to hit our Edit action method and inject the returned content into the "NoteDialog" <div> element. Once the .load() method is complete it opens the dialog widget. The click event binding for the add link is similar to the edit, only we don't need to get the id value and we load the Create action method. This binding is done via the .click() method because it will only be bound on the initial load of the page. The add button will always exist. Finally, we toss in some CSS in the Content/Site.css file to style our form and the add/edit links. . ButtonLink { color : Blue ; cursor : pointer ; } . ButtonLink : hover { text - decoration : underline ; } . Hidden { display : none ; } #NoteForm label { display:block; margin-bottom:6px; } #NoteForm label > span { font-weight:bold; } #NoteForm input[type=text] { width:350px; } #NoteForm textarea { width:350px; height:80px; } With all of our code in place we can do an F5 and see our list of notes: If we click on an edit link we will get the dialog widget with the correct note data loaded: And if we click on the add new note link we will get the dialog widget with the empty form: The end result of our solution tree for our sample:

    Read the article

  • JQueryMobile - Problems with dialog boxes [closed]

    - by Richard van Hees
    I'm programming in JQueryMobile, but I can't seem to get some things as I want. First it's good to tell I am mostly programming in a multi-page template. I have a login function in the web based app. The idea is that the user sees he's not logged in and the user can click on the button to log in. A dialog box pops up, in which the user can enter his credentials. This dialog box is in front of the previous page, in my case just index.php. The page for profile is at profile.php#profile. In this case the url for the dialog box is index.php#profile&ui-state=dialog. Don't ask me why, that's how JQueryMobile works, I guess. Anyway, after the user clicks on 'Login' in the pop-up, I want a new dialog to pop-up in which it says you are logged in and I want the content of the page behind it (index.php#profile) to refresh. Of course I want this all to move very smooth and no refreshing of the whole page, to prevent loading time and thus a blank screen for a second. In short: User not logged in Clicks on login Dialog pops up with form Clicks login New dialog pops up with 'success' (or whatever) in the same style as the previous dialog Clicks ok Page behind the dialogues has been refreshed without user noticing Also another thing that doesn't really work out for me: I can't seem to get a dialog to pop up, triggered by an action in another dialog. It just appears as a normal page.

    Read the article

  • MOSSt 2010 Hosting :: Dialog Platform in SharePoint 2010 & How to Open the Edit Form Dialog for List Item

    - by mbridge
    One of the New User Interface Platforms in SharePoint 2010 is ‘The Dialog Platform’ A dialog is essentially a <div> which gets visible on demand and renders the HTML using a background overlay creating a modal dialog like user experience. We can show an existing div from within the page or a different page using a URL inside the dialogs. When we pass the URL to the dialog it looks for the Querystring parameter “IsDlg=1”. If this parameters exists than it would dynamically load the "/_layouts/styles/dlgframe.css” file. This file overrides the “s4-notdlg” class items as “display:none”, which means that all items with this class would not get displayed in Dialog Mode.  So if we go to the v4.master page we can see that this class is used by the Ribbon control to hide the ribbon when in dialog mode: How to open the Edit Form Dialog for List Item: In SharePoint 2010 The URL for opening the Edit Form of any list item looks like something like this : http://intranet.contoso.com/<SiteName>/Lists/<ListName>/EditForm.aspx?ID=1&IsDlg=1 ID is the list item row identifier and as discussed above the IsDlg is for the dialog mode. Now to open a dialog we need to use the SP.UI.ModalDialog.showModalDialog method from the ECMAScript Client Object model and pass in the url of the page, width & height of the dialog and also a callback function in case we want some code to run after the dialog is closed. <script type="text/javascript">          //Handle the DialogCallback callback               function DialogCallback(dialogResult, returnValue){               }             //Open the Dialog           function OpenEditDialog(id){             var options = { url:&quot;http://intranet.contoso.com/<SiteName>/Lists/<ListName>/EditForm.aspx?ID=&quot; + id + &quot;&amp;IsDlg=1&quot;,              width: 700,              height: 700,              dialogReturnValueCallback: DialogCallback              };             SP.UI.ModalDialog.showModalDialog(options);           } </script> The .js files for the ECMAScript Object Model (SP.js, SP.Core.js, SP.Ribbon.js, and SP.Runtime.js ) are installed in the %ProgramFiles%\Common Files\Microsoft Shared\web server extensions\14\TEMPLATE\LAYOUTS directory. Here is a good MSDN link explaining the Client Object Model Distribution and Deployment options available in SharePoint 2010 and this is the lowest costSharePoint 2010 Provider.

    Read the article

  • Access violations in strange places when using Windows file dialogs

    - by Robert Oschler
    A long time ago I found out that I was getting access violations in my code due to the use of the Delphi Open File and/or Save File dialogs, which encapsulate the Windows dialogs. I asked some questions on a few forums and I was told that it may have been due to the way some programs add hooks to the shell system that result in DLLs getting injected in every process, some of which can cause havoc with a program. For the record, the programming environment I use is Delphi 6 Professional running on Windows XP 32-bit. At the time I got around it by not using Delphi's Dialog components and instead calling straight into comdlg32.dll. This solved the problem wonderfully. Today I was working with memory mapped files for the first time and sure enough, access violations started cropping up in weird parts of the code. I tried my comdlg32.dll direct calls and this time it didn't help. To isolate the problem as a test I created a list box with the exact same files I was using during testing. These are the exact same test files I was selecting from an Open File dialog and then launching my memory mapped file with. I set things up so that by clicking on a file in the list box, I would use that file in my memory mapped file test instead of calling into a comdlg32.dll dialog function to select a test file. Again, the access violatons vanished. To show you how dramatic a fix it was I went from experiencing an access violation within 1 to 3 trials to none at all. Unfortunately, it's going to bite me later on of course when I do need to use file dialogs. Has anyone else dealt with this issue too and found the real culprit? Did any of you find a solution I could use to fix this problem instead of dancing around it like I am now? Thanks in advance.

    Read the article

  • bgiframe:true in jquery ui:dialog ie6

    - by duskandawn
    Hello All, I am learning to use the jquery ui:dialog. And when i go to this link for the example for a modal dialog, in ie6 http://jqueryui.com/demos/dialog/#modal The resizing of the dialog doesnt work. I try to replicate the same scenario by myself, with the bgiframe:true option, the resizing still doesnt work. I know there is an iframefix out there to put in the jquery.ui.resizable.js it still doesnt work. I am using jquery-1.4.2.js Any ideas

    Read the article

  • jQuery Dialog + Chrome - opening a second modal dialog doesn't dim the page

    - by psychotik
    I have a jQuery modal dialog with a button. When clicked, it closes the current dialog and open another modal dialog. This works fine in FF and IE, but in Chrome I lose the dimmed main page after the first dialog and the second one is opened. It looks like the CSS isn't applied anymore? I'm using jQuery UI 1.7.2 and jQuery 1.3.2 (can't upgrade to 1.4.1 for an unrelated reason). Any ideas/workarounds?

    Read the article

  • Installer Dialog comes up with Scroll bars on 800x480 resolution

    - by Nagashree
    I am building an msi using WISE. The Dialogs appear fine when run on a 1280x800 resolution screen. But when I run the same msi on a 800x480 resolution screen, the installer dialog appears really huge and you cannot see the whole dialog on the screen.However, the dialog now comes up with a vertical and horizontal scrollbar allowing you to scroll and view it fully. Is there any property I need to set to adjust the installer dialog such that it appears properly on both higher and lower resolution screens?

    Read the article

  • YUI dialog - what's the equivalent of postdata when using "form" (not ('async")

    - by jamesmoorecode
    I'm creating a dialog with YAHOO.widget.Dialog. The dialog is fired off by clicking on a link, and the function the link uses specifies parameters that finally get added to a postdata option like so: var myDialog = new YAHOO.widget.Dialog("myDialog", { fixedcenter: true, // postmethod: "form", postdata: propString }); This works just fine, but now I need to do the same thing but using "form" instead of "async" - and there's no postdata for form submissions. What's the right way to do this? (YUI 2.7.0)

    Read the article

  • JQM dialog is opening in new page instead of dialog

    - by K D
    Thank you for taking the time to read my question. I'm trying to get a dialog box to open using Jquery mobile. I followed the documentation and used the data-rel="dialog" notation along with the data-transition="pop". Instead of a dialog appearing on the same page, I get a brand new page with the dialog appearing. Can someone kindly assist me on how to fix this functionality. Here is my code for the initial main page: <article> <ul data-role="listview" data-split-icon="star" data-split-theme="d" data-inset="true"> <li><a href="#black_seed_desc" data-rel="dialog" ><img src="black_seed.jpg"/> <h3>Black Seed Oil</h3> </a> <a href="#black_seed_purchase" data-rel="dialog" data-transition="pop">Purchase Black Seed Oil</a> </li> </ul> </article> Here is my code for the dialog page: <div data-role="dialog" id="black_seed_purchase" data-theme="c"> <section data-role="content"> <h1>Purchase Black Seed Oil?</h1> <p>By purchasing Black Seed Oil you will receive an email receipt copy sent to you for your reference.</p> <a href="#purchase_blackseed" data-inline="true" data-corners="true" data-rel="back" data-role="button" data-shadow="true" data-iconshadow="true" data-wrapperrels="span"> <span> <span>Buy: $49.99</span> <span>&nbsp;</span> </span> </a> <a href="#" data-role="button" data-rel="back" data-inline="true" data-corners="true" data-wrapperrels="span" data-shadow="true" data-iconshawdow="true"> <span> Cancel </span> </a> </section> </div> Here is a working example. http://jsfiddle.net/Gajotres/w3ptm/?

    Read the article

  • jquery ui dialog change position after first click

    - by user1958218
    I am using jquery uimodaldialog and this is setting $("#dialog").dialog({ autoOpen : false, minWidth : 700, show : { effect : "fade", duration : 1000 }, hide : { effect : "fade", duration : 1000 }, close : function(event, ui) { }, }); I am calling with this $('.mylink').on('click', function() { $( "#dialog" ).dialog( "open"); Now on first click it shows at center of page . if I click again then it goes about 200px upwards. On further clicking it says there

    Read the article

  • How to repeatedly show a Dialog with PyGTK / Gtkbuilder?

    - by Julian
    I have created a PyGTK application that shows a Dialog when the user presses a button. The dialog is loaded in my __init__ method with: builder = gtk.Builder() builder.add_from_file("filename") builder.connect_signals(self) self.myDialog = builder.get_object("dialog_name") In the event handler, the dialog is shown with the command self.myDialog.run(), but this only works once, because after run() the dialog is automatically destroyed. If I click the button a second time, the application crashes. I read that there is a way to use show() instead of run() where the dialog is not destroyed, but I feel like this is not the right way for me because I would like the dialog to behave modally and to return control to the code only after the user has closed it. Is there a simple way to repeatedly show a dialog using the run() method using gtkbuilder? I tried reloading the whole dialog using the gtkbuilder, but that did not really seem to work, the dialog was missing all child elements (and I would prefer to have to use the builder only once, at the beginning of the program). [SOLUTION] As pointed out by the answer below, using hide() does the trick. But one has to take care that the dialog is in fact destroyed if one does not catch its "delete-event". A simple example that works is: import pygtk import gtk class DialogTest: def rundialog(self, widget, data=None): self.dia.show_all() result = self.dia.run() def destroy(self, widget, data=None): gtk.main_quit() def closedialog(self, widget, data=None): self.dia.hide() return True def __init__(self): self.window = gtk.Window(gtk.WINDOW_TOPLEVEL) self.window.connect("destroy", self.destroy) self.dia = gtk.Dialog('TEST DIALOG', self.window, gtk.DIALOG_MODAL | gtk.DIALOG_DESTROY_WITH_PARENT) self.dia.vbox.pack_start(gtk.Label('This is just a Test')) self.dia.connect("delete-event", self.closedialog) self.button = gtk.Button("Run Dialog") self.button.connect("clicked", self.rundialog, None) self.window.add(self.button) self.button.show() self.window.show() if __name__ == "__main__": testApp = DialogTest() gtk.main()

    Read the article

  • Terminal Server 2008 - Slow File open dialog in Office 2003

    - by Chris
    I have yet another small issue that annoys me everyday in our Terminal Server environment. It seems when logging into Terminal Server users report the initial File | Open or File | Save As from within an application such as Word, Excel (2003 edition) is very slow to display the actual dialog box. The dialog appears quickly but it is whited out (sometimes displays not responding in title bar) and unresponsive, it then sits like this for about 20-30 secs before popping into life and displaying all the folders etc. The second time you go to save or open a file it loads almost instantly. Any suggestions or similar problems out there?

    Read the article

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