FAQ Database Discussion Community


Javascript alert box blocks sound object

javascript,audio,alert
I have a small problem. Basically, I am trying to make an application that it will pop up a box while playing a certain sound. Here is the fault part of the code: var audio = new Audio('song.mp3'); audio.play(); alert(1); The problem is that the audio plays after the alert...

Wait for a web page alert in CasperJS

javascript,automation,alert,casperjs,headless
I'm a newcomer to CasperJS and after a couple hours I can login and navigate a few webpages with it, but I'm stumped by the alert message on this website: https://www.macysliquidation.com/ I need to get rid of the alert so I can login. My simple (non-working) code is: var casper...

Alert not working in UpdatePanel VB.Net

javascript,asp.net,vb.net,alert
Here is what I have tried. ASPX File: <asp:UpdatePanel ID="UpdatePanel1" runat="server"> <ContentTemplate> <asp:Button OnClick="btnOK1_Click" ID="btnOK1" runat="server" Text="Save" /> </ContentTemplate> </asp:UpdatePanel> ASPX.VB: Protected Sub btnOK1_Click(sender As Object, e As EventArgs) Dim alertMsg As String Dim alertScript As String alertMsg = String.Format("You Selected {0}", "My Message") alertScript = String.Format("<script type= text/javascript>alert('{0}');</script>", alertMsg)...

I want to show an alert that asks the user if they want to close the tab or be redirected

javascript,html,tabs,alert
I need to know if there is a way to show an alert when the user closes the tab, similar to "Do you want to close the tab?" but with something like "Hey, we have an offer, do you want to check it out?", and if they press "Yes", redirect...

Show alert message after confirm message with link_to rails

ruby-on-rails,alert,link-to
I want to show a alert message just after confirm message launched by a link_to on Rails 3.2.11 into a haml. I mean, I'll to ask for confirm the action, then I show a message (alert) with the confirmation. I have the following code: = link_to([:archive, :admin, campaign], method: :put,...

Javascript:: audio.currentTime is updated properly only after alert

