Re: onclick handler and automation
From: Igor Tandetnik (itandetnik_at_mvps.org)
Date: 07/19/04
- Next message: Roby E Martins: "Re: developing IE Plug-ins"
- Previous message: Roby E Martins: "Re: developing IE Plug-ins"
- In reply to: jmcfetridge_at_coast.com: "Re: onclick handler and automation"
- Next in thread: jmcfetridge_at_coast.com: "Re: onclick handler and automation"
- Reply: jmcfetridge_at_coast.com: "Re: onclick handler and automation"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 19 Jul 2004 10:55:03 -0400
"jmcfetridge@coast.com" <jmcfetridgecoastcom@discussions.microsoft.com>
wrote in message
news:D5FF50AC-E3E5-47A3-9FA3-22DD8D316D95@microsoft.com
> However the frustrating thing if the varresult which is var
> in below code segment is VT_EMPTY even when the return is true from
> the script. My code looks like:
>
> And the script looks like
>
> function f2()
> {
> window.alert("This is an alert");
> return false;
> }
What does the onclick attribute look like? Is it onclick="f2();" or
onclick="return f2();" ? In the first case, the return value of f2 is
silently ignored by MSHTML. Note - you don't call f2() itself, you call
a script handler which itself is a function that calls f2. In other
words,
<a id="elem" onclick="f2()">...</a>
is equivalent to
<a id="elem">...</a>
<script>
elem.onclick=function(){f2();}
</script>
Note that the function assigned as a handler does not return any value,
even though f2() does.
--
With best wishes,
Igor Tandetnik
"For every complex problem, there is a solution that is simple, neat,
and wrong." H.L. Mencken
- Next message: Roby E Martins: "Re: developing IE Plug-ins"
- Previous message: Roby E Martins: "Re: developing IE Plug-ins"
- In reply to: jmcfetridge_at_coast.com: "Re: onclick handler and automation"
- Next in thread: jmcfetridge_at_coast.com: "Re: onclick handler and automation"
- Reply: jmcfetridge_at_coast.com: "Re: onclick handler and automation"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|