reptile7's JavaScript blog
Saturday, April 13, 2013
 
LEIA Intermission
Blog Entry #285

As of this writing we have worked through the scripts offered by Sections 1, 6, 7, and 8 of the JavaScript subsector of Lissa Explains It All. There are ten sections in the JavaScript subsector. What's in those other sections?

(2) Mousing over the Section 2 link of the subsector's navigation menu indicates that Section 2 should hold four "hover" (mouseover-triggered) code snippets: a visit to Section 2 reveals it to be under construction.

(3) The first three subsections of Section 3 contain no JavaScript but instead provide HTML and .class file components for assembling several Java applets; at no point does the word "Java" appear in the subsection text. Section 3 concludes with a basic image-flipping script that is similar to the code we saw in HTML Goodies' "So, You Want A Dual Image Flip, Huh?" tutorial.

(4) Section 4's first subsection briefly addresses the generation of secondary windows via the open( ) method of the window object. Section 4's second subsection details two old-school* ways to 'free' a frame src page from its frameset ancestor(s).

*At a frameset page, the context menus of most modern browsers (Google Chrome being a conspicuous exception) sport Open Frame in New Window and Open Frame in New Tab commands for displaying an isolated frame page.
A context menu with a highlighted Open Frame in New Window command
(5) Section 5 covers alert( ), prompt( ), and confirm( ) dialog boxes. Lissa does not specify that alert( ), prompt( ), and confirm( ) are methods of the window object, not that that's an original sin on her part, of course.

(9) Section 9's first subsection offers a script for creating a "chromeless" (read customizable) secondary window; the script's complexity - its openIT( ) and chromeless( ) functions respectively expect 10 and 28 arguments, for example - is wildly out of proportion to the simple window that is opened by the subsection's demo with a variety of browsers on my iMac. Section 9's second subsection provides a snippet for putting a frame around a Web page; the snippet was formerly IE only but will today work with other browsers if we recast it as document.body.style.border = "15px outset black";.

(10) We strike gold in Section 10. Mousing over the Section 10 link of the subsector's navigation menu indicates that Section 10 should contain a single subsection with a snippet that will add auto favorites, that is, prompt the user to let the current page bookmark itself, a coding situation we explored in the Your new fave section of Blog Entry #246. Section 10 does in fact feature a window.external.AddFavorite( ) snippet, but it also offers another three Peter Gehrig scripts - a splash tracker script, a letter magnet script, and a preload splash script - that summon us to put them under the microscope.

The Section 10 material will have to wait, however. Recently I've been gearing up for a go at some unfinished business, namely, HTML Goodies' "So, You Want A Shopping Cart, Huh?" tutorial, which we did not cover in our long tour of the HTML Goodies Beyond HTML : JavaScript sector and which I am eager to take on for at least three reasons:
(1) The "Shopping Cart" tutorial dates to the Joe Burns era, but its code is much more complicated than that in any of Joe's other tutorials and will give us a good workout.
(2) The present-day "Shopping Cart" demo doesn't work/throws errors, and we just can't let that stand, now can we?
(3) This Shopping Cart Uses Cookies, Joe proclaims in bold text. Oh yeah? The "Shopping Cart" code does include setCookieArray( ) and setCookie( ) functions for setting cookies and getCookieArray( ) and getCookie( ) functions for extracting the values of those cookies, but at no point in the code are any cookies actually set, so we need to get the cookie thing sorted out too.
So that's what we'll be doing for a while.

Comments: Post a Comment

<< Home

Powered by Blogger

Actually, reptile7's JavaScript blog is powered by Café La Llave. ;-)