[Javascript] IE onclick problem

Troy III Ajnej trojani2000 at hotmail.com
Sat Apr 19 04:02:17 CDT 2008


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~                                        Troy III                            progressive art enterprise~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~



> From: david at dorward.me.uk> To: javascript at lists.evolt.org> Date: Sat, 19 Apr 2008 08:31:38 +0100> Subject: Re: [Javascript] IE onclick problem> > > On 19 Apr 2008, at 04:35, Troy III Ajnej wrote:> > Sorry, but> > > var capturedReturnValue = myFunction();> > just won't do! You are asigning the function to the var.> > No, it is the return value of the function. 
I think my english is not god enough...,
you are assigning the function-name (that is: a function call) to
the "var capturedReturnValue"
So, if you write it as a global 'var', it will simply invoke that function during
load time. In casse you declare it inside a function it will call the execution 
of it, same way. 
 
> If that was assigning the > function it would be:> > var anotherRefToTheFunction = myFunction;
 
That, in contrast will assign the function-body to the var.
 > The function can be written to return whatever you like, including on > of the many things (not limited to empty strings) that are false values.
All right, -how do you write it so it will return, !not execute myFunction(),
but at least alert you from another function that: myFunction() did execute 
succesfully without executing it accidentally on-check time or before user-action?
 
> David Dorward> http://dorward.me.uk/> http://blog.dorward.me.uk/> > > _______________________________________________> Javascript mailing list> Javascript at lists.evolt.org> http://lists.evolt.org/mailman/listinfo/javascript
_________________________________________________________________
Going green? See the top 12 foods to eat organic.
http://green.msn.com/galleries/photos/photos.aspx?gid=164&ocid=T003MSN51N1653A
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.evolt.org/pipermail/javascript/attachments/20080419/46093b90/attachment.htm>


More information about the Javascript mailing list