Re: Problem with window.open
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.javascript archive

Re: Problem with window.open

From: Evertjan. <exjxw.hannivoort@interxnl.net>
Date: Sun Apr 30 2006 - 10:59:17 CEST

Evertjan wrote on 30 apr 2006 in comp.lang.javascript:

> Something like this?
>
> [experimental, do not copy!]
>
> <a href='http://www.cnn.com/'
> xonclick='location.hrefFF="http://bbc.co.uk/";return false'>
> To the BBC
> </a>

That was not effective in showing anything.

It seems I am not good at writing intentionally bad code.

The below shows no difference between

onclick='f();return false;'>
and
onclick='return f();'>

=========================================

<script type='text/javascript'>

function bad(){
  var a = notExistingVariable;
  return false;
}

function good(){
  var a = 7;
  return false;
}

</script>

<a href='http://bbc.co.uk/' target='_blank'
  onclick='bad();return false;'>
To the BBC
</a>
<br>
<a href='http://bbc.co.uk/' target='_blank'
  onclick='return bad();'>
To the BBC
</a>
<br>
<a href='http://bbc.co.uk/' target='_blank'
  onclick='!bad();return false;'>
To the BBC
</a>
<br>
<a href='http://bbc.co.uk/' target='_blank'
  onclick='return !bad();'>
To the BBC
</a>

<br><br>
<a href='http://bbc.co.uk/' target='_blank'
  onclick='good();return false;'>
Not to the BBC
</a>
<br>
<a href='http://bbc.co.uk/' target='_blank'
  onclick='return good();'>
Not to the BBC
</a>
<br>
<a href='http://bbc.co.uk/' target='_blank'
  onclick='return !good();'>
To the BBC
</a>

-- 
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Received on Mon May 1 05:27:43 2006