Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

I want an alert with yes/no buttons instead of "OK" 1

Status
Not open for further replies.

enemigo

Programmer
Jul 13, 2001
13
NO
After clicking a link, I want an alert to pop up. On an alert box we find som tekst and the OK button. I need a function with yes/no, the name for tihs probably isn't alert. If choosing yes, the link is followed. If no, noting happends, or I get redirectet.

Can anyone help?

Knut
 
You need confirm not alert :

Code:
<script language=&quot;JavaScript&quot;>
  function myconfirm(msg) {
    if (confirm(msg))
      location = 'foo.htm'
    else
      location = 'nofoo.htm'
  }
</script>
<body onload=&quot;myconfirm('Do you have MM Flash?')&quot;>
Regards

Big Bad Dave

davidbyng@hotmail.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top