JRS: In article <. com>,
dated Fri, 29 Sep 2006 12:34:31 remote, seen in
news:comp.lang.javascript, Eric <> posted :
>
>function DelAlert() {
>if (confirm("Are you sure you want to delete this history record?"))
>{
> return true;
>} else
>{
>alert('Should be false');
> return false;
>}
>}
>
(1) There is no need for an else part if the previous code returns.
(2) The following is simpler :-
function DelAlert() { var OK
OK = confirm("Are you sure you want to delete this history record?")
if (!OK) alert('Should be false')
return OK }
It's a good idea to read the newsgroup and its FAQ. See below.
--
© John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v4.00 IE 4 ©
<URL:http://www.jibbering.com/faq/>? JL/RC: FAQ of news:comp.lang.javascript
<URL:http://www.merlyn.demon.co.uk/js-index.htm> jscr maths, dates, sources.
<URL:http://www.merlyn.demon.co.uk/> TP/BP/Delphi/jscr/&c, FAQ items, links.
|