Search Results

Search found 1906 results on 77 pages for 'confirm'.

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

  • 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

  • User is trying to leave! Set at-least confirm alert on browser(tab) close event!!

    - by kaushalparik27
    This is something that might be annoying or irritating for end user. Obviously, It's impossible to prevent end user from closing the/any browser. Just think of this if it becomes possible!!!. That will be a horrible web world where everytime you will be attacked by sites and they will not allow to close your browser until you confirm your shopping cart and do the payment. LOL:) You need to open the task manager and might have to kill the running browser exe processes.Anyways; Jokes apart, but I have one situation where I need to alert/confirm from the user in any anyway when they try to close the browser or change the url. Think of this: You are creating a single page intranet asp.net application where your employee can enter/select their TDS/Investment Declarations and you wish to at-least ALERT/CONFIRM them if they are attempting to:[1] Close the Browser[2] Close the Browser Tab[3] Attempt to go some other site by Changing the urlwithout completing/freezing their declaration.So, Finally requirement is clear. I need to alert/confirm the user what he is going to do on above bulleted events. I am going to use window.onbeforeunload event to set the javascript confirm alert box to appear.    <script language="JavaScript" type="text/javascript">        window.onbeforeunload = confirmExit;        function confirmExit() {            return "You are about to exit the system before freezing your declaration! If you leave now and never return to freeze your declaration; then they will not go into effect and you may lose tax deduction, Are you sure you want to leave now?";        }    </script>See! you are halfway done!. So, every time browser unloads the page, above confirm alert causes to appear on front of user like below:By saying here "every time browser unloads the page"; I mean to say that whenever page loads or postback happens the browser onbeforeunload event will be executed. So, event a button submit or a link submit which causes page to postback would tend to execute the browser onbeforeunload event to fire!So, now the hurdle is how can we prevent the alert "Not to show when page is being postback" via any button/link submit? Answer is JQuery :)Idea is, you just need to set the script reference src to jQuery library and Set the window.onbeforeunload event to null when any input/link causes a page to postback.Below will be the complete code:<head runat="server">    <title></title>    <script src="jquery.min.js" type="text/javascript"></script>    <script language="JavaScript" type="text/javascript">        window.onbeforeunload = confirmExit;        function confirmExit() {            return "You are about to exit the system before freezing your declaration! If you leave now and never return to freeze your declaration; then they will not go into effect and you may lose tax deduction, Are you sure you want to leave now?";        }        $(function() {            $("a").click(function() {                window.onbeforeunload = null;            });            $("input").click(function() {                window.onbeforeunload = null;            });        });    </script></head><body>    <form id="form1" runat="server">    <div></div>    </form></body></html>So, By this post I have tried to set the confirm alert if user try to close the browser/tab or try leave the site by changing the url. I have attached a working example with this post here. I hope someone might find it helpful.

    Read the article

  • Using jquery ui dialog to confirm action for form submission

    - by redbluegreen
    I have multiple forms on a page, for each of them I want the user to confirm before form submission. but when the user confirms to submit, how do I let this dialog know which form the user is sumbitting? Does it take custom parameters? Thanks. $("#dialog-confirm").dialog({ resizable: false, height:140, modal: true, buttons: { 'Confirm submit': function() { document.______???????_____.submit(); }, Cancel: function() { $(this).dialog('close'); } } }); $('.allForms').submit(function(){ $('#dialog-confirm').dialog('open'); });

    Read the article

  • jQuery replacement for javascript confirm

    - by dcp
    Let's say I want to prompt the user before allowing them to save a record. So let's assume I have the following button defined in the markup: <asp:Button ID="btnSave" runat="server" OnClick="btnSave_Click"></asp:Button> To force a prompt with normal javascript, I could wire the OnClick event for my save button to be something like this (I could do this in Page_Load): btnSave.Attributes.Add("onclick", "return confirm('are you sure you want to save?');"); The confirm call will block until the user actually presses on of the Yes/No buttons, which is the behavior I want. For the jquery dialog that is the equivalent, I tried something like this (see below). But the problem is that unlike javascript confirm(), it's going to get all the way through this function (displayYesNoAlert) and then proceed into my btnSave_OnClick method on the C# side. I need a way to make it "block", until the user presses the Yes or No button, and then return true or false so the btnSave_OnClick will be called or not called depending on the user's answer. Currently, I just gave up and went with javascript's confirm, I just wondered if there was a way to do it. function displayYesNoAlert(msg, closeFunction) { dialogResult = false; // create the dialog if it hasn't been instantiated if (!$("#dialog-modal").dialog('isOpen') !== true) { // add a div to the DOM that will store our message $("<div id=\"dialog-modal\" style='text-align: left;' title='Alert!'>").appendTo("body"); $("#dialog-modal").html(msg).dialog({ resizable: true, modal: true, position: [300, 200], buttons: { 'Yes': function () { dialogResult = true; $(this).dialog("close"); }, 'No': function () { dialogResult = false; $(this).dialog("close"); } }, close: function () { if (closeFunction !== undefined) { closeFunction(); } } }); } $("#dialog-modal").html(msg).dialog('open'); }

    Read the article

  • confirm alert not working ....

    - by user318068
    I want the work of the Control Panel in my site for members ... I designed the page is displayed all the registered members on my site And i but it checkbox front each member name ,becuase it allowed to select multiple name then click delete button The following code works but now i want confirm alert before delete code working even , if clicked on ok the deletion is working , and if clicked on cancel the is not working .. how i can work it ?? while($row = mysql_fetch_array($sql1)) { ?> <tr> <td align="center" bgcolor="#FFFFFF"><input name="checkbox[]" type="checkbox" id="checkbox[]" value="<?php echo $row['MemberID']; ?>"></td> <td bgcolor="#FFFFFF"><?php echo $row['MemberName']; ; ?></td></tr> <?php } ?> <tr> <td colspan="5" align="center" bgcolor="#FFFFFF"><input name="delete" type="submit" id="delete" value="delete" onclick="javascript:return confirm('are you sure to delete this record???? ')"/></td> </tr> <?php $delete = $_REQUEST['delete']; $checkbox = $_REQUEST['checkbox']; $count = count($_REQUEST['checkbox']); // Check if delete button active, start this if($delete){ echo "<script language=\"Javascript\">\n"; for($i=0;$i<$count;$i++){ $del_id = $checkbox[$i]; $sql = "Delete FROM members where MemberID ='$del_id'"; $sq2 = "Delete FROM joinroom where MemberID ='$del_id'"; $result1 = mysql_query($sql); $result2 = mysql_query($sq2); echo "else {\n"; echo "alert ('Nothing deleted');\n }"; echo "</script>"; } } Thanks a lot.........

    Read the article

  • confirm only 1 time function with jquery

    - by robertdd
    i have this function that will shuffle a list of images, when i press on a #shuffle button i want to trigger a message, if is confirmed the second time i will not want to ask again! how to code this? $('#shuffle').click(function(){ if(confirm('This will shuffle all your bla bla bla')){ $("#upimagesQueue li").shuffle(); } });

    Read the article

  • MSHTML - Auto Click for javascript confirm dialog

    - by Soliton
    I try to automatically parse/submit web page using MSHTML (in C#.Net 3.1 WPF WebBrowser control). I can fill the forms, click buttons, naviagate pages without problems. But do not know how to automatically click "ok" button on javascript confirmation dialog which appear when I click "Submit" button. C# code: mshtml.IHTMLDocument2 doc = (mshtml.IHTMLDocument2)webBrowser.Document; mshtml.IHTMLFormElement form = doc.forms.item("inputForm", 0) as mshtml.IHTMLFormElement; mshtml.IHTMLElement btnSubmit = form.item("btnFormSubmit", null) as mshtml.IHTMLElement; btnSubmit.click(); The confirmation dialog ("Are you sure?" appears. I want somehow to send "Enter" keystroke to MSHTML document to automatically confirm the submission.

    Read the article

  • Executing server validators first before OnClientClick Javascript confirm/alert

    - by kaushalparik27
    I got to answer a simple question over community forums. Consider this: Suppose you are developing a webpage with few input controls and a submit button. You have placed some server validator controls like RequiredFieldValidator to validate the inputs entered by the user. Once user fill-in all the details and try to submit the page via button click you want to alert/confirm the submission like "Are you sure to modify above details?". You will consider to use javascript on click of the button.Everything seems simple and you are almost done. BUT, when you run the page; you will see that Javascript alert/confirm box is executing first before server validators try to validate the input controls! Well, this is expected behaviour. BUT, this is not you want. Then? The simple answer is: Call Page_ClientValidate() in javascript where you are alerting the submission. Below is the javascript example:    <script type="text/javascript" language="javascript">        function ValidateAllValidationGroups() {            if (Page_ClientValidate()) {                return confirm("Are you sure to modify above details?");            }        }    </script>Page_ClientValidate() function tests for all server validators and return bool value depends on whether the page meets defined validation criteria or not. In above example, confirm alert will only popup up if Page_ClientValidate() returns true (if all validations satisfy). You can also specify ValidationGroup inside this function as Page_ClientValidate('ValidationGroup1') to only validate a specific group of validation in your page.        function ValidateSpecificValidationGroup() {            if (Page_ClientValidate('ValidationGroup1')) {                return confirm("Are you sure to modify above details?");            }        }I have attached a sample example with this post here demonstrating both above cases. Hope it helps./.

    Read the article

  • Don't forget to confirm your SQLBits registration

    - by simonsabin
    If you filled in the registration form for SQLBits VI and haven't received an email requesting you to confirm your registration then you are not confirmed and we will be assuming you aren't coming. You need to get that email and click on the confirmation link to confirm your registration We currently have 30 people that have not confirmed. So if you haven't seen an email then please check your spam folders for the email. If you still don't get any luck then please contact us (contactus(at)sqlbits.com) If you are not confirmed and turn up on the day then you will only get in if we have room, and it looks like we wil be over subscribed. you can check your registration status by loggin in to the site and going to the http://www.sqlbits.com/information/Registration.aspx. Check their is a confirmation data at the bottom.

    Read the article

  • Don't forget to confirm your SQLBits registration

    - by simonsabin
    If you filled in the registration form for SQLBits VI and haven't received an email requesting you to confirm your registration then you are not confirmed and we will be assuming you aren't coming. You need to get that email and click on the confirmation link to confirm your registration We currently have 30 people that have not confirmed. So if you haven't seen an email then please check your spam folders for the email. If you still don't get any luck then please contact us (contactus(at)sqlbits.com) If you are not confirmed and turn up on the day then you will only get in if we have room, and it looks like we wil be over subscribed. you can check your registration status by loggin in to the site and going to the http://www.sqlbits.com/information/Registration.aspx. Check their is a confirmation data at the bottom.

    Read the article

  • Confirm that a dns zone is served by a nameserver

    - by adam
    We currently have a domain which has custom nameservers. Our host has their own nameservers. I'd like to switch our domain to use our host's nameservers for a while. Our host tells me that their nameservers hold a replica of our dns zone, but I'd like to confirm this before I switch. Is there a command line tool I can use that I can use to answer the question "does this nameserver know the dns zone of this domain?" Hope that makes sense! Thanks, Adam

    Read the article

  • can I override/redefine "global" Javascript functions, like confirm() and alert()?

    - by EndangeringSpecies
    I want to do some browser automation, and those pesky confirm/alert boxes are a real pain. Disabling javascript completely in this case is not an option, unfortunately. Well, so I was wondering, can I just change the definition of those methods as seen by my browser's javascript interpreter to basically do nothing and return true? Note that I do know about redefining them in the Javascript code directly, e.g. putting in function alert(message) { return true; } but AFAIK this is not a viable approach for this situation because when doing browser automation I have to work with other people's Javascript. Moreover, my program actually begins manipulating these websites already after the page has fully loaded into the browser, so I cannot just first automatically rewrite the javascript and then load the page. Well, so I was wondering if I could instead just "permanently" modify the way alert/confirm are implemented and executed in my browser. Sort of like the equivalent of dll injection and so forth in the realm of windows apps.

    Read the article

  • How Do I Make A Small jQuery Confirm Replacement?

    - by Volomike
    I have a table row with a Delete link on it for deleting that row. I want to create a jQuery feature that pops up above that Delete link an "Are you sure?" yes/no confirm dialog, but in a very small size. How do I achieve this in the least lines of code in jQuery? I mean, I need to determine the x,y of the Delete link that was detected from a click, and then move (and fadeIn()) a DIV into that location. If they click anywhere on that page except Yes on the yes/no, the thing does a fadeOut(). If they click Yes, then it deletes the row with a fadeOut() effect. Note on this I don't need a modal screen dimmer, but the confirm needs to work modally. (Items above that are bolded are something I don't exactly know how to do. Items bolded and italicized are important to what I need to do.) I would think a widget like this would be critical to any Web 2.0 design, much like the Pines Notify feature seems essential.

    Read the article

  • How to pass a parameter in a Javascript confirm function?

    - by Miles M.
    I have something like that in my code: <?php foreach($clients as $client): ?> <tr class="tableContent"> <td onclick="location.href='<?php echo site_url('clients/edit/'.$client->id ) ?>'"><?php echo $client->id ?></td> <td><a class='Right btn btn-danger' onClick="ConfirmMessage('client', <?php $client->id ?>,'clients')"> <i class="icon-remove-sign icon-white"></i> </a></td> </tr> <?php endforeach ?> that's actually the view. So when the user click on the delete button (thr one with the btn-danger class) I'd like him to confirm his choice with a javascript confirmation box message. You can find that script in the header <script> function ConfirmMessage(type, id, types) { if (confirm("Are you sure you want to delete this ",type," ?")) { // Clic sur OK document.location.href='<?php echo site_url(); ?>',types,'/delete/',id; } } </script> So here is my question: I would like the $type to be replaced by a paramenter (like client, article, post .. ) that I'll pass to the function. And i would like to get the $client-id parameter as well. I'm bad in javascript and as you already have guess, It is obviously not working at all.

    Read the article

  • Is it possible for onunload confirm to open a new url in the same window?

    - by Dan Peschio
    Hi - this is my first post and I'm a JS novice, so please forgive my ignorance... Heres my question, its in two parts: 1.) At onunload I want an alert that asks the user if they would like to go to a related URL. The code I'm using works, but it open the URL in a new window and this can be blocked by a pop-up blocker even though the user has opted-in. Is there a way to have it open in the same window and negate the pop-up blocker? 2.) is there a way to take the onunload function out of the body tag and put it the script? Heres the code I'm using: <script language=javascript> function confirmit() { var closeit= confirm("Before you go would you like to add your press kit to the Search Press Kits database?"); if (closeit == true) {window.open("http://NEWURLHERE.com");} else {window.close();} } </script> </head> <body onunload="confirmit();"> peace </body> Thanks in advance, Dan

    Read the article

  • beginner - best way to do a 'Confirm' page? [closed]

    - by W_P
    I am a beginning web app developer, wondering about the best way to implement a "Confirm Page" upon form submission. I have heard that it's best for the script that a form POSTs to to be implemented by handling the POST data and then redirecting to another page, so the user isn't directly viewing the page that was POSTed to. My question is about the best way to implement a "Confirm before data save" page. Do I Have my form POST to a script, which marshals the data, puts in a GET, and redirects to the confirm page, which unmarshals and displays the data in another form, where the user can then either confirm (which causes another POST to a script that actually saves the data) or deny (which causes the user to be redirected back to the original form, with their input added)? Have my form POST directly to the confirm page, which is displayed to the user and then, like #1, gives the user the option to confirm or deny? Have my form GET the confirm page, which then does the expected behavior? I feel like there is a common-sense answer to this question that I am just not getting.

    Read the article

  • Confirm that two filesystems are identical, ignoring special files

    - by endolith
    /media/A and /media/B should be identical, but I want to confirm before deleting one. Duplicate file finders don't work, because they'll find two copies of the same file within B, for instance. I only want to confirm that every file in one is identical to the other. diff -qr /media/A/ /media/B/ seems to work, but the output is cluttered with garbage like diff: /media/A//etc/alternatives/ControlPanel: No such file or directory and File /media/A//dev/tty8 is a character special file while file /media/B//dev/tty8 is a character special file I can suppress the former with 2> /dev/null, but I don't know about the latter. rsync -avn /media/A/ /media/B/ also produces a bunch of clutter, like "skipping non-regular file". How can I compare the two trees and just make sure that all the real files exist in both and are identical?

    Read the article

  • Selenium IDE and custom confirm() function conflict

    - by sakhunzai
    I am using simple modal dialog by Eric Martin. And have defined a function e.g function confirm(message, options) {.... } To customize all confirm dialogs. Its working nicely accross all the browsers.Except when I enable Selenium IDE ,my custom confirm dialog function fails to capture "options" parameters and firefox console echos like this: options is undefined callback=options.callback; Error When Selenium IDE is visible Normal Behaviour When Selenium IDE is closed Please help me sort out this issue so I should able to run selenium tests.

    Read the article

  • Is a "Confirm Email" input good practice when user changes email address?

    - by dibson
    My organization has a form to allow users to update their email address with us. It's suggested that we have two input boxes for email: the second as an email confirmation. I always copy/paste my email address when faced with the confirmation. I'm assuming most of our users are not so savvy. Regardless, is this considered a good practice? I can't stand it personally, but I also realize it probably isn't meant for me. If someone screws up their email, they can't login, and they must call to sort things out.

    Read the article

  • Confirm box when browser/Tag close button clicks

    - by user1316760
    I have created my website for this I like to create confirm box when user clicks browser close button..... So i created my coding as window.onbeforeunload = bunload; function bunload() { dontleave = "Are you sure you want to leave?"; return dontleave; } By this coding I got confirm box for each and every time when browser get loading.....I need confirm box when user only clicks browser close button...... Can anyone give me a idea

    Read the article

  • light confirm script

    - by senzacionale
    http://lalalafactory.blogspot.com/2008/02/light-alet-lightalertjs.html Can anyone tell me what to change that JS confirm button will also work. I add function confirm(obj){ new LightAlert(obj); } but still works like alert not confirm.

    Read the article

  • Rails destroy confirm with Jquery AJAX

    - by Mike
    I have got this working for the most part. My rails link is: <%= link_to(image_tag('/images/bin.png', :alt => 'Remove'), @business, :class => 'delete', :confirm => 'Are you sure?', :id => 'trash') %> :class = "delete" is calling an ajax function so that it is deleted and the page isn't refreshed that works great. But because the page doesn't refresh, it is still there. So my id trash is calling this jquery function: $('[id^=trash]').click(function(){ var row = $(this).closest("tr").get(0); $(row).hide(); return false; }); Which is hiding the row of whatever trash icon i clicked on. This also works great. I thought I had it all worked out and then I hit this problem. When you click on my trash can I have this confirm box pop up to ask you if you are sure. Regardless of whether you choose cancel or accept, the jquery fires and it hides the row. It isn't deleted, only hidden till you refresh the page. I tried changing it so that the prompt is done through jquery, but then rails was deleteing the row regardless of what i choose in my prompt because the .destroy function was being called when the prompt was being called. My question really is how can i get the value to cancel or accept from the rails confirm pop up so that in my jquery I can have an if statement that hides if they click accept and does nothing if they click cancel. EDIT: Answering Question below. That did not work. I tried changing my link to: <%= link_to(image_tag('/images/bin.png', :alt => 'Remove'), @business, :class => "delete", :onclick => "trash") %> and putting this in my jquery function trash(){ if(confirm("Are you sure?")){ var row = $(this).closest("tr").get(0); $(row).hide(); return false; } else { //they clicked no. } } But the function was never called. It just deletes it with no prompt and doesn't hide it. But that gave me an idea. I took the delete function that ajax was calling $('a.delete').click (function(){ $.post(this.href, {_method:'delete'}, null, "script"); $(row).hide(); }); And modified it implementing your code: remove :confirm = 'Are you sure?' $('a.delete').click (function(){ if(confirm("Are you sure?")){ var row = $(this).closest("tr").get(0); $.post(this.href, {_method:'delete'}, null, "script"); $(row).hide(); return false; } else { //they clicked no. return false; } }); Which does the trick.

    Read the article

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