Javascript is another scripting language. It is 75% similar to PHP. It’s a “Front-End” script, meaning that a script is loaded into your browser along with a page’s content. And it stays in your browser until you close the page. Because of much cyber-mischief, it is very restricted. Or used to be. Now, it’s growing up.
About 20 years ago, HTML 4 came out, a major upgrade that meant your web pages were backed by XML. What’s the big deal bout that? It standardized most browsers, but also ushered in the age of look-and-feel interactive UI. Or, from a coder’s point of view, it allows you to write code that pumps content into places on the webpage and change their appearance. It also makes the Button magic happen, it responds to clicks, mouseovers, key-presses. It also introduced AJAX, which allows Javascript to execute PHP functions, accepting & returning more data. That is now the rule.
I use PHP to build the basic HTMO for the Synopsis browser, populate the logo and overall summary. Once the Javascript is doped with lots of data my PHP generates, the host downloads it and hands it off to your browser.
Once it’s “On it’s own”, Javascript listens for when you press a button or link, and then does something. Pressing a Category link gets the link’s ID, use that to get all the Posts associated with that category’s ID, and then displays each post as a “brick”, in descending order by a post’s Relevance score, or in ascending order by how long an article is. It also updates the Category summary box with data for that category. It may also update your cookie, if you told the Concierge you would like a cookie.
An interesting note, Javascript was fathered by Douglas Crockford who created it while working at NetScape. I met him at a Code Camp, where he lectures. Building Javascript gave him a nice living but he didn’t get rich from it.

Leave a Reply