A
andresjv
It's me again, please tell me if the following sentences are true for
the next code:
<form onsubmit="return AIM.submit(this, {'onStart' : startCallback,
'onComplete' : completeCallback})"
a) when the form submits, it calls method submit of object AIM
b) I don't need to create an instance like var a = new AIM() but I can
if I want. The guy who wrote this code didn't do it, because it would
have something like this:
onsumbit="var a = new AIM; return a.submit(this, {'onStart' :
startCallback, 'onComplete' : completeCallback})"
c) second parameter is an anonymous instance with two attributes:
onStart and onComplete. Each of these functions point to callback
functions.
d) Why do onStart and onComplete are surrounded by single quotes? is
it necessary? I have seen other examples with no quotes, but I might
be confusing ideas: AIM = { frame : function(c) { } }
Thank you
the next code:
<form onsubmit="return AIM.submit(this, {'onStart' : startCallback,
'onComplete' : completeCallback})"
a) when the form submits, it calls method submit of object AIM
b) I don't need to create an instance like var a = new AIM() but I can
if I want. The guy who wrote this code didn't do it, because it would
have something like this:
onsumbit="var a = new AIM; return a.submit(this, {'onStart' :
startCallback, 'onComplete' : completeCallback})"
c) second parameter is an anonymous instance with two attributes:
onStart and onComplete. Each of these functions point to callback
functions.
d) Why do onStart and onComplete are surrounded by single quotes? is
it necessary? I have seen other examples with no quotes, but I might
be confusing ideas: AIM = { frame : function(c) { } }
Thank you