JavaScript Coding Notes

JavaScript: JavaScript is case sensitive. Put it in external .js file or at end of body element. Link to a JavaScript file: <script src=”js/myJavaScript.js”></stript> link to JavaScript file: <script src=”directory/javascriptFile.js”></script> or put JavaScript in source: <script> </script> Comments: /* */ Can’t use quotes inside of quotes. Escape or use single quotes: document.write() <body> <script> document.write(“My…
Read more

CSS 3 Coding Notes

CSS3: border-radius: creates rounded borders: {border-radius: 10px;} border-image: Lecture 87 Do not write px with border image. Use 10 or 10% but not 10px. Can’t use pixel value. <style> .url {border-image: url(BorderImage.gif) 20%20%20%20% repeat; border-width 20px; } </style> Round, like repeat but only uses whole pixels. Stretch spans one tile over entire area or section….
Read more

CSS Notes

Padding on the inside of border, margin on the outside of border. ID VS Class ID is unique and only one should exist on any page or style sheet. ID uses #. <style> #Test { color: blue; } </style> <div id=’Test’>My test</div> Class is not unique. Multiple elements can have the same class. Class uses…
Read more

HTML 5 Coding Notes

Notes on HTML 5   HTML 5   Use doctype: <!DOCTYPE html> rather than <!DOCTYPE HTML PUBLIC “-///W3C etc.   Page Section Tags:   <hgroup> groups all h tags together for dom tree.   <header> and <footer> help describe doom tree. Can not have header inside of a header, but can have multiple headers.  Header…
Read more

HTML Notes & Reference

Below are notes on HTML. I’ve left out some of the more commonly used pieces, but have included some of the less commonly used features like subscript and super script for reference. HTML Subscript: <sub></sub> Example H<sub>2</sub>0 SuperScript: <sup></sup> Example: 3<sup>2</sup> <code></code> Shows computer code rather than text. Preformatted text: preserves format of how it…
Read more

PHP Arrays

PHP Arrays are used to associate values to keys; ordered maps.  It is a special type of variable that can hold multiple values. For instance if you have a list of beers and you wanted to manipulate and sort this data, you would need to assign them variables in PHP. If you did this with…
Read more

Cake PHP Models

A model in cake php represents data.  Usually this is a database table and very commonly a MySQL table but can include other types of tables, files or many other forms of data.  Associations can be drawn between various models such as when two groups of data relate to one another. You can learn more…
Read more

Cake PHP Controllers

Controllers handle the logic in Cake PHP applications.  They are typically used to handle models and are named after the model they are associated with but in plural form: So if your model is called SugarModel your controller would be SugarsController. Controllers contain methods, often called actions which are essentially commands such as grabbing or…
Read more