Essentials of Javascript - Cultural View
Essentials of Javascript - Cultural View Essentials of Javascript - Cultural View
Bookmarklet 61 History Steve Kangas of bookmarklets.com coined the term "bookmarklet", [1] which he started to create based on an idea suggested in the Netscape JavaScript Guide. The term favelet was used early on by Tantek Çelik on 6 September 2001 (personal email). Brendan Eich, who developed JavaScript at Netscape, gave this account of the origin of bookmarklets: They were a deliberate feature in this sense: I invented the javascript: URL along with JavaScript in 1995, and intended that javascript: URLs could be used as any other kind of URL, including being bookmark-able. In particular, I made it possible to generate a new document by loading, e.g. javascript:'hello, world', but also (key for bookmarklets) to run arbitrary script against the DOM of the current document, e.g. javascript:alert(document.links[0].href). The difference is that the latter kind of URL uses an expression that evaluates to the undefined type in JS. I added the void operator to JS before Netscape 2 shipped to make it easy to discard any non-undefined value in a javascript: URL. —Brendan Eich, email to Simon Willison [2] Example This example bookmarklet performs a Wikipedia search on any highlighted text in the web browser window. In normal use, the following Javascript would be installed to a bookmark in a browser [3] bookmarks toolbar. From then on, after selecting any text, clicking the bookmarklet performs the search. UNIQ-source-4-0cf60905ada3d8e1-QINU See also • Greasemonkey • iMacros • Ubiquity (Firefox) External links • Marklets.com - Bookmarklet Directory [4] - The largest most up to date collection of bookmarklets. • Jesse's Bookmarklets Site [5] - One of the earliest but now mostly outdated collections. • Bookmarklets Boost Web Surfing [6] , PC Magazine [7] , Tara Calishain, 4 March 2004. Retrieved 31 August 2007. • How to Use Is.Gd/Tiny Url/Bookmarklet-X in Chrome [8] - Effective method for bookmarklets in Google Chrome, 1 June 2009. Retrieved 18 July 2009 • WikiReader – bookmarklet for Wikipedia reading [9] • Dottoro.com Client-Side JavaScript [10] – Good site for developers, with many cross-browser problem solutions.
Bookmarklet 62 References [1] Domain bookmarklets.com (http://www.bookmarklets.com) registered 9 April 1998 [2] Willison, Simon (April 10th, 2004). "Email from Brendan Eich" (http://www.sitepoint.com/blogs/2004/04/09/bookmarklets/ #comment-3424). SitePoint. . Retrieved 22 April 2007. [3] Tested on Mozilla Firefox, Opera, Safari, and Chrome. Does not work in IE7 or IE8. Original source: Alex Boldt (http://math-www. uni-paderborn.de/~axel/bookmarklet.html) [4] http://www.marklets.com/bookmarklets/ [5] https://www.squarefree.com/bookmarklets/ [6] http://www.pcmag.com/print_article2/0,1217,a=116252,00.asp [7] http://pcmag.com [8] http://jonathan.dickinsons.co.za/blog/2009/06/how-to-use-isgdtiny-urlbookmarklet-x-in-chrome/ [9] http://www.vcarrer.com/2010/02/wikireader-bookmarklet-for-wikipedia.html [10] http://help.dottoro.com/ljswgnnf.php Client-side JavaScript Client-side JavaScript (CSJS) is JavaScript that runs on the client-side. While JavaScript was originally created to run this way, the term was coined because the language is no longer limited to just client-side, for example, server-side JavaScript (SSJS) is now available. Environment The most common Internet media type attribute for JavaScript source code is text/javascript, which follows HTML 4.01 and HTML 5 specifications and is supported by all major browsers. In 2006, application/javascript was also registered, though Internet Explorer versions 6 through 8 does not recognize scripts with this attribute. When no type attribute is specified in a script tag, the type value is by default "text/javascript" per HTML 5 specification. To embed JavaScript code in an HTML document, it must be preceded with the tag and followed with (possible attribute options omitted). Older browsers typically require JavaScript to begin with: The comment markup is required in order to ensure that the code is not rendered as text by very old browsers which do not recognize the tag in HTML documents (although script-tags contained within the head-tag will never be rendered, thus the comment markup is not always necessary), and the LANGUAGE attribute is a deprecated HTML attribute which may be required for old browsers. However, tags in XHTML/XML documents will not work if commented out, as conformant XHTML/XML parsers ignore comments and also may encounter problems with --, < and > signs in scripts (for example, the integer decrement operator and the comparison operators). XHTML documents should therefore have scripts included as XML CDATA sections, by preceding them with //
- Page 13 and 14: JavaScript 10 request that might ha
- Page 15 and 16: JavaScript 12 Application platform
- Page 17 and 18: JavaScript 14 See also • Client-s
- Page 19 and 20: JavaScript 16 [25] Robert Nyman, Ge
- Page 21 and 22: JavaScript syntax 18 JavaScript syn
- Page 23 and 24: JavaScript syntax 20 Primitive data
- Page 25 and 26: JavaScript syntax 22 String A Strin
- Page 27 and 28: JavaScript syntax 24 Native Objects
- Page 29 and 30: JavaScript syntax 26 } Math The Mat
- Page 31 and 32: JavaScript syntax 28 // ? - 0 or 1
- Page 33 and 34: JavaScript syntax 30 Operators The
- Page 35 and 36: JavaScript syntax 32 alert( Boolean
- Page 37 and 38: JavaScript syntax 34 Conditional op
- Page 39 and 40: JavaScript syntax 36 With The with
- Page 41 and 42: JavaScript syntax 38 Methods A meth
- Page 43 and 44: JavaScript syntax 40 Inheritance Ja
- Page 45 and 46: JavaScript syntax 42 See also • C
- Page 47 and 48: JavaScript Style Sheets 44 } fontSi
- Page 49 and 50: JavaScript engine 46 JavaScript eng
- Page 51 and 52: Ajax (programming) 48 Ajax (program
- Page 53 and 54: Ajax (programming) 50 • Ajax-powe
- Page 55 and 56: ?: 52 ?: In computer programming, ?
- Page 57 and 58: ?: 54 Furthermore, the ternary oper
- Page 59 and 60: ?: 56 ?: in style guidelines Some c
- Page 61 and 62: Appcelerator Titanium 58 See also
- Page 63: Bookmarklet 60 Bookmarklet A bookma
- Page 67 and 68: Client-side JavaScript 64 implement
- Page 69 and 70: Client-side JavaScript 66 Reference
- Page 71 and 72: dhtmlx [1] Comparison of JavaScript
- Page 73 and 74: ility / ion Comparison of JavaScrip
- Page 75 and 76: Comparison of JavaScript frameworks
- Page 77 and 78: Comparison of JavaScript frameworks
- Page 79 and 80: Comparison of JavaScript-based sour
- Page 81 and 82: Comparison of JavaScript-based sour
- Page 83 and 84: Douglas Crockford 80 Douglas Crockf
- Page 85 and 86: DWR (Java) 82 DWR (Java) Developer(
- Page 87 and 88: EMVC 84 EMVC Developer(s) Ed Hertzo
- Page 89 and 90: Brendan Eich 86 References [1] Stev
- Page 91 and 92: JSDoc 88 JSDoc JSDoc is a syntax fo
- Page 93 and 94: JSDoc 90 History The earliest examp
- Page 95 and 96: JSSP 92 JSSP JSSP, or JavaScript Se
- Page 97 and 98: JScript 94 JScript is sometimes ref
- Page 99 and 100: JScript 96 [9] http://msdn2.microso
- Page 101 and 102: JSON 98 JSON Filename extension .js
- Page 103 and 104: JSON 100 Using JSON in Ajax The fol
- Page 105 and 106: JSON 102 /> state='NY' postalCode='
- Page 107 and 108: JSON 104 parseResponse({"Name": "Ch
- Page 109 and 110: JSON 106 [21] Ben-Kiki, Oren; Evans
- Page 111 and 112: JsonML 108 ["person", {"created":"
- Page 113 and 114: Lightbox (JavaScript) 110 Lightbox
Bookmarklet 61<br />
History<br />
Steve Kangas <strong>of</strong> bookmarklets.com coined the term "bookmarklet", [1] which he started to create based on an idea<br />
suggested in the Netscape JavaScript Guide. The term favelet was used early on by Tantek Çelik on 6 September<br />
2001 (personal email). Brendan Eich, who developed JavaScript at Netscape, gave this account <strong>of</strong> the origin <strong>of</strong><br />
bookmarklets:<br />
They were a deliberate feature in this sense: I invented the javascript: URL along with JavaScript in 1995, and<br />
intended that javascript: URLs could be used as any other kind <strong>of</strong> URL, including being bookmark-able.<br />
In particular, I made it possible to generate a new document by loading, e.g. javascript:'hello, world', but also<br />
(key for bookmarklets) to run arbitrary script against the DOM <strong>of</strong> the current document, e.g.<br />
javascript:alert(document.links[0].href). The difference is that the latter kind <strong>of</strong> URL uses an expression that<br />
evaluates to the undefined type in JS. I added the void operator to JS before Netscape 2 shipped to make it<br />
easy to discard any non-undefined value in a javascript: URL.<br />
—Brendan Eich, email to Simon Willison [2]<br />
Example<br />
This example bookmarklet performs a Wikipedia search on any highlighted text in the web browser window. In<br />
normal use, the following <strong>Javascript</strong> would be installed to a bookmark in a browser [3] bookmarks toolbar. From then<br />
on, after selecting any text, clicking the bookmarklet performs the search.<br />
UNIQ-source-4-0cf60905ada3d8e1-QINU<br />
See also<br />
• Greasemonkey<br />
• iMacros<br />
• Ubiquity (Firefox)<br />
External links<br />
• Marklets.com - Bookmarklet Directory [4] - The largest most up to date collection <strong>of</strong> bookmarklets.<br />
• Jesse's Bookmarklets Site [5] - One <strong>of</strong> the earliest but now mostly outdated collections.<br />
• Bookmarklets Boost Web Surfing [6] , PC Magazine [7] , Tara Calishain, 4 March 2004. Retrieved 31 August 2007.<br />
• How to Use Is.Gd/Tiny Url/Bookmarklet-X in Chrome [8] - Effective method for bookmarklets in Google<br />
Chrome, 1 June 2009. Retrieved 18 July 2009<br />
• WikiReader – bookmarklet for Wikipedia reading [9]<br />
• Dottoro.com Client-Side JavaScript [10] – Good site for developers, with many cross-browser problem solutions.