Solutions & Examples for Web Programmers

Total Page:16

File Type:pdf, Size:1020Kb

Solutions & Examples for Web Programmers Solutions & Examples for Web Programmers JavaScript & DHTML Cookbook Danny Goodman JavaScript and DHTML Cookbook JavaScript and DHTML Cookbook Danny Goodman Beijing • Cambridge • Farnham • Köln • Paris • Sebastopol • Taipei • Tokyo CHAPTERChapter 10 10 Page Navigation Techniques 10.0 Introduction No web page is (or should be) an island. Just as there is a way to reach the page, so should there be one or more ways to navigate to other destinations, either within the same site or outside. The HTML hyperlink element—embedded in pages as the rather nondescript <a> tag—is the conventional, nonscripted way to provide a click- able avenue for the user to navigate to another page. But more sophisticated user interface designs frequently require Dynamic HTML to assist with the presentation of navigation options and the very act of navigating. The location Object Each window (and frame) object in every scriptable browser has a location object whose properties contain information about the URL of the page currently loaded into the browser. This is an abstract object, meaning that the object has no particu- lar physical presence visible on the page—except perhaps the URL that appears in the browser’s Location or Address field. But the location object does not control what the user sees in the Location/Address field unless the browser succeeds in navi- gating to a page you assign to the location object. Properties of the location object are read/write. The individual properties reveal components of the URL (and even the entire URL) of the loaded page. Without any restrictions to this information, however, scripts could spy on your browser activity without you knowing it. For example, imagine entering an unscrupulous web site that looks like the Google search page. In fact, you could be viewing the actual Goo- gle search page within a frameset whose second frame is hidden from view. A script in the framesetting document or the other frame could inspect the location object of the visible frame every ten seconds, accumulating a record of every page visited in that frame. The information could then be sent back to the spoofer’s server without the user’s knowledge or permission. 256 This is the Title of the Book, eMatter Edition Copyright © 2003 O’Reilly & Associates, Inc. All rights reserved. Despite the fact that, in some situations, knowing the URL of another frame or win- dow could enhance the user experience, the potential for invasion of privacy has forced browser makers to clamp down on the reading power of location object prop- erties. Browsers observe various types of security policies to help protect a user’s pri- vacy. The policy that applies to the location object is known as the same origin policy. If a script running in a page served by one server and domain wishes to inspect the location object of another frame or window, the document in the other frame or window must also be served by the same server and domain. If the user nav- igates in one of the frames to another domain or server, the same origin policy fails (even though the frameset is still served within policy), and the location information is not accessible to the other frame. Partially as a result of a variety of security holes in Internet Explorer for Windows, Microsoft occasionally clamps down so tightly on a potential threat that attempts to read location object properties of another window or frame—even from the same origin—result in a security-related script error (such as “Access denied.”). From a reliability standpoint, reading the location object is best done in the same page as the script doing the reading. As you’ll see in a few recipes in this chapter, there are some good reasons to do this. All this security stuff, however, applies only to reading the location object’s prop- erty values. You can assign new values to the properties across window and frame boundaries with impunity. Passing Data Between Pages A very common model in the web-application world is essentially a forms-based nav- igation system, in which virtually every page is a form whose values are submitted as a way to progress to the next page. When the submitted form reaches the server, pro- gramming on the server dissects the form controls’ name/value pairs. Some of the pairs may get shunted off to a backend database. Other bits may be reformulated as values of hidden input elements in the page that gets assembled for return as the next page. Once the second page is served up, the server doesn’t know whether the user is still connected to the site or has perhaps navigated off somewhere else. In other words, the server simply reacts to requests from a browser, returning a page in response. The server may be programmed to keep some temporary information about the user on hand, identified by a session ID. That session ID is passed down to the browser with each returned page so that when the next request arrives, the server program can tie together requests that come from a single browser. Some server programs that assemble pages on the fly for each visitor (such as amazon.com) populate the href attributes of all intrasite links with the session ID so that the server can keep passing the ID along from page to page. It may sound a bit crude, but it is much more band- width-efficient than maintaining a full-time connection between server and browser (or between thousands of browsers at any instant for a popular public site). 10.0 Introduction | 257 This is the Title of the Book, eMatter Edition Copyright © 2003 O’Reilly & Associates, Inc. All rights reserved. However, not everyone has the requisite programming skills or server access to accomplish this server-based way of passing along live information from one page to another. By the same token, security restrictions in browsers prevent the random reading and writing of data to the local hard drive of users. Fortunately, with the help of JavaScript and various pieces of the object models, you do have a few differ- ent ways to get information from one page to another without having to involve the server. Recipes 10.4 through 10.6 show these approaches using cookies, frames, and URLs. For example, consider the case in which a user has bookmarked just one con- tent page from a frameset whose other frames provide vital site navigation tools. If the user loads the bookmarked page into the browser, a simple script in that page can make sure that not only the complete frameset loads, but also that the book- marked page appears in the content frame, rather than the default pages of the frameset. Pop-Up/Drop-Down Navigation Menus Navigation menus that pop up or drop down from some steady user interface ele- ment (such as a pseudo–menu bar or tab) are incredibly space-efficient. Rather than list dozens of choices in a navigation panel on a page, only top-level categories are visible by default. Rolling the mouse over one of the category names makes a nested list of relevant destinations suddenly appear out of the ether. This is a user interface concept that all Windows, Mac, and X Window System users can readily identify and know how to use. Every DHTML guru and his cat has created a menuing system that takes advantage of element visibility and positioning in Version 4 browsers and later. I don’t know if the world needs yet another pop-up menu system, but a DHTML cookbook would not be complete without one. One insurmountable hurdle is that a single design can- not fit all situations. Every site designer has a different look in mind when envision- ing a menu system, and design requires far more fiddling with cookbook-style code than applying a different style sheet set. The goal, then, is not to create a be-all, end- all menuing system. Instead, focus on producing standards-compatible code for as simple a system as possible (using a DHTML library described more fully in Chapter 13), which is flexible enough to be tweaked for lots of different looks and situations. Before you decide to deploy a pop-up menu system, especially in a public site, be sure to treat it as a value-added interface element, rather than as a mission-critical element. You should make it possible for a user with JavaScript disabled or unavail- able to navigate through your site, even if it requires one or more extra page loads to reach the destinations listed in the pop-up menus. By relying on traditional links for nonscripted backup navigation, you also assure that search engine spiders and bots will be able to reach the inner depths of your site and index those pages as well. 258 | Chapter 10: Page Navigation Techniques This is the Title of the Book, eMatter Edition Copyright © 2003 O’Reilly & Associates, Inc. All rights reserved. Default Data Delivery to a Page Some of the recipes in this and subsequent chapters rely on a body of unseen data being accessible to the page’s scripts. Depending on your specific application, the data may be static, or it may be dynamic data pulled from a database and assembled into a form suitable for download to the browser. Until recently, there wasn’t much choice in how this data would arrive to the browser: it was in the form of JavaScript objects or arrays (see Recipe 14.5) hard- wired into .html pages on the server or blended into server-generated page content on the fly.
Recommended publications
  • Netscape Navigator 4 Object Road Map "Web Pages That Think"™
    Learn how to create Netscape Navigator 4 Object Road Map "Web Pages That Think"™ window window frame self top parent closedN3,M4 alert("msg") onBlur=N3,M4 defaultStatus back()N4 onDragDrop=N4,(S) document blur()N3,M4 onFocus=N3,M4 history document location toolbar, etc. frames[i] captureEvents(type)N4 onLoad= N4,M4 N4 history clearInterval(ID) onMove= link anchor layer form applet image area innerHeightN4,(S) clearTimeout(ID) onResize=N4,M4 innerWidthN4,(S) close() onUnload= location confirm("msg") text radio button fileUpload select locationbarN4,(S) disableExternalCapture()N4,(S) menubarN4,(S) enableExternalCapture()N4,(S) textarea checkbox reset option name find(["str"][,case, bkwd])N4 password submit onerrorN3,M4 focus()N3,M4 openerN3,M3 forward()N4 outerHeightN4,(S) handleEvent(event)N4 outerWidthN4,(S) home()N4 pageXOffsetN4 moveBy(Dx,Dy)N4,(S) Netscape Navigator 4 Document Object Model Containment Hierarchy pageYOffsetN4 moveTo(x,y)N4,(S) parent open(URL,"name","specs")(1),(S) N4 personalbarN4,(S) print()N4 document layer scrollbarsN4,(S) prompt("msg","reply") alinkColor captureEvents(type)N4 (None) above load("filename",y) onBlur= self releaseEvents(type)N4 anchors[i] clear() background moveAbove(layerObj) onFocus= status resizeBy(Dx,Dy)N4,(S) applets[i]N3,M4 close() below moveBelow(layerObj) onLoad= statusbarN4,(S) resizeTo(width,height)N4,(S) bgColor getSelection()N4,(2) bgColor moveBy(Dx, Dy) onMouseOut= toolbarN4,(S) routeEvent(event)N4 cookie handleEvent(event)N4 clip.top moveTo(x, y) onMouseOver= top scroll(x,y)N3,M4 domainN3,M4
    [Show full text]
  • Javascript Bible 4Th Edition Danny Goodman Javascript and Browser
    JavaScript Bible 4th Edition ISBN 0-7645-3342-8 Danny Goodman Appendix A JavaScript and Browser Objects Quick Reference ©2001 Danny Goodman (www.dannyg.com). All Rights Reserved. 3 © 2001 Danny Goodman (www.dannyg.com). All Rights Reserved. IE4+, NN6+ style Object Properties JSB4 IE4,N6 Operators 40 style 30 Comparison Text & Fonts Borders & Edges Inline Display & Layout == Equals color IE4, N6 borderIE4, N6 clear IE4, N6 N4, IE4 === Strictly equals fontIE4, N6 borderBottomIE4, N6 clip IE4, N6 != Does not equal fontFamily IE4, N6 borderLeftIE4, N6 clipBottom W5 N4, IE4 !== Strictly does not equal JavaScript and fontSize IE4, N6 borderRightIE4, N6 clipLeft W5 > Is greater than fontSizeAdjust M5, N6 borderTopIE4, N6 clipRight W5 >= Is greater than or equal to fontStretch M5, N6 borderBottomColor IE4, N6 clipTop W5 < Is less than Browser Objects fontStyle IE4, N6 borderLeftColorIE4, N6 content M5, N6 <= Is less than or equal to fontVariant IE4, N6 borderRightColorIE4, N6 counterIncrement M5, N6 fontWeight IE4, N6 borderTopColorIE4, N6 counterReset M5, N6 Arithmetic letterSpacing IE4, N6 borderBottomStyle IE4, N6 cssFloat M5, N6 + Plus (and string concat.) Quick Reference lineBreak IE5 borderLeftStyle IE4, N6 cursorIE4, N6 - Minus lineHeight IE4, N6 borderRightStyle IE4, N6 direction IE5, N6 * Multiply quotes M5, N6 borderTopStyle IE4, N6 display IE4, N6 / Divide rubyAlign IE5 borderBottomWidth IE4, N6 filterW4 % Modulo rubyOverhangIE5 borderLeftWidth IE4, N6 floatStyle M4 ++ Increment rubyPosition IE5 borderRightWidth IE4, N6 layoutGrid
    [Show full text]
  • Danny Goodman's Javascript Handbook Object Road Map (Navigator 3.0 Edition) HTML-Generated Javascript Objects
    Danny Goodman's JavaScript Handbook Object Road Map (Navigator 3.0 Edition) HTML-Generated JavaScript Objects window document form frames[i] blur()* onLoad= alinkColor clear() (None) action reset()* onReset=* parent focus()* onUnload= anchors[i] close() elements[i] submit() onSubmit= self scroll(x,y)* onBlur=* applets[i]* open("mimetype") encoding top alert("msg") onFocus=* bgColor write("string") method status confirm("msg") cookie writeln("string") name defaultStatus prompt("msg","reply") domain* target name open(URL,"name","specs") embeds[i]* window close() fgColor opener* setTimeOut("exp",ms) forms[i] onerror* clearTimeOut(ID) images[i]* text, textarea, password lastModified defaultValue focus() onBlur= linkColor name blur() onChange= links[i] type* select() onFocus= history location** value onSelect= referrer length back() (None) title current*** forward() URL* radio next*** go(int | "URL") vlinkColor checked click() onClick= previous*** defaultChecked link length location name target (None) onClick= type* hash reload()* (None) onMouseOut=* value host replace(URL)* onMouseOver= hostname href anchor button, reset, submit pathname name click() onClick= port (None) (None) (None) type* protocol value search applet* (Java vars) (Java methods) (None) checkbox checked click() onClick= area* image* defaultChecked hash (None) onMouseOut= border (None) onAbort= name host onMouseOver= complete onError= type* hostname height onLoad= value href hspace pathname lowsrc port name select protocol src length blur()* onBlur= search vspace name focus()* onChange= target width options[i] onFocus= selectedIndex options[i].defaultSelected fileUpload* options[i].index options[i].selected name blur() onBlur= options[i].text *New in Navigator 3.0 value focus() onFocus= options[i].value **Do not use. To be deleted in a future release select() onSelect= type* ***Only with data tainting enabled ©1996 Danny Goodman.
    [Show full text]
  • Tclosascript - Exec for Mactcl
    The following paper was originally published in the Proceedings of the Fifth Annual Tcl/Tk Workshop Boston, Massachusetts, July 1997 TclOSAScript - Exec for MacTcl Jim Ingham Lucent Technologies (now at Sun Microsystems) Raymond Johnson Sun Microsystems For more information about USENIX Association contact: 1. Phone: 510 528-8649 2. FAX: 510 548-5738 3. Email: [email protected] 4. WWW URL: http://www.usenix.org TclOSAScript-ExecforMacTcl JimIngham LucentTechnologies (nowatSunMicrosystems) [email protected] RaymondJohnson SunMicrosystems [email protected] Abstract: WedescribetheTclOSAScriptextensiontoMacTcl.TclOSAScriptprovides theabilityforMacTclscriptstorunscriptsinanyotherOSAcompatible languageontheMacintosh.SincetheOSAisthestandardmechanismfor interapplicationcommunicationontheMac,thisallowsMacTcltorunother applications,andprovidesanexeclikefacility(thougharguablyusingamuch richercommunicationmodel.) I) AnIntroductiontotheOpen Tk95and96conferences[3,4].Therearetwo ScriptingArchitecture implementationsofthissolutionthathavebeen presented.TedBeldungwroteaextensioncalled Theusualinterapplicationcommunicationmecha- ASTcl[5]whichonlyworkedwithAppleScript,and nismforUnixbasedtoolsreliesonthesimpleex- didnotusemanyoftheadvancedfeaturestheOSA pedientofconnectingthestandardinandstan- offers.TclOSAScript,whichwasdevelopedcon- dardoutchannelsofthespawnedprocesstochan- currently,isamorecompleteimplementation.This nelsoftheparentprocess.Thecommunication istheonewewilldetailinthispaper. betweentheparentandchildprocessesthenmim- ThereisarealproblemthattheOSAaimstosolve
    [Show full text]
  • Javascript & DHTML Cookbook
    SECOND EDITION JavaScript & DHTML Cookbook Danny Goodman O'REILLY8 Beijing • Cambridge • Farnham • Koln • Paris • Sebastopol • Taipei • Tokyo Table of Contents Preface xiii 1. Strings 1 1.1 Concatenating (Joining) Strings 4 1.2 Improving String Handling Performance 6 1.3 Accessing Substrings 7 1.4 Changing String Case 8 1.5 Testing Equality of Two Strings 9 1.6 Testing String Containment Without Regular Expressions 11 1.7 Testing String Containment with Regular Expressions 13 1.8 Searching and Replacing Substrings 14 1.9 Using Special and Escaped Characters 15 1.10 Reading and Writing Strings for Cookies 17 1.11, Converting Between Unicode Values and String Characters 20 1.12 Encoding and Decoding URL Strings 21 1.13 Encoding and Decoding Base64 Strings 23 2. Numbers and Dates 27 2.1 Converting Between Numbers and Strings 31 2.2 Testing a Number's Validity 33 2.3 Testing Numeric Ecjuality 34 2.4 Rounding Floating-Point Numbers 35 2.5 Formatting Numbers for Text Display 36 2.6 Converting Between Decimal and Hexadecimal Numbers 39 2.7 Generating Pseudorandom Numbers 41 2.8 Calculating Trigonometric Functions 41 2.9 Creating a Date Object 42 2.10 Calculating a Previous or Future Date 43 2.11 Calculating the Number of Days Between Two Dates 45 2.12 Validating a Date 47 3. Arrays and Objects 51 3.1 Creating a Simple Array 54 3.2 Creating a Multidimensional Array 56 3.3 Converting Between Arrays and Strings 57 3.4 Doing Something with the Items in an Array 59 3.5 Sorting a Simple Array 61 3.6 Combining Arrays 63 3.7 Dividing Arrays 64 3.8 Creating a Custom Object 65 3.9 Simulating a Hash Table for Fast Array Lookup 69 3.10 Doing Something with a Property of an Object 71 3.11 Sorting an Array of Objects 72 3.12 Customizing an Object's Prototype 74 3.13 Converting Arrays and Custom Objects to Strings 79 3.14 Using Objects to Reduce Naming Conflicts 82 4.
    [Show full text]
  • Javascript Bible 5Th Edition Quick Reference
    JavaScript Bible 5th Edition Danny Goodman Appendix A JavaScript and Browser Objects Quick Reference 18 February 2004 ©2004 Danny Goodman (www.dannyg.com). All Rights Reserved. 3 © 2004 Danny Goodman (www.dannyg.com). All Rights Reserved. IE4+, NN6+ style Object Properties JSB5 IE4,N6 Operators 32 style 26 Comparison Text & Fonts Borders & Edges Inline Display & Layout == Equals color IE4, N6 borderIE4, N6 clear IE4, N6 N4, IE4 === Strictly equals fontIE4, N6 borderBottomIE4, N6 clip IE4, N6 != Does not equal fontFamily IE4, N6 borderLeftIE4, N6 clipBottom W5 N4, IE4 !== Strictly does not equal JavaScript and fontSize IE4, N6 borderRightIE4, N6 clipLeft W5 > Is greater than fontSizeAdjust M5, N6 borderTopIE4, N6 clipRight W5 >= Is greater than or equal to fontStretch M5, N6 borderBottomColor IE4, N6 clipTop W5 < Is less than Browser Objects fontStyle IE4, N6 borderLeftColorIE4, N6 content M5, N6 <= Is less than or equal to fontVariant IE4, N6 borderRightColorIE4, N6 counterIncrement M5, N6 fontWeight IE4, N6 borderTopColorIE4, N6 counterReset M5, N6 Arithmetic letterSpacing IE4, N6 borderBottomStyle IE4, N6 cssFloat M5, N6 Quick Reference IE5 IE4, N6 IE4, N6 + Plus (and string concat.) lineBreak borderLeftStyle cursor - Minus lineHeight IE4, N6 borderRightStyle IE4, N6 direction IE5, N6 * Multiply quotes M5, N6 borderTopStyle IE4, N6 display IE4, N6 / Divide rubyAlign IE5 borderBottomWidth IE4, N6 filterW4 % Modulo rubyOverhangIE5 borderLeftWidth IE4, N6 layoutGrid W5 ++ Increment rubyPosition IE5 borderRightWidth IE4, N6 layoutGridChar
    [Show full text]
  • Fun with Grid Engine XML Hello!
    Fun with Grid Engine XML Hello! I’m Chris ‘[email protected]’ (public) ‘[email protected]’ (corporate) I work for the BioTeam http://bioteam.net Independent consultant shop Scientists self-taught at IT Bridging the science-HPC gap Long OSS involvement http://bioperl.org http://gridengine.info http://xml-qstat.org 2008 OSGC - “Fun with XML” - Chris Dagdigian <[email protected]> Bias Disclosure I’m the industry jerk Cynical Tight focus on practical, deployable solutions In my world … We are not funded by sovereign nations We do not have petabyte- scale filesystems & multi-gig optical WAN links Don’t have 7 figure IT budgets 2008 OSGC - “Fun with XML” - Chris Dagdigian <[email protected]> Background This is a light talk Rehash of 2007 SGE Workshop Talk Basic intro to “doing stuff with XML” Talking about work published here: http://xml-qstat.org Simple web based SGE status dashboard Not rocket science: Transforms SGE qstat XML into useful XHTML 2008 OSGC - “Fun with XML” - Chris Dagdigian <[email protected]> Smarter people than me … Petr Jung (Sun Microsystems) Wrote code that allows … Native SGE queries from Apache Cocoon: java/org/xmlqstat/generator/CommandGenerator Mark “Mr. FLEXlm” Olesen I stole sge-xml-cacher.pl code from his qlicserver Mark Is integrating qlicserver with xmlqstat Resulting in: Much cleaner code for xml-qstat Lots of new functionality (qhost data, resource data, etc.) 2008 OSGC - “Fun with XML” - Chris Dagdigian <[email protected]> Basic need: Web based SGE status monitoring 2008 OSGC - “Fun with XML” - Chris Dagdigian <[email protected]> Basic need: Web based SGE status monitoring The old way (pre SGE 6.0) 1.
    [Show full text]
  • Designing Universally Accessible Web Based Resources
    Instructor Contact Information Great Lakes ADA and On-Line Course Accessible Information Designing Universally Jon Gunderson, Ph.D., APT Technology Center Accessible Web Div. of Rehab. – Education Services Resources College of Applied Life Studies The Great Lakes Center was founded University of Illinois at in 1991 and is one of 10 national February 18th to April 24st Urbana/Champaign centers established by the US 2003 Department of Education, National Voice: (217) 244-5870 Institute on Disability Rehabilitation TTY: (217) 333-4604 and Research (NIDRR) to provide E-mail: [email protected] technical assistance regarding the ADA. The Great Lakes Center serves http://cita.rehab.uiuc.edu/courses the States of Illinois, Indiana, Michigan, Minnesota, Ohio and Wisconsin. Services include operation Course Meeting Times and of an 800 number for technical assistance and dissemination of Dates (Tenative) Instructor information regarding the ADA through training and direct mail. In addition, Dates: February 18th to April 24st Jon Gunderson, Ph.D., ATP the Center has expanded its mission to include issues related to the use Sponsored by Day: Tuesday and Thursday and acquisition of accessible Division of Rehabilitation – Education Services College of Applied Life Studies information technology and it’s impact Time: 4:00 - 5:00 pm CST University of Illinois at Urbana/Champaign on individuals within a variety of And (Chicago, IL local time) settings, including education, business Great Lakes ADA and Accessible IT Center Department of Disability and Human and government. The Center Development consistently ranks the highest for University of Illinois at Chicago Course Technology volume of calls and number of www.adagreatlakes.org And individuals trained among the 10 Illinois Board of Higher Education Slides and Text Chat: HTML Web centers nationally.
    [Show full text]
  • Javascript Bible, 6Th Edition Danny Goodman Javascript and Browser Objects Quick Reference
    JavaScript and Browser Objects Quick Reference JavaScript Bible, 6th Edition Danny Goodman Appendix A ©2007 Danny Goodman (dannyg.com). All Rights Reserved. 2 JavaScript Bible, 6th Edition. ©2007 Danny Goodman (dannyg.com). All Rights Reserved. JavaScript and Browser Objects Quick Reference String 28 Date 30 Control Statements 32 constructor anchor("anchorName") constructor getFullYear() if (condition) { length big() prototype getYear() statementsIfTrue prototype blink() getMonth() } bold() getDate() charAt(index) getDay() if (condition) { charCodeAt([i]) getHours() statementsIfTrue concat(string2) getMinutes() } else { fixed() getSeconds() statementsIfFalse fontcolor(#rrggbb) getTime() } fontsize(1to7) getMilliseconds() fromCharCode(n1...)* getUTCFullYear() result = condition ? expr1 : expr2 indexOf("str" [,i]) getUTCMonth() italics() getUTCDate() for ([init expr]; [condition]; [update expr]) { lastIndexOf("str" [,i]) getUTCDay() statements link(url) getUTCHours() } localeCompare() getUTCMinutes() match(regexp) getUTCSeconds() for (var in object) { replace(regexp,str) getUTCMilliseconds() statements search(regexp) parse("dateString")* } slice(i,j) setYear(val) small() setFullYear(val) for each ([var] varName in objectRef) { split(char) setMonth(val) statements strike() setDate(val) }M1.8.1 sub() setDay(val) substr(start,length) setHours(val) with (objRef) { substring(intA, intB) setMinutes(val) statements sup() setSeconds(val) } toLocaleLowerCase() setMilliseconds(val) toLocaleUpperCase() setTime(val) do { toLowerCase() setUTCFullYear(val)
    [Show full text]
  • Netscape Navigator 4 Object Road Map "Web Pages That Think"™
    Learn how to create Netscape Navigator 4 Object Road Map "Web Pages That Think"™ window window frame self top parent closedN3,M4 alert("msg") onBlur=N3,M4 defaultStatus back()N4 onDragDrop=N4,(S) document blur()N3,M4 onFocus=N3,M4 history document location toolbar, etc. frames[i] captureEvents(type)N4 onLoad= N4,M4 N4 history clearInterval(ID) onMove= link anchor layer form applet image area innerHeightN4,(S) clearTimeout(ID) onResize=N4,M4 innerWidthN4,(S) close() onUnload= location confirm("msg") text radio button fileUpload select locationbarN4,(S) disableExternalCapture()N4,(S) menubarN4,(S) enableExternalCapture()N4,(S) textarea checkbox reset option name find(["str"][,case, bkwd])N4 password submit onerrorN3,M4 focus()N3,M4 openerN3,M3 forward()N4 outerHeightN4,(S) handleEvent(event)N4 outerWidthN4,(S) home()N4 pageXOffsetN4 moveBy( x, y)N4,(S) Netscape Navigator 4 Document Object Model Containment Hierarchy pageYOffsetN4 moveTo(x,y)N4,(S) parent open(URL,"name","specs")(1),(S) N4 personalbarN4,(S) print()N4,M4 document layer scrollbarsN4,(S) prompt("msg","reply") alinkColor captureEvents(type)N4 (None) above load("filename",y) onBlur= self releaseEvents(type)N4 anchors[i] clear() background moveAbove(layerObj) onFocus= status resizeBy( x, y)N4,(S) applets[i]N3,M4 close() below moveBelow(layerObj) onLoad= statusbarN4,(S) resizeTo(width,height)N4,(S) bgColor getSelection()N4,(2) bgColor moveBy( x, y) onMouseOut= toolbarN4,(S) routeEvent(event)N4 cookie handleEvent(event)N4 clip.top moveTo(x, y) onMouseOver= top scroll(x,y)N3,M4 domainN3,M4
    [Show full text]
  • Javascript & DHTML Cookbool(
    SECOND EDITION JavaScript DHTML Cookbool( Danny Goodman OREILLY® Beijing • Cambridge • Farnham • Kln • Paris • Sebastopol • Taipei • Tokyo Table of Contents Preface xiii 1. Strings 1 1.1 Concatenating (Joining) Strings 4 1.2 Improving String Handling Performance 6 1.3 Accessing Substrings 7 1.4 Changing String Case 8 1.5 Testing Equality of Two Strings 9 1.6 Testing String Containment Without Regular Expressions 11 1.7 Testing String Containment with Regular Expressions 13 1.8 Searching and Replacing Substrings 14 1.9 Using Special and Escaped Characters 15 1.10 Reading and Writing Strings for Cookies 17 1.11 Converting Between Unicode Values and String Characters 20 1.12 Encoding and Decoding URL Strings 21 1.13 Encoding and Decoding Base64 Strings 23 2. Numbers and Dates 27 2.1 Converting Between Numbers and Strings 31 2.2 Testing a Number's Validity 33 2.3 Testing Numeric Equality 34 2.4 Rounding Floating-Point Numbers 35 2.5 Formatting Numbers for Text Display 36 2.6 Converting Between Decimal and Hexadecimal Numbers 39 2.7 Generating Pseudorandom Numbers 41 2.8 Calculating Trigonometric Functions 41 2.9 Creating a Date Object 42 2.10 Calculating a Previous or Future Date 43 2.11 Calculating the Number of Days Between Two Dates 45 2.12 Validating a Date 47 3. Arrays and Objects 51 3.1 Creating a Simple Array 54 3.2 Creating a Multidimensional Array 56 3.3 Converting Between Arrays and Strings 57 3.4 Doing Something with the Items in an Array 59 3.5 Sorting a Simple Array 61 3.6 Combining Arrays 63 3.7 Dividing Arrays 64 3.8 Creating a Custom Object 65 3.9 Simulating a Hash Table for Fast Array Lookup 69 3.10 Doing Something with a Property of an Object 71 3.11 Sorting an Array of Objects 72 3.12 Customizing an Object's Prototype 74 3.13 Converting Arrays and Custom Objects to Strings 79 3.14 Using Objects to Reduce Naming Conflicts 82 4.
    [Show full text]
  • Danny Goodman's Applescript Handbook: MAC OS X Edition 2005
    Danny Goodman's AppleScript Handbook: MAC OS X Edition 2005 Spiderworks, 2005 Danny Goodman's AppleScript Handbook: MAC OS X Edition 2005 0974434493, 9780974434490 file download mahal.pdf 460 pages AppleScript for Applications Computers Ethan Wilde Offers a tutorial for using Apple's scripting language to increase productivity, script workflow projects, build custom graphics, and integrate data from FileMaker Pro 2001 ISBN:0201716135 OS Danny Goodman's AppleScript Handbook: MAC OS X Edition pdf file The Definitive Guide ISBN:0596005571 Computers 453 pages 2003 AppleScript Explains how use AppleScript, the native scripting language for Macintosh, to automate a variety of daily computing tasks and workflow processes, explaining how to interpret Matt Neuburg ISBN:0679790268 Danny Goodman 1990 The complete HyperCard 2.0 handbook 892 pages Computers Danny Goodman's AppleScript Handbook: MAC OS X Edition download Computers 1993 AppleScript Language Guide 380 pages ISBN:0201407353 English Dialect Apple's definitive guide to the powerful AppleScript scripting language, thisbook provides essential information for Macintosh power users and programmerswho want to use "More than a publishing phenomenon, Dummies is a sign of the times." The New York Times "We only buy software that has a For Dummies book to help us learn." Dennis Computers Tom Trinko AppleScript For Dummies ISBN:1568849753 Jan 4, 1996 396 pages Danny pdf download Computers ISBN:0201883562 1996 436 pages "FileMaker Pro, the most popular database program for the Macintosh, is now one of the few cross-platform, relational databases that's also easy to use. Whether you're just Charles Rubin The Macintosh Bible Guide to FileMaker Pro 3 X pdf file 673 pages UOM:39076001316889 Jan 1, 1986 Microsoft BASIC for the Macintosh Manual for Novices as Well as Experienced Programmers.
    [Show full text]