Home Articles FAQs XREF Games Software Instant Books BBS About FOLDOC RFCs Feedback Sitemap
irt.Org
#

Q38 How can I have a conditional link that will work on all browsers?

You are here: irt.org | FAQ | JavaScript | Link | Q38 [ previous next ]

Try:

<script language="JavaScript"><!--
function query(url) {
  if (confirm("Do ya really wanna go?")) {
     location.href = url;
  }
  return false;
}
//--></script>

<a href="#" onClick="this.href='query(\'apage.htm\')'">go?</a>

Feedback on 'Q38 How can I have a conditional link that will work on all browsers?'

©2018 Martin Webb