Javascript syntax

A

andresjv

Hello there! I'm an old school javascript programmer, and recently
found this code:

# AIM = {
#
# frame : function(c) {
#
# var n = 'f' + Math.floor(Math.random() * 99999);
# var d = document.createElement('DIV');
# d.innerHTML = '<iframe style="display:none"
src="about:blank" id="'+n+'" name="'+n+'" onload="AIM.loaded(\''+n
+'\')"></iframe>';
# document.body.appendChild(d);
#
# var i = document.getElementById(n);
# if (c && typeof(c.onComplete) == 'function') {
# i.onComplete = c.onComplete;
# }
#
# return n;
# },
#
# form : function(f, name) {
# f.setAttribute('target', name);
# },
#
# submit : function(f, c) {
# AIM.form(f, AIM.frame(c));
# if (c && typeof(c.onStart) == 'function') {
# return c.onStart();
# } else {
# return true;
# }
# } ... more code

Could someone please tell me what is AIM? a class? a what? also, what
are frame, form and submit? are they events or something like that?

Could you please also tell me where I can learn this syntax?

thanks a lot...
 
T

Thomas 'PointedEars' Lahn

# AIM = {
#
# frame : function(c) {
# [...]
# }

Could someone please tell me what is AIM?
Sure.

a class?

There are no classes in *client-side* ECMAScript implementations yet.

A reference to an (Object) object.
also, what are frame, form and submit?

Methods of that object, i.e. function-type properties.
are they events or something like that?
No.

Could you please also tell me where I can learn this syntax?

http://jibbering.com/faq/ pp.


PointedEars
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top