javascript,audio,alert,innerhtml,isset
I think that I found a bug on JavaScript Audio API. My code is working perfectly like that : var audio=new Audio(); var lastPause; var myPlayer=document.querySelector('#player>.button.hand'); var playerStatus=("textContent" in document)?"textContent":"innerText"; myPlayer.addEventListener ( 'click', function() { if(audio.paused) { audio.src="Nadav Guedj - Golden Boy (Eurovision 2015 - Israel - Karaoke).mp3"; myPlayer.innerHTML="&#9658;"; if(lastPause)...

android test alarm - can't activate it

android,timer,alert
I set an alarm in my app to notify the user. I want to test it but can't figure out how to set it to the current time + 2 minutes. How can I do it? Here's my code Intent myIntent = new Intent(MainActivity.this , PopupWin.class); AlarmManager alarmManager = (AlarmManager)getSystemService(ALARM_SERVICE);...

How to blur the background when an alert is showing?

xcode,alert,blur
I would like to apply a blur effect to the existing view when an alert is shown on the screen, and I am currently doing this by displaying an imageView (BlurEffect:blurBackGroundSignUp) on top of my view, hiding it initially and showing it when calling the following code: [self BlurEffect:blurBackGroundSignUp]; The...

Pop up not showing! PHP echo+alert

php,echo,alert
Can someone explain to me why my alert is not working? It was fine some days ago, but suddenly it stopped showing, the thing is that only ONE is broken. Please, see the code below, the "echo ..." inside the IF(){ does not work, while the "echo..." outside the IF(){...

PHP: Echoing a JQuery Alert from case statement

javascript,php,html,echo,alert
I am trying to echo a JQuery alert from PHP. The method I am using is to echo the entire script tags and then the JQuery within it. JQuery is working because alerts elsewhere work. the JQuery library is loaded before the code i am trying so it is not...

JavaFX alert dialog ignores the focused button

javafx,alert
Why does the JavaFX alert dialog fires the Platform.exit(); when I press the Enter key even though the focused button in the alert dialog is Cancel? soaStage.setOnCloseRequest(new EventHandler<WindowEvent>() { @Override public void handle(WindowEvent event) { Alert alert = new Alert(Alert.AlertType.CONFIRMATION); alert.setTitle("Confirm"); alert.setHeaderText("Are you sure you want to exit?"); alert.setContentText("Press OK...

Magento Shopping Cart “alert ##” rules are somehow being automatically generated

magento,alert,shopping-cart,rules
Over the past couple of months, we seem to be getting all these automatically generated shopping cart rules being created. They have the name of "Alert #691", "Alert #697" etc. The incrementation appears to be a bit random (but always increases). We get about 2-5 of these rules per day....

getting wrong values from intent android

android,android-intent,alert
I am new to android and I am developing my 1st application for location based reminders. I am adding tasks with locations, dates and times for which when I reach I should be notified. I'm getting the alert properly for the task. The problem is when the alert is generated...

How to display a color alertbox

javascript,alert
How do I add color in a Alert box in JavaScript? The whole box must be colored and the text must be bold. I tried to add color to them using CSS property, but it did not work.

code executed in wrong order in Firefox with setTimeout after alert

javascript,firefox,settimeout,alert
Run the following code in any browser( try it several times): console.log('processing: task #1'); setTimeout(function(){ console.log('processing: task #3'); },0); alert('See console logs'); console.log('processing: task #2'); In my understanding, the above code would result console output being: "processing: task #1" "processing: task #2" "processing: task #3" But in Firefox( v38.0.1), it...

Unstrusted App Developer alert customisation

ios,certificate,alert,profile
Can I somehow edit text in quotes? So it would look like this: Do you trust the developer "My Company Name" to run apps on your iPhone? Without this "iPhone Developer: " or "iPhone Distribution: " parts?...

What does '$(this)' contains in a below javascript function code?

javascript,jquery,function,this,alert
Following is the code of a function : $Core.notification = { bDebug: false, update: function() { setTimeout('$.ajaxCall("notification.update", "", "GET");', 1000); }, setTitle: function() { var iTotal = 0; var sTitle = $('title').html(); $('.holder_notify_count').each(function(){ alert($(this)); iTotal += parseInt($(this).html()); }); var newTitle = ''; var aMatches = sTitle.match(/(\([0-9]*\))/i); if (aMatches !== null...

Swift: Problems with getting text from UIAlertView textfield

ios,swift,alert,uialertview,textfield
I'm using Swift with Xcode 6.3. In my application I want a alert with a textfield. After clicking on "Done" I want to save the textfield input in a String. After clicking on "Cancel" I want only to close the alert. I've created my alert like this: var alert =...

Show alert() after executing managed bean action method

jsf,alert,facelets
I've a command link: <h:commandLink value="Delete" onclick="return confirm('Are you sure?');" action="#{bean.deleteDestination(destination, '/destination/show')}" /> It invokes this managed bean action method: public String deleteDestination(Destination selected, String action) { List<Flight> flights = getEjbFlightFacade().findFlightWithDestination(selected); if (flights.isEmpty()) { getEjbDestinationFacade().remove(selected); setDestinations(getEjbDestinationFacade().findAll()); } else { // Here need to show an alert() that user...

Javascript alerts and using php variables in javascript

javascript,php,alert
I have the below section of code where I want to display how many orders have been added if conditions of the $orderstat are met. The alert works but not with the $orderstat variable inside it. Can anyone see what I am doing wrong? Thanks in advance! session_start(); $orderstat =...

suggestions to alert the end user when some thing goes bad

javascript,web-services,alert
What is the usual practice to notify the endusers for web interfaces that something has gone wrong in java script.. i am using alert method as below injava script...am looking for suggestions on better ways to do this? if (submitted = 'True' && submittedlist.length == ui_gerrits.length ){ alert(submittedlist + ":...

How to get alert text in jQuery?

c#,jquery,alert,response.write
I called 'alert' box from C# Response.Write("<script>alert('Click Checkbox'); </script>"); and I want to get this text from 'alert' box in jQuery. Text what I want is 'Click Checkbox'. How can I get it?...

Alert button's inner content after clicking it

javascript,jquery,click,alert,innerhtml
Please, help fix bug: the code currently alerts undefined instead of button's inner contents function registerClickHandler() { $('#clickme').click(function() { setTimeout(function() { alert(this.innerHTML); }, 200); }); } ...

How to alert when I input more that limit length?

jquery,alert
I create an input and it's support number only and maxlength only 3 digits. when i type more than 3 digits I want it alert right away without press any button. How to do that in jQuery? HTML <input type="text" name="txtprice" id="txtprice" class="input-xlarge" maxlength="3" required />&nbsp;<span id="errmsg"></span> Javascript $(document).ready(function ()...

Use of unresolved identifier using an alert.addAction

swift,alert,uialertaction
I'm getting an error on my alert.addAction(). Seems like my project doesn't know where to find it, am I right? I made an alert without buttons, now I'm trying to add buttons to it. So this is my alert window and the code to add the buttons: func naamInModelChangedHandler (...

Javascript: For loop 'i' value is retured different than stored

javascript,for-loop,alert
In this loop the alert(i) alerts 12,and firebug displays 10 as the end result. for(var i=0;i<=10;i=i+2){ document.write=i; } alert(i); ...

Using SweetAlert in Javascript

javascript,html,button,alert,sweetalert
I have the same question as this guy: Sweetalert - Call function in Javascript With the answers given in that question I can not figure out the problem. I have downloaded the .js and .css files from http://tristanedwards.me/sweetalert. I have saved them in the same project as I am working...

making alert box permanently disappear after clicking the 'x'

zurb-foundation,alert
I'm trying to find a way to make the alert box of: <div data-alert class="alert-box info radius"> This is an info alert with a radius. <a href="#" class="close">&times;</a> </div> permanently disappear after the user clicks the 'x' button in the corner, right now it persists next time the user reloads...

Javascript alert is opening a PHP include file and not staying on the home page

javascript,php,alert
The home page is index.php and it contains an include for a different sidebar_signin_block.php file that creates a user login block. In the sidebar_signin_block.php if the login succeeds I am using this javascript to send them to a login success splash page: echo "<script>window.open('login-success.php','_self')</script>";}Now on the other hand if the...

My UIAlertController keeps adding new buttons each time the alert is called, causing endless buttons

ios,swift,alert,uialertcontroller
I am adding alerts to prevent the user from overwriting previously used data, and I am using a UIAlertController as recommended in a different post. The involved code looks like this : var alert:UIAlertController = UIAlertController(title: "Are you sure?", message: "This will overwrite your information", preferredStyle: UIAlertControllerStyle.Alert) func showAlert() {...

Keyboard doesn't show on focus in alert dialog

android,dialog,android-edittext,focus,alert
I have a dialog which I extend from custom PopupDialog. The problem is that the keyboard won't appear on focus EditText field . I've tried with clearFlags and other things, but the problem is still there. public class PopupDialog<RESULT> extends AlertDialog { private final View mContentView; private final AppActivity mActivity;...

alert while loop javascript

javascript,while-loop,alert
Hiii there I need some help with how i take out the alert("Du har inga behörighet!"); outside the while loop while (userEnumerator.moveNext()) { var oUser = userEnumerator.get_current(); var title = oUser.get_title(); if (title == user.get_title()) { if (document.getElementById("divTable").style.display == "") { $("#lblAnvandareNamn").text("Välkommen " + first + ", du inloggad som...

Remove left padding of Alert

javafx,alert,javafx-8,padding
Consider this sample program which is adding a TabPane into an Alert. As you will see, there is a white padding on the left of the TabPane that I just cannot remove. If anyone has any idea it will be great. Code: import javafx.application.Application; import javafx.geometry.Insets; import javafx.scene.Scene; import javafx.scene.control.Alert;...

How to run script behind alert box in javascript?

javascript,alert
I want to run alert("hi") in 3 seconds after alert("hello") without clicking on OK of "hello" alert. This is my code: $(function(){ alert("hello"); setTimeout(function(){ alert("hi"); },3000) }) ...

Can't see how to disable an AlertDialog Box

java,android,alert
I'm trying to figure out how to disable definitely an AlertDialog Box when I press the negative/positive button. My current app works tapping the screen and I want my app to show an AlertDialog Box at the first tap. This Box says "attention, some of the names are invented!" and...

Alert Dialogue in Android-beginners

android,alert
I am trying to create a simple alert dialogue and I am following the steps from this link However,I am getting the error: getActivity() can't be resolved After some search I understood that getActivity() can be user defined, but I am not sure what should I make it do. Here...

Value change Alert VBA

excel,vba,alert,value
so I'm trying do to a alert where if the column is changed to "496", it gives a MsgBox with a alert, and the the alert needs to say the row where the change as taken place and that the value was altered to "496", I'm also aiming at putting...

Ionic update Checkbox value

angularjs,controller,ionic-framework,alert,ionic
I'm trying to update the Toggle/Checkbox value back to default/Off when the user selects the cancel option. Currently it sticks to Red/On. Any suggestions to figuring this out would be great, Before Alert After Controller // Default Value $scope.turnClearAppData = 'Off'; // Ionic OK Alert $scope.showConfirm = function(val) { if...

popUp appears before clicking the button

javascript,onclick,popup,alert
The popUp alert should only appear when I click the "button" (the only word on the screen is the button) but instead the popUp alert shows before even clicking! var saldo=100; var popUp= document.getElementById("buy"); function doPopUp(custo2){ if (custo2>saldo){ alert("You don't have enough money!"); } } popUp.onclick=doPopUp(200); <!DOCTYPE html> <html> <head>...

Triggering Code when a specific value is inserted into a table column in an Azure SQL Table

triggers,alert,sql-azure
I am seeking suggestions on methods to trigger the running of code based on specific event occurring. Basically I need to monitor all inserts into a table and compare a column value against a parameter set in another table. For example, when a new record is added to the table...

How to delete my contact using a dialog?

android,dialog,alert,contacts,android-contacts
What I'm trying here is I want to long press the number that I select and it will pop-up an alert dialog that ask me to delete. If I press Ok it will be deleted. I'm new here, I'm new in android I just want it know if it's possible...

How to “if not an integer , alert and repeat prompt” ? the same with isNAN

javascript,alert,prompt,fizzbuzz
i m struggling with this. How to "if not an integer , alert and repeat prompt" ? I have the alert working , but i cant make it to prompt again. The same with isNAN which is not working at all! Thank you $(document).ready(function () { var fizzBuzz = function...

How does confirm() work in JavaScript

javascript,html,function,alert
I was thinking about how the native functions in JavaScript work today, and I can across alert() and I figured it must use createElement() or make an element and use innerHTML, but I can't figure out the complete code it would need to create a popup element, and make two...

Create javascript alert in PHP [closed]

javascript,php,alert
How can I create a javascript alert using PHP? This does not work echo "alert('my message')"; Thanks in advance....

iOS modal overlay menu

ios,swift,menu,modal-dialog,alert
I was wondering if there were a built-in view in XCode for displaying pop-up menus like this for iOS apps? Something like an alert, except with just a set of vertically-stacked buttons? EDIT: I knew about UIAlertController, just not that its buttons stack vertically after you add more than...

Add glyphicon to angular-ui alert

angularjs,bootstrap,alert,angular-ui
I'm trying to add a glyphicon to a default Angular-UI Bootstrap style alert. I'm playing with the Plunker here: http://plnkr.co/edit/KeI1gGqa46d3lptIcoF9?p=preview Here is what I'm trying to achieve: <div class="alert alert-warning"> <span class="glyphicon glyphicon-exclamation-sign"></span> <span>What I want!</span> </div> How can I have the image and the message on one line? Resolution...

registerUserNotificationSettings doesn't display alert

ios,objective-c,alert,uilocalnotification
I'm asking the user for permission to use local notifications on iOS 8 like this: if ([UIApplication instancesRespondToSelector:@selector(registerUserNotificationSettings:)]){ UIUserNotificationType types = UIUserNotificationTypeBadge | UIUserNotificationTypeSound | UIUserNotificationTypeAlert; UIUserNotificationSettings *notificationSettings = [UIUserNotificationSettings settingsForTypes:types categories:nil]; [[UIApplication sharedApplication] registerUserNotificationSettings:notificationSettings]; } And I'm handling like this in my...

jquery putting json in a dialog

jquery,json,parsing,dialog,alert
I have this piece of code inside a jQuery focusout : $.ajax({ type : 'GET', data : 'auteur='+auteurExiste, url : 'existeAuteur.php', success: function(data) { jQuery.each(data, function(index,item) { alert ("bla bla bla "+item) }); } }); The json response from existeAuteur.php is : 0:"Le droit privé" 1:"Le droit foncier" This of...

Javascript alert: block if message contains certain word?

javascript,alert
I have a webapp that makes calls to a database. Every once in a while, we get a javascript alert dialog that says that the transaction was deadlocked. Honestly, we don't care if that happens because it's not an interactive app...it just displays data based on a timer and if...

Swift - alert action handler error

ios,swift,handler,alert,flurry
I have some strange stuff going on: trying to track if a share action was cancelled in UIAlertAction handler with FLurry Analytics SDK. The code should basically look like that: let cancelAction = UIAlertAction(title: "Cancel", style: UIAlertActionStyle.Cancel, handler: { (action:UIAlertAction!) -> Void in Flurry.logEvent("Share Cancelled") } ) But compiler shows...

script for on load alert box based on url

javascript,alert
I am creating a submittal form, sending the form to a php form, and after the form completes having it redirect to the initial page with an additional "?s=1" in the url. Basically what I am trying to do is create an alert box pop up on loading the page...

Alert once an activity is detected

matlab,audio,alert
My program is to record automatically once a sound is detected, I want to put an audible alert once the program starts recording.

JavaFX confusing event handling on System Exit

javafx,dialog,event-handling,alert
The code bellow generates an Alert Dialog with two buttons, Ok and Cancel; and it also works as expected: if I click Ok, the system exits, otherwise the dialogs vanishes. The strange thing is: if I ommit the else block handling the event, the platform will always exit, not considering...

How to program an silent automatic email alter in Android?

android,email,alert
Sorry, I'm new to Android, so I have a button in my Activity and I want that every time when someone clicks that button, an email will be sent to my email address. I found a couple of email APIs that open the email app of the smartphone but what...

Swift expecting declaration but already declared

swift,alert,declaration
I am trying to create an alert view that performs a certain action when the button is clicked. I have tried creating a new class for the alert view, but when I try to add an action to the alert view controller, Xcode tells me that it is expecting a...

how to realize an alert that disappears after some seconds

javascript,jquery,alert
I am struggling trying to find a way to create an alert that opens when you click a button and then should disappear after an amount of time that can be set as a parameter. so far I have this: <script> function myFunction() { alert("I will think later what to...

Check if a text box starts with 92 using javascript [closed]

javascript,html,validation,alert
<form name="home" action="" onsubmit="return Validateform();" method="post"> <input type="text" name="receiver" /> <input type="submit" value="send" name="send" /> </form> What is the javascript to alert if the textbox does not start with 92 on submit?...

How to set JavaFX-Alert into middle of actual monitor?

javafx,alert,dual-monitor
I've got a static method in a class without knowing anything about the Application, Scene oder Stage. But I want to show an Alert in the middle of the actual used monitor. For example: My tool is on the right screen. I want to see the alert also there and...

Meteor: JS alertbox 'cancel' is deleting my db entry instead of canceling the requested delete

javascript,meteor,alert
I have an alert box on a delete option, but when 'cancel' is pressed it still deletes the data :( Here's the button in my html page. <input type="button" class="remove" value="Remove Player" onclick="return confirm('Are you sure?');"> Here's the delete code in the js file: 'click .remove': function(){ var selectedPlayer =...

javascript alert php string with space

javascript,php,string,alert
how to get a php values contain spaces with javascript? I have a php code below <?php $firstName = "my first name"; echo "<input type='button' onclick=showFirstName(".$firstName.");>"; ?> and my script below <script> function showFirstName(firstName){ alert(firstName); } </script> and that alert wont work, it is different if just like $firstName =...

Make an alert only appear when app is opened

java,android,alert,onstart
Is there a way to make an alert only appear when the app is opened? I'm creating an alert in onStart() in my MainActivity and whenever I go back to that activity in the app, it shows the alert again which can be annoying to the user. Or is there...

Trigger bootstrap modal if a condition statement is not met

javascript,jquery,twitter-bootstrap-3,alert,bootstrap-modal
Instead of using the default jquery alert popup, I'd like to trigger a Bootstrap Modal. All the tutorials I've read, the modal is triggered by the click(function(){});. I'd like to have if triggered if a condition in my "if statement" is not met. Here is the code I have var...

Excel VBA - Value & MsgBox

excel,vba,alert,value
I posted a question about this piece of code that is already changed by "Alex Bell", He helped me with the code making a MsgBox appear every time the value "496" appears in that specific range. But due to my poor knowledge in this language, there's a lot of things...

Alart or modal screen javascript

javascript,jquery,twitter-bootstrap,modal-dialog,alert
I am developing a site where there is a part where I perform a zip code query, when I give "TAB" or simply click off the field to inform data to the query is performed the event (I'm execulting my JavaScript code in the onblur event in my inputbox). However,...

code in willTransition callback executed after model callback after a window.alert

firefox,ember.js,alert,back-button,html5-history
I recently encountered a bug with Ember.js. Basically when I click the browser back button in Firefox, Ember.js executes the code in wrong order. The code in willTransition callback right after the line alert("..."); is executed after model callback, which should normally be executed right after alert("..."); is returned. The...

Javascript program keeps outputting wrong index of array

javascript,arrays,alert
I'm trying to finish an assignment, I'm stuck at and can't find a solution. Below is my full code. //Student Object var student = { f_name: "", l_name: "", s_numb: "", email: "", courses: [], /*This function returns if current object has a specific course and returns true if it...