[thelist] Simple JavaScript question

Joel Morris joelm at citycent.com
Sun Aug 6 23:29:19 CDT 2000


Ok, so I'm learning here.

I want to have the user click on a link and then bring up a "confirm"
message box verifying that they really want to go to that link. Clicking the
"OK" should send them on their way, clicking "Cancel" should keep them on
the same page.

Here's my code (that doesn't work):

<script LANGUAGE="JavaScript">
<!--
function proceed2() {
	(confirm("Are you sure?"))
}
-->
</script>

And in the body of the page, the link:

<a href="http://www.citycent.com" onClick="proceed2();">Click here</a>

I know this should be really simple, but I'm not getting it.

Help.

Joel
----------------------------
CityCenter Co.
Web Development & Marketing
mailto:joelm at citycent.com
http://www.citycent.com





More information about the thelist mailing list