background preloader

Javascript

Facebook Twitter

Dynamically loading an external JavaScript or CSS file. Dynamically loading an external JavaScript or CSS file The conventional way to loading external JavaScript (ie: .js) and CSS (ie: .css) files on a page is to stick a reference to them in the HEAD section of your page, for example: Files that are called this way are added to the page as they are encountered in the page's source, or synchronously.

Dynamically loading an external JavaScript or CSS file

For the most part, this setup meets our needs just fine, though in the world of synchronous Ajax design patterns, the ability to also fire up JavaScript/ CSS on demand is becoming more and more handy. In this tutorial, lets see how it's done. Dynamically loading external JavaScript and CSS files. What is Node.js? Node.js.

What is Node.js?

It’s the latest in a long line of “Are you cool enough to use me?” Programming languages, APIs, and toolkits. In that sense, it lands squarely in the tradition of Rails, and Ajax, and Hadoop, and even to some degree iPhone programming and HTML5. Go to a big technical conference, and you’ll almost certainly find a few talks on Node.js, although most will fly far over the head of the common mortal programmer.

Dig a little deeper, and you’ll hear that Node.js (or, as it’s more briefly called by many, simply “Node”) is a server-side solution for JavaScript, and in particular, for receiving and responding to HTTP requests. Node.js Step by Step: Introduction. Node.js is an amazing new technology, but, unless you're specifically a JavaScript developer, the process of becoming acquainted with it can quickly become a bit overwhelming.

Node.js Step by Step: Introduction

But that's why we're here! If you want to really learn how to use Node.js, this set of articles and screencasts will do the trick. Hi guys, my name is Christopher Roach, and I'll be your guide throughout this series of screencasts on Node.js. In this series we'll be using Node to create a simple blog engine, like the one made famous in the popular Ruby on Rails introductory video. The goal of this series is to give you, the viewer, a real feel for how Node works so that, even when working with any of the popular web development frameworks out there, such as Express or Getty, you'll feel comfortable enough with the inner workings of Node to be able to drop down into its source and make changes to suit your needs as necessary. Node is JavaScript on the server. Photoshop Scripting. Drawing Lines Photoshop CS4 using JavaScript. You could start by looking at the sample scripts that ship with photoshop to see a coding sample of stroking a selection.

Drawing Lines Photoshop CS4 using JavaScript

Then look at the doc on making selection and paths etc. // Copyright 2002-2007. Adobe Systems, Incorporated. All rights reserved. // Create a stroke around the current selection. // Set the stroke color and width of the new stroke. // enable double clicking from the Macintosh Finder or the Windows Explorer #target photoshop // in case we double clicked the file app.bringToFront(); Photoshop Scripting. PhotoShop Scripting by mlk : Hot Summer Month of 2004 You’ve probably wanted at one time or another to combine the power of Photoshop’s tools to those of programming scripts.

Photoshop Scripting

Adobe has made this possible for you with the ‘Scripting Plug-in’, a nifty plug-in that allows users to write little scripts (in Javascript, VBScript or AppleScript) that will take over Photoshop and do what you couldn’t with you mouse and keyboard… This tool is also aimed at designers which wish to increase the workflow speed (you'll see example scripts by the end of the tutorial which allow you to save all your current images, or save each layer to a separate file etc...).

Even though we do use a scripting language, it is not hardcore programming and designers which hate programming should not be scared of this, the step by step tutorial will help you create your first simple scripts and you will later be able to move on to more advanced scripts. Photoshop Scripting. PhotoShop Scripting by mlk : Hot Summer Month of 2004 V.

Photoshop Scripting

Non-Documented Functions: Using the Script Listener Using the script listener to create undocumented functions. Code Avengers, learn Javascript. Eloquent JavaScript: A Modern Introduction to Programming. Creating objects. Netscape 4, IE 4 on Windows and Mac, and IE 5 on Mac do not support the operator.

Creating objects

Any function in JavaScript can be used to create custom object classes, simply by calling it using the keyword new . When called in this way, the special variable inside the function references the new object that is being constructed (it normally refers to the 'current' object, which is usually , except inside methods). The function should not return a value. The following function can be used as demonstrated to create an object of class : function myobject() { this.containedValue = 0; this.othercontainedValue = 0; this.anothercontainedValue = 0; } var mything = new myobject(); Using Multiple JavaScript Onload Functions. Examples of Javascript in KML <description> tag for GE 5.0? - Advanced Support for KML.