Search Results

Search found 4767 results on 191 pages for 'dialog'.

Page 11/191 | < Previous Page | 7 8 9 10 11 12 13 14 15 16 17 18  | Next Page >

  • 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

  • How to make area outside of custom dialog view unclickable?

    - by portfoliobuilder
    I created a custom dialog (no, this is not dialog object) from an image and some other views. The conflict I am having with this custom dialog (again, this is a layout) is that the area around it closes the custom dialog. Is there a way I can make the outside area unclickable? I have tried wrapping the dialog view with a fullscreen frameLayout w/ transparent background, and then programmatically I set the frame attribute to setClickable(false). framelayout.setClickable(false); This does nothing. It still closes the dialog. Any other suggestions? Thank you in advance. This is my code: //used to disable background from closing the custom dialog private FrameLayout fl; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); requestWindowFeature(Window.FEATURE_NO_TITLE); setContentView(R.layout.layout_dialog); btnContinue = (Button) findViewById(R.id.btnContinue); btnContinue.setOnClickListener(this); fl.setClickable(false); //background suppose to lock } @Override public void onClick(View v) { // TODO Auto-generated method stub switch (v.getId()) { case R.id.Continue: finish(); } break; } } I also have another class for broadcastReceiver public class DialogManagerBroadcastReceiver extends BroadcastReceiver { @Override public void onReceive(Context context, Intent intent) { if(IdeaPlayInterfaceApplication.isActivityVisible()){ Intent i=new Intent(context,CustomDialogActivity.class); i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); context.startActivity(i); } } } The idea is that this custom dialog is not called at a specific instance, it is called every set amount of time no matter what I am doing in the application. I use an Intent and PendingIntent to repeatedly call this custom dialog over time. With something like this: cancelAlarmNotificationMonitoring(context); Calendar calendar = Calendar.getInstance(); Intent intent = new Intent(context, AlarmManagerBroadcastReceiver.class); PendingIntent pintent = PendingIntent.getBroadcast(context, 0, intent, 0); AlarmManager alarm = (AlarmManager) context.getSystemService(Context.ALARM_SERVICE); alarm.setRepeating(AlarmManager.RTC_WAKEUP,calendar.getTimeInMillis()+ALARM_INTERVAL,ALARM_INTERVAL, pintent); Hopefully this is more clear now.

    Read the article

  • jQuery UI Dialog and Textarea Focus Issue

    - by Gimli
    I'm working on a modal comment system using jQuery and jQuery UI, but I'm having some issues with focus. I have a series of divs inside the modal to switch between Login and Add comment, as below: <div id="modal" title="Loading"> <div id="modalContent"></div> <div id="modalLogin"> <div class="loginBox"></div> <div class="addCommentBox"></div> <div class="commentReview"></div> </div> </div> Inside of the addCommentBox div, I've got the comment code: <form action="/comments/add" class="addCommentForm" name="addCommentForm" method="post"> <textarea name="content" class="addCommentContent"></textarea> <button value="Add Comment" type="submit" class="commentPost"/> <button value="Clear Comment" type="submit" id="clearComment"/> </form> The issue is that about half the time after opening the dialog the textarea inside the addCommentBox div doesn't react to keyboard inputs when selected. The mouse works correctly and will allow text to be selected, but keyboard control does nothing. I have no event listeners on the textarea. I've got some on the buttons, but they are targeting only the buttons. The only thing that happens in the HTML seems to be the fact that every time I click on the modal, the z-index increases for the overall modal div. I have set the addCommentBox div to have a z-index of 9999, greater than the z-index of the modal. Any suggestions or directions to research would be greatly appreciated. Thanks!

    Read the article

  • How to use SharePoint modal dialog box to display Custom Page Part3

    - by ybbest
    In the second part of the series, I showed you how to display and close a custom page in a SharePoint modal dialog using JavaScript and display a message after the modal dialog is closed. In this post, I’d like to show you how to use SPLongOperation with the Modal dialog box. You can download the source code here. 1. Firstly, modify the element file as follow <Elements xmlns="http://schemas.microsoft.com/sharepoint/"> <CustomAction Id="ReportConcern" RegistrationType="ContentType" RegistrationId="0x010100866B1423D33DDA4CA1A4639B54DD4642" Location="EditControlBlock" Sequence="107" Title="Display Custom Page" Description="To Display Custom Page in a modal dialog box on this item"> <UrlAction Url="javascript: function emitStatus(messageToDisplay) { statusId = SP.UI.Status.addStatus(messageToDisplay.message + ' ' +messageToDisplay.location ); SP.UI.Status.setStatusPriColor(statusId, 'Green'); } function portalModalDialogClosedCallback(result, value) { if (value !== null) { emitStatus(value); } } var options = { url: '{SiteUrl}' + '/_layouts/YBBEST/TitleRename.aspx?List={ListId}&amp;ID={ItemId}', title: 'Rename title', allowMaximize: false, showClose: true, width: 500, height: 300, dialogReturnValueCallback: portalModalDialogClosedCallback }; SP.UI.ModalDialog.showModalDialog(options);" /> </CustomAction> </Elements> 2. In your code behind, you can implement a close dialog function as below. This will close your modal dialog box once the button is clicked and display a status bar. Note that you need to use window.frameElement.commonModalDialogClose instead of window.frameElement.commonModalDialogClose protected void SubmitClicked(object sender, EventArgs e) { //Process stuff string message = "You clicked the Submit button"; string newLocation="http://www.google.com"; string information = string.Format("{{'message':'{0}','location':'{1}' }}", message, newLocation); var longOperation = new SPLongOperation(Page); longOperation.LeadingHTML = "Processing the  application"; longOperation.TrailingHTML = "Please wait while the application is being processed."; longOperation.Begin(); Thread.Sleep(5*1000); var closeDialogScript = GetCloseDialogScriptForLongProcess(information); longOperation.EndScript(closeDialogScript); } protected static string GetCloseDialogScriptForLongProcess(string message) { var scriptBuilder = new StringBuilder(); scriptBuilder.Append("window.frameElement.commonModalDialogClose(1,").Append(message).Append(");"); return scriptBuilder.ToString(); }   References: How to: Display a Page as a Modal Dialog Box

    Read the article

  • How to use SharePoint modal dialog box to display Custom Page Part3

    - by ybbest
    In the second part of the series, I showed you how to display and close a custom page in a SharePoint modal dialog using JavaScript and display a message after the modal dialog is closed. In this post, I’d like to show you how to use SPLongOperation with the Modal dialog box. You can download the source code here. 1. Firstly, modify the element file as follow <Elements xmlns="http://schemas.microsoft.com/sharepoint/"> <CustomAction Id="ReportConcern" RegistrationType="ContentType" RegistrationId="0x010100866B1423D33DDA4CA1A4639B54DD4642" Location="EditControlBlock" Sequence="107" Title="Display Custom Page" Description="To Display Custom Page in a modal dialog box on this item"> <UrlAction Url="javascript: function emitStatus(messageToDisplay) { statusId = SP.UI.Status.addStatus(messageToDisplay.message + ' ' +messageToDisplay.location ); SP.UI.Status.setStatusPriColor(statusId, 'Green'); } function portalModalDialogClosedCallback(result, value) { if (value !== null) { emitStatus(value); } } var options = { url: '{SiteUrl}' + '/_layouts/YBBEST/TitleRename.aspx?List={ListId}&amp;ID={ItemId}', title: 'Rename title', allowMaximize: false, showClose: true, width: 500, height: 300, dialogReturnValueCallback: portalModalDialogClosedCallback }; SP.UI.ModalDialog.showModalDialog(options);" /> </CustomAction> </Elements> 2. In your code behind, you can implement a close dialog function as below. This will close your modal dialog box once the button is clicked and display a status bar. Note that you need to use window.frameElement.commonModalDialogClose instead of window.frameElement.commonModalDialogClose protected void SubmitClicked(object sender, EventArgs e) { //Process stuff string message = "You clicked the Submit button"; string newLocation="http://www.google.com"; string information = string.Format("{{'message':'{0}','location':'{1}' }}", message, newLocation); var longOperation = new SPLongOperation(Page); longOperation.LeadingHTML = "Processing the  application"; longOperation.TrailingHTML = "Please wait while the application is being processed."; longOperation.Begin(); Thread.Sleep(5*1000); var closeDialogScript = GetCloseDialogScriptForLongProcess(information); longOperation.EndScript(closeDialogScript); } protected static string GetCloseDialogScriptForLongProcess(string message) { var scriptBuilder = new StringBuilder(); scriptBuilder.Append("window.frameElement.commonModalDialogClose(1,").Append(message).Append(");"); return scriptBuilder.ToString(); }   References: How to: Display a Page as a Modal Dialog Box

    Read the article

  • jQuery dialog box not opening 2nd time

    - by Steven
    I found this thread which basically has the same issue I have. But their solution is not working for me. The dialog appears the first time I click the submit button, but not the 2nd time. I'm opening the dialog box after a form submission. UPDATE I finally got it working. Here is the correct code: if (jQuery('#registrationforms').length > 0) { //instantiate the dialog jQuery("#dialog").dialog({ modal:true, autoOpen:false }); //Some more code here to call processRegistration function. } function processRegistration(instanceID, formData) { jQuery.post("mypath/jquery_bll.php", { instance: 'processRegistration', formData : formData, instanceID : instanceID }, function(feedback) { jQuery('#dialog').text(feedback.message); jQuery('#dialog').parent().addClass(feedback.type); jQuery('#dialog').dialog('open'); },"json"); } Since I'm dynamically applying css class, I have to make sure to add it to the outer DIV which $.dialog creates to wrap my 'dialog' DIV.

    Read the article

  • Stacking Dialogs in Android

    - by ChaimKut
    Is there a way to control the relative stacking of Dialogs produced by your own Activity? For instance, there are some more important Dialogs which I would like to ensure are on top and if another Dialog wants to pop up I would want it to pop under the important Dialogs. Example: I want to present to the user an important dialog, Dialog A. The activity realizes that there is a dialog, Dialog B, of lesser importance to display to the user. Is it possible to specify Dialog B to be under Dialog A so that when Dialog A is cleared, Dialog B will be seen by the user? I know that the onDismiss interface exists, but this necessarily ties Dialog A and Dialog B together. I want the Dialogs to be independent and would prefer to use a higher level abstraction like the window stack responsible for ordering the Dialogs.

    Read the article

  • Silverlight Confirm Dialog to Pause Thread

    - by AlishahNovin
    I'm trying to do a confirmation dialog using Silverlight's ChildWindow object. Ideally, I'd like it to work like MessageBox.Show(), where the entire application halts until an input is received from the user. For example: for(int i=0;i<5;i++) { if (i==3 && MessageBox.Show("Exit early?", "Iterator", MessageBoxButton.OKCancel) == MessageBoxResult.OK) { break; } } Would stop the iteration at 3 if the user hits OK... However, if I were to do something along the lines: ChildWindow confirm = new ChildWindow(); confirm.Title = "Iterator"; confirm.HasCloseButton = false; Grid container = new Grid(); Button closeBtn = new Button(); closeBtn.Content = "Exit early"; closeBtn.Click += delegate { confirm.DialogResult = true; confirm.Close(); }; container.Children.Add(closeBtn); Button continueBtn = new Button(); continueBtn.Content = "Continue!"; continueBtn.Click += delegate { confirm.DialogResult = false; confirm.Close(); }; container.Children.Add(continueBtn); confirm.Content = container; for(int i=0;i<5;i++) { if (i==3) { confirm.Show(); if (confirm.DialogResult.HasResult && (bool)confirm.DialogResult) { break; } } } This clearly would not work, as the thread isn't halted... confirm.DialogResult.HasResult would be false, and the loop would continue past 3. I'm just wondering, how I could go about this properly. Silverlight is single-threaded, so I can't just put the thread to sleep and then wake it up when I'm ready, so I'm just wondering if there's anything else that people could recommend? I've considered reversing the logic - ie, passing the actions I want to occur to the Yes/No events, but in my specific case this wouldn't quite work. Thanks in advance!

    Read the article

  • Deleting... dialog box stays on screen for over a minute when deleting one small file

    - by stacey.richards
    Every now and again I log into a Windows Server 2003 box with a remote desktop connection and delete one small file. When I do this, the Deleting... dialog box appears and remains on the screen for well over a minute. After the dialog box disappears, if I delete another small file, the Deleting... dialog box appears then disappears quickly. Why does it take so long to delete the first file after logging into a Windows Server 2003 box with a remote desktop connection? Is there a trick to speeding it up?

    Read the article

  • Dynamic jQuery dialog after data append w/o reloading page. Possible?

    - by Arun
    Howdy, So I have a page with an enormous table in a CRUD interface of sorts. Each link within a span calls a jQuery UI Dialog Form which fetches it's content from another page. When the action taking place (in this case, a creation) has completed, it appends the resulting new data to the table and forces a resort of the table. This all happens within the JS and the DOM. The problem with this, is that the new table row's CRUD links don't actually trigger the dialog form creation as all the original links in spans are only scanned on document.ready and since I'm not reloading the page, the new links cannot be seen. Code is as follows: $(document).ready(function() { var $loading = $('<img src="/images/loading.gif" alt="Loading">'); $('span a').each(function() { var $dialog = $('<div></div>') .append($loading.clone()); var $link = $(this).one('click', function() { // Dialog Stuff success: function(data) { $('#studies tbody').append( '<tr>' + '<td><span><a href="./?action=update&study=' + data.study_id + '" title="Update Study">Update</a></span></td>' + '</tr>' ); fdTableSort.init(#studies); // This re-sorts the table. $(this).dialog('close'); } $link.click(function() { $dialog.dialog('open'); return false; }); return false; }); }); }); Basically, my question is if there is any way in which to trigger a jQuery re-evaluation of the pages links without forcing me to do a browser page refresh?

    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

  • Opening html modal dialog

    - by Hulk
    All, I need to get the contents below on a modal window.I had been trying this for a while today. On modal window opened the background body contents are not accessible.and on reload page the modal popup should close down leavinfg the contents of the text area as it is. <a href="" id="link">Open Popup</a> <table><tr width="10%"><td> <TEXTAREA name="text1" id="text1" rows="15" cols="65" onscroll="sync();" spellcheck="false"></TEXTAREA> </td> <td> <TEXTAREA Name="text2" id="text2" rows="15" cols="65" spellcheck="false"> </TEXTAREA> </td></tr> <tr> <tr width="90%"><td> </td> </tr> </table> <input type="button" value="Compile" onclick="stat('')"/> <input type="button" value="Reload Page" onClick="window.location.href=window.location.href"> Thanks..

    Read the article

  • jquery ui dialog modal in asp.net

    - by Abu Hamzah
    i have a form with a button called "add person" so when the user clicks on it i want to open a jquery ui dialgo modal form with and once the use enter the detail (first name, last name etc...) and click submit the form than i want to update the data enter back to gridview.

    Read the article

  • Delphi overwrite existing file on save dialog

    - by AfterImage
    Hello everyone, I am using the TSaveDialog component to save a file from a button click. However, I am having trouble with saving on an existing file name. Generally, when you want to save over an existing file in Windows, a message box pops up asking you if you really want to overwrite the file. This is not the case with the TSaveDialog component and it will go ahead and write over the file without asking. I was hoping there was a TSaveDialog function or event that I could use but I have not seen anything that looks like it handles this. So it could be that I simplely haven't found the correct method to use. If there is an event, I could use if FileExists(saveDialog.FileName) then //and so forth but the events TSaveDialog has are OnCanClose, OnClose, OnFolderChange, OnIncludeItem, OnSelectionChange, OnShow, OnTypeChange... My question is, how do I pop up a message box to ask the user if they want to overwrite the existing file using the TSaveDialog component. Thanks.

    Read the article

  • Closing a Dialog Box, Opening a New One and it is Grayed out (Colorbox)

    - by Scott Faisal
    $.fn.colorbox({width:"40%", inline:true,href:"#somediv", opacity:"0.50",transition:"none", height:"490px"}); On #somediv above I have a button that once clicked executes the following code: line#45 $.fn.colorbox({href:"http://www.facebook.com", width:"65%",height:"80%",iframe:true}); I see facebook.com however the overlay is grayed out. I even tried using the following code instead of line#45 : $(document).one('cbox_closed', function(){ setTimeout(function(){ $.fn.colorbox({href:"http://www.facebook.com", width:"65%",height:"80%", iframe:true});},2); }); Now all I see is a blank overlay. Any suggestion guys?

    Read the article

  • My dialog box below does not work, Please correct

    - by Mukul Shukla
    pbutton.setOnClickListener(new OnClickListener() { private AlertDialog show; public void onClick(View arg0) { if ((input1.getText().length() == 0) || (input1.getText().toString().equals(" ")) || (input2.getText().length() == 0) || (input2.getText().toString().equals(" "))|| (input1.getText().toString().equals(""))||(input2.getText().toString().equals(""))) { show = new AlertDialog.Builder(MainActivity.this).setTitle("Error").setMessage("Some inputs are empty").setPositiveButton("OK", null).show(); } double result = new Double(input1.getText().toString())+ new Double(input2.getText().toString()); output.setText(Double.toString(result)); } I've also tried passing the context which also doesn't work

    Read the article

  • Repeat over files in a File > Open dialog with Applescript

    - by GotNoSugarBaby
    In the below script I use an Application other than Finder to launch an "Open" browser and perform a search in it. I've got the window into the state I want, but whatever I try can't access the list of files to repeat over. If anyone can help by adding the code to repeat over that file list and log out the file path of each file it'd be a huge help. Thanks a lot. tell application "Preview" -- start the app activate -- let it boot up delay 3 -- ensure it still has focus activate end tell tell application "System Events" tell process "Preview" -- spawn "Open" window keystroke "o" using {command down} delay 0.5 -- spawn "Go to" window keystroke "g" using {command down, shift down} delay 0.5 -- expand scope of search to all of this mac keystroke "/" keystroke return delay 0.5 -- spawn search field keystroke "f" using {command down} delay 0.5 -- perform search keystroke ".jpg OR .jpeg" keystroke return end tell end tell

    Read the article

  • Get dialog input field IDs in CKEditor

    - by rt-uk
    Each input field in the CKEditor dialogs are renamed with a unique number, but the number changes depending on what options are visible. I need to reference 'txtUrl' which has an id something like #35_textInput. So far I have discovered that something like this should work: alert(CKEDITOR.instances.myElement.document.$.body.getId('txtUrl')); But it doesn't. Please help.

    Read the article

  • .htaccess authentication from a php script to prevent a browser dialog box

    - by digitalbart
    Using php I authenticate a user, then behind the scenes,they are then again authenticated a second time with a single .htaccess username & password. This would be the same for all users, but I would not want them to have to enter a username and password again and they would now be allowed to enter the password protected directory. I prefer not to use http://username@password:somedomain.com. Any thoughts?

    Read the article

  • How can I get a Dialog style activity window to fill the screen?

    - by Matthias
    I am using an activity with the dialog theme set, and I want it to be full screen. I tried all sorts of things, even going through the WindowManager to expand the window to full width and height manually, but nothing works. Apparently, a dialog window (or an activity with the dialog theme) will only expand according to its contents, but even that doesn't always work. For instance, I show a progress bar circle which has width and height set to FILL_PARENT (so does its layout container), but still, the dialog wraps around the much smaller progress bar instead of filling the screen. There must be a way of displaying something small inside a dialog window but have it expand to full screen size without its content resizing as well?

    Read the article

  • How to use SharePoint modal dialog box to display Custom Page Part2

    - by ybbest
    In the first part of the series, I showed you how to display and close a custom page in a SharePoint modal dialog using JavaScript. In this one, I’d like to show you how to display some information after the Modal dialog is closed.You can download the source code here. 1. Firstly, modify the element file as follow <Elements xmlns="http://schemas.microsoft.com/sharepoint/"> <CustomAction Id="ReportConcern" RegistrationType="ContentType" RegistrationId="0x010100866B1423D33DDA4CA1A4639B54DD4642" Location="EditControlBlock" Sequence="107" Title="Display Custom Page" Description="To Display Custom Page in a modal dialog box on this item"> <UrlAction Url="javascript: function emitStatus(messageToDisplay) { statusId = SP.UI.Status.addStatus(messageToDisplay.message + ' ' +messageToDisplay.location ); SP.UI.Status.setStatusPriColor(statusId, 'Green'); } function portalModalDialogClosedCallback(result, value) { if (value !== null) { emitStatus(value); } } var options = { url: '{SiteUrl}' + '/_layouts/YBBEST/TitleRename.aspx?List={ListId}&amp;ID={ItemId}', title: 'Rename title', allowMaximize: false, showClose: true, width: 500, height: 300, dialogReturnValueCallback: portalModalDialogClosedCallback }; SP.UI.ModalDialog.showModalDialog(options);" /> </CustomAction> </Elements> 2. In your code behind, you can implement a close dialog function as below. This will close your modal dialog box once the button is clicked and display a status bar. protected static string GetCloseDialogScript(string message) { var scriptBuilder = new StringBuilder(); scriptBuilder.Append("<script type='text/javascript'>" + "SP.UI.ModalDialog.commonModalDialogClose(1,").Append(message).Append("); </script>"); return scriptBuilder.ToString(); }

    Read the article

  • How to use SharePoint modal dialog box to display Custom Page Part2

    - by ybbest
    In the first part of the series, I showed you how to display and close a custom page in a SharePoint modal dialog using JavaScript. In this one, I’d like to show you how to display some information after the Modal dialog is closed.You can download the source code here. 1. Firstly, modify the element file as follow <Elements xmlns="http://schemas.microsoft.com/sharepoint/"> <CustomAction Id="ReportConcern" RegistrationType="ContentType" RegistrationId="0x010100866B1423D33DDA4CA1A4639B54DD4642" Location="EditControlBlock" Sequence="107" Title="Display Custom Page" Description="To Display Custom Page in a modal dialog box on this item"> <UrlAction Url="javascript: function emitStatus(messageToDisplay) { statusId = SP.UI.Status.addStatus(messageToDisplay.message + ' ' +messageToDisplay.location ); SP.UI.Status.setStatusPriColor(statusId, 'Green'); } function portalModalDialogClosedCallback(result, value) { if (value !== null) { emitStatus(value); } } var options = { url: '{SiteUrl}' + '/_layouts/YBBEST/TitleRename.aspx?List={ListId}&amp;ID={ItemId}', title: 'Rename title', allowMaximize: false, showClose: true, width: 500, height: 300, dialogReturnValueCallback: portalModalDialogClosedCallback }; SP.UI.ModalDialog.showModalDialog(options);" /> </CustomAction> </Elements> 2. In your code behind, you can implement a close dialog function as below. This will close your modal dialog box once the button is clicked and display a status bar. protected static string GetCloseDialogScript(string message) { var scriptBuilder = new StringBuilder(); scriptBuilder.Append("<script type='text/javascript'>" + "SP.UI.ModalDialog.commonModalDialogClose(1,").Append(message).Append("); </script>"); return scriptBuilder.ToString(); }

    Read the article

  • Platform Builder: Disable the USB Driver Dialog

    - by Bruce Eitman
    For a long time, Windows CE developers and users have wanted to disable the USB Driver Dialog that is displayed when an unknown USB device is plugged into the host controller.   Of course the question is always why would you want to do such a thing? The simple answer is that there are USB devices that are needed, like printers, which expose multiple functions to the bus, like scanners and faxes, which no Windows CE driver exists to support.   So the printer quietly loads a driver, but then the other functions cause a dialog to be shown. One solution is to create a USB Class driver that loads by default if no other driver has been loaded. This driver just accepts anything that it sees and then does nothing with it. Starting with the Windows Embedded CE 6.0 R3 March QFE/update, the USB 2.0 driver has a registry value to disable the dialog: [HKEY_LOCAL_MACHINE\Drivers\USB\LoadClients]       "DoNotPromptUser"=dword:0   Setting the DoNotPromptUser value to 1 disables the dialog. The default value is zero, so the driver continues to behave in the same way it always did unless you change this registry value.     Copyright © 2010 – Bruce Eitman All Rights Reserved

    Read the article

< Previous Page | 7 8 9 10 11 12 13 14 15 16 17 18  | Next Page >