faqts : Computers : Programming : Languages : JavaScript

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

34 of 73 people (47%) answered Yes
Recently 5 of 10 people (50%) answered Yes

Entry

How can I give the user a choice of Yes or No. Then carry out the proper actions based on their ans?

Apr 5th, 2008 19:59
ha mo, Colin Fraser, Kevin Smith,


Try
function respond() {
var ans=prompt("Write Yes or No in the box below","Write it here")
          if (ans=="Yes") {
                  // do this something
          }
          else {
                  alert("Please provide another answer") 
          }
  }
I think this may at least give you a drection to go in.
http://www.businessian.com
http://www.computerstan.com
http://www.financestan.com
http://www.healthstan.com
http://www.internetstan.com
http://www.moneyenews.com
http://www.technologystan.com
http://www.zobab.com
http://www.healthinhealth.com