View Single Post
  #9 (permalink)  
Old 10-19-08, 02:57 AM
Nico's Avatar
Nico Nico is offline
Community Leader
 
Join Date: Sep 2005
Location: Spain
Posts: 8,075
Thanks: 11
Thanked 88 Times in 83 Posts
I added the missing parenthesis, and it's working fine for me now.

Code:
<script type="text/javascript">
<!--
function popup()
{
    if (confirm('Thank you!')
    {
        window.location = 'http://www.abc.com';
    }
    else
    {
        // User pressed "cancel"... do something?
    }

    return false;
}
//-->
</script>

<a href="#" onclick="return popup();">Click me</a>

Did you change the "Thank you" text to something else?
Reply With Quote