JavaScript Alert YES NO



Share on Google+Share on Google+

Java Coder
JavaScript Alert YES NO
2 Answer(s)      5 years and 6 months ago
Posted in : JavaScript Questions

How to send an alert to a user to confirm if there request is valid or not? I wants to send the alert message in Java Script.

View Answers

April 7, 2012 at 12:41 PM

You can use the confirm() method in Java Script.

if (confirm('Are you sure you want to save this thing into the database?')) {
    // Save it!
} else {
    // Do nothing!

April 7, 2012 at 12:54 PM

<script type="text/javascript">
function show_alert(my_string)

<input type="button" onclick="show_alert('This will alert!')" value="Show alert box" string="alert for system number 2" />



Related Tutorials/Questions & Answers:
JavaScript Alert YES NO
JavaScript Alert YES NO  How to send an alert to a user to confirm if there request is valid or not? I wants to send the alert message in Java Script... type="text/javascript"> function show_alert(my_string) { alert(my_string
javascript confirm yes no
javascript confirm yes no  javascript confirm yes no - how to create confirm dialog box yes or no in JavaScript?   if (confirm('Are You... are not redirected") }   How to confirm yes or no in JavaScript
Javascript alert message
Javascript alert message   How to send an alert message to a user in JavaScript
javascript prompt alert
javascript prompt alert   Sending a prompt alert using a JavaScript function
javascript statement alert
javascript statement alert  JavaScript Alert If Statement   JavaScript Alert if Statement <script type="text/javascript"> <...;/script> JavaScript Alert else if Statement <script type="text/javascript
JavaScript display variable in alert
JavaScript display variable in alert  How to display variable in alert box? I am using javascript.   <html> <head> <script type="text/javascript"> function showAlert() { var name = "Roseindia
alert  after pressing ok button in alert message it has to stop...; if(username==""){ alert("Enter Username!"); return false; } if(password==""){ alert("Enter Password!"); return false; } return true; } </script> <
Alert in Servlet
Alert in Servlet  <p>Hi</p> <p>I want to delete record from oracle db, i need alert message saying 'Are you sure you want to delete?' with yes and no buttons, if yes, the data should delete if no control
alert for validation
alert for validation  i want to put alert on the text box that enter data should be in DD/MM/YYYY format only through javascript validation.    <html> <script type='text/javascript'> var
alert in jsp
alert in jsp  if(pass.equals(pwd)) { Statement st1..."); %> alert("password is successfully changed"); <... Password"); %> <script> alert("please enter old Password
fast view web--yes - Struts
fast view web--yes  How to enable the fast web view--yes on pdf file  Hi Friend, Please clarify your problem. Thanks
Yes/No confirm box with vbscript - Framework
Yes/No confirm box with vbscript  I'm using a Yes/No confirmation with vbscript. But the in the confirm box, the titiel is coming along with 'VBScript' in it. I just want to remove this 'VBScript' title, Can anyone help me
Javascript   Javascript to check Numeric entry in checkbox.....  ... in javascript function validateBox(){ var data=document.myForm.someText.value; if(data=="" || data==null){ alert("Please Input Data
this format xxx-xxx-xxxx, i want the code in javascript. as a function.   Javascript Phone Number Validation <html> <script> function...)-(\d\d\d)-(\d\d\d\d)/; if(ph==""){ alert("Enter Phone Number!"); } else
change appearance of alert box
change appearance of alert box  how to change the appearance of an alert() box
Information Save Alert
Information Save Alert  Hi, Sir I am creating a web page there user can edit their information. I want a javascript that can show an alert message when user edit the information and trying to close or go to another page without
jQuery alert()
jQuery alert() In this jQuery tutorial we will discuss how an alert box works in jQuery. Moreover, this tutorial will discuss in details about alert box in jQuery. In the given application here, alert boxes have been used to provide
[[UIApplication sharedApplication] setStatusBarHidden:YES animated:NO] is depricated
[[UIApplication sharedApplication] setStatusBarHidden:YES animated... the status bar hidden. [[UIApplication sharedApplication] setStatusBarHidden:YES...: [[UIApplication sharedApplication] setStatusBarHidden:YES]; Thanks
/javascript"> function validateForm() { var sname=document.getElementById('spocname...<10){ alert('enter min 10 characters'); sname.focus(); } if(scontact.value.length>10){ alert('enter less than 10 characters'); scontact.focus
javascript validation
javascript validation  i have 4 buttons in my project like save,find,modify,clear and exit. Here my problem is i have to validate in javascript like if i click on save button an alert message should be displayed "DO YOU WANT
JSP Alert
JSP Alert          JSP Alert is used to put the validation on login... the validation on the login form using Javascript method in JSP page.  Understand
JavaScript  clone JavaScript
GETTING ALERT MESSAGE  how to get an alert message when radio button is selected instead of checkbox
javascript  Hi deepak, sample example on javascript form validation...)){ return 1; } else{ alert("Please enter a valid name. The only charachters...) { if(isNaN(text)){ return 1; } else{alert("Please enter a valid address. The only
(theForm.radios); if (why != "") { alert(why); return false; } return true; } function
GETTING AN ALERT MESSAGE  how to get an alert message, if i select radio button instead of checkbox(associated with 3 dropdown list
javascript  javascript code to dynamically add table on button click.../javascript/javascriptexamples/javascript-add-row-dynamically.shtml
jQuery Hello World alert
the JavaScript alert() method to display the "Hello World" message... braces{}. In the curly braces we have defined the JavaScript alert() method...jQuery Hello World alert example    
); if (why != "") { alert(why); return false; } return true; } function... != "") { alert(checkD); return false; } if (checkR != "") { alert(checkR
Javascript  How validations are done using javascript ,with example? and interview questions on javASCRIPT


Advertisement null