OULU ADVANCED RESEARCH ON SOFTWARE AND INFORMATION SYSTEMS Teppo Räisänen | Oulu University of Applied Sciences Facebook Javascript - FBJS Teppo Räisänen School of Business and Information Management
OULU ADVANCED RESEARCH ON SOFTWARE AND INFORMATION SYSTEMS Teppo Räisänen | Oulu University of Applied Sciences FBJS FBJS = Facebook JavaScript FBML is similar to HTML FBJS is similar to Javascript
OULU ADVANCED RESEARCH ON SOFTWARE AND INFORMATION SYSTEMS Teppo Räisänen | Oulu University of Applied Sciences FBJS FBJS syntax is very close to Javascript Manipulating DOM objects is little bit different Typically properties are have getters and setters Getters retrieve the property value Setters set the property value There are some other small chances See the FBJS wiki-page
OULU ADVANCED RESEARCH ON SOFTWARE AND INFORMATION SYSTEMS Teppo Räisänen | Oulu University of Applied Sciences FBJS Javascript: obj.value = ”75kg”; FBML: obj.setValue(”75kg”); Javascript: var obj = document.getElementById(”height”); obj.innerHTML = ”175cm”; FBML: var obj = document.getElementById(”height”); obj.setInnerFBML(”175cm”);
OULU ADVANCED RESEARCH ON SOFTWARE AND INFORMATION SYSTEMS Teppo Räisänen | Oulu University of Applied Sciences FBJS JSFBJS-getterFNJS-setter valuegetValuesetValue hrefgetHrefsetHref targetgetTargetsetTarget srcgetSrcsetSrc classNamegetClassNamesetClassName tagNamegetTagName- idgetIdsetId dirgetDirsetDir checkedgetCheckedsetChecked