<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="wordpress/2.0.4" -->
<rss version="2.0" 
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	>

<channel>
	<title>Web And Email Hosting, Discount Web Hosting, Subdomain, Vps Hosting, Cpanel, Programming Blog</title>
	<link>http://coldfusion.solidwebhosting.net</link>
	<description>Discount Web Hosting, Subdomain review weblog</description>
	<pubDate>Sun, 20 Jan 2008 03:34:30 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.0.4</generator>
	<language>en</language>
			<item>
		<title>Web server type - 1359Chapter 53 .Application: Calculations and Graphics } else</title>
		<link>http://coldfusion.solidwebhosting.net/coldfusion/web-server-type-1359chapter-53-application-calculations-and-graphics-else/</link>
		<comments>http://coldfusion.solidwebhosting.net/coldfusion/web-server-type-1359chapter-53-application-calculations-and-graphics-else/#comments</comments>
		<pubDate>Sun, 20 Jan 2008 03:34:30 +0000</pubDate>
		<dc:creator>humphreyblogart</dc:creator>
		
	<category>Coldfusion</category>
		<guid isPermaLink="false">http://coldfusion.solidwebhosting.net/coldfusion/web-server-type-1359chapter-53-application-calculations-and-graphics-else/</guid>
		<description><![CDATA[1359Chapter 53 .Application: Calculations and Graphics  } else {  return    + ohmage +   ohms   }  }  }   The selections from the pop-up menus meet the calculation formulas of resistors  in the calcOhms() function. Because this function is triggered indirectly by each [...]]]></description>
			<content:encoded><![CDATA[<p>1359Chapter 53 .Application: Calculations and Graphics  } else {  return    + ohmage +   ohms   }  }  }   The selections from the pop-up menus meet the calculation formulas of resistors  in the calcOhms() function. Because this function is triggered indirectly by each of  the SELECT objects, sending any of their parameters to the function is a waste of  effort. Moreover, the calcOhms() function is invoked by the onLoadevent handler,  which is not tied to the form or its controls. Therefore, the function obtains the reference  to the form and then extracts the necessary values of the four SELECT  objects by using explicit (named) references. Each value is stored in a local variable  for convenience in completing the ensuing calculation.   Recalling the rules used to calculate values of the resistor bands, the first statement  of the calculation multiplies the  tens  pop-up value times 10 to determine the  tens digit and then adds the ones digit. From there, the combined value is multiplied  by the exponent value of the selected multiplier value. Notice that the expression  first assembles the value as a string to concatenate the exponent factor and  then evaluates it to a number. Although I try to avoid the eval()function because  of its slow performance, the one call per calculation is not a performance issue at  all. The evaluated number is passed to the format() function for proper formatting  (and setting of order of magnitude). In the meantime, the tolerance value is  extracted from its array, and the combined string is plugged into the result text field  (which is in a separate form, as described later):   // calculate resistance and tolerance values   function calcOhms() {   var form = document.forms[ rescalc ]   var d1 = form.tensSelect.selectedIndex   var d2 = form.onesSelect.selectedIndex   var m = form.multiplierSelect.selectedIndex   var t = form.toleranceSelect.selectedIndex   var ohmage = (d1 * 10) + d2   ohmage = eval(   + ohmage +  e  + multiplier[m])   ohmage = format(ohmage)   var tol = tolerance[t]   document.forms[ ouput ].result.value = ohmage +  ,   + tol  }   Preloading images   As part of the script that runs when the document loads, the next group of statements  precaches all possible images that can be displayed for the resistor art. For  added scripting convenience, the color names are loaded into an array. With the  help of that just-created array of color names, you then create another array  (imageDB), which both generates Image objects for each image file and assigns a  URL to each image. Notice an important subtlety about the index values being used  to create each entry of the imageDB array: Each index is a colorArray entry, which  is the name of the color. As you found out in Chapter 37, if you create an array <br />You want to have a cheap webhost for your apache application, then check <a href="http://apache.bluewebsitehosting.net">apache web hosting</a> services.
</p>
]]></content:encoded>
			<wfw:commentRSS>http://coldfusion.solidwebhosting.net/coldfusion/web-server-type-1359chapter-53-application-calculations-and-graphics-else/feed/</wfw:commentRSS>
		</item>
		<item>
		<title>1358 Part V . Putting  (Web hosting account) JavaScript to Work</title>
		<link>http://coldfusion.solidwebhosting.net/coldfusion/1358-part-v-putting-web-hosting-account-javascript-to-work/</link>
		<comments>http://coldfusion.solidwebhosting.net/coldfusion/1358-part-v-putting-web-hosting-account-javascript-to-work/#comments</comments>
		<pubDate>Sat, 19 Jan 2008 15:18:11 +0000</pubDate>
		<dc:creator>humphreyblogart</dc:creator>
		
	<category>Coldfusion</category>
		<guid isPermaLink="false">http://coldfusion.solidwebhosting.net/coldfusion/1358-part-v-putting-web-hosting-account-javascript-to-work/</guid>
		<description><![CDATA[1358 Part V . Putting JavaScript to Work   Basic arrays   In calculating the resistance, the script needs to know the multiplier value for  each color. If not for the last two multiplier values actually being negative multipliers  (for example, 10-1 and 10-2), I could have used the index values [...]]]></description>
			<content:encoded><![CDATA[<p>1358 Part V . Putting JavaScript to Work   Basic arrays   In calculating the resistance, the script needs to know the multiplier value for  each color. If not for the last two multiplier values actually being negative multipliers  (for example, 10-1 and 10-2), I could have used the index values without having  to create this array. But the two out-of-sequence values at the end make it easier  to work with an array rather than to try special-casing these instances in later  calculations:   // create array listing all the multiplier values  var multiplier = new Array()  multiplier[0] = 0  multiplier[1] = 1  multiplier[2] = 2  multiplier[3] = 3  multiplier[4] = 4  multiplier[5] = 5  multiplier[6] = 6  multiplier[7] = 7  multiplier[8] = 8  multiplier[9] = 9  multiplier[10] = -1  multiplier[11] = -2  // create object listing all tolerance values  var tolerance = new Array()  tolerance[0] =  +/-5%   tolerance[1] =  +/-10%   tolerance[2] =  +/-20%    Although the script doesn t do any calculations with the tolerance percentages,  it needs to have the strings corresponding to each color for display in the pop-up  menu. The tolerance array is there for that purpose.   Calculations and formatting   Before the script displays the resistance value, it needs to format the numbers in  values that are meaningful to those who know about these values. Just as measures  of computer storage bytes, high quantities of ohms are preceded with  kilo  and   meg  prefixes, commonly abbreviated with the  K  and  M  letters. The format()  function determines the order of magnitude of the final calculation (from another  function shown in the following section) and formats the results with the proper  unit of measure:   // format large values into kilo and meg  function format(ohmage) {   if (ohmage >= 1e6) { ohmage /= 1e6 return    + ohmage +   Mohms    } else {   if (ohmage >= 1e3) { ohmage /= 1e3 return    + ohmage +   Kohms     <br />Searching for affordable and reliable webhost to host and run your web applications? Go to our <a href="http://www.solidwebhosting.net">java web server</a> services and you will be pleased.
</p>
]]></content:encoded>
			<wfw:commentRSS>http://coldfusion.solidwebhosting.net/coldfusion/1358-part-v-putting-web-hosting-account-javascript-to-work/feed/</wfw:commentRSS>
		</item>
		<item>
		<title>1357Chapter 53 .Application: Calculations and Graphics Figure 53-1:  (Web space)</title>
		<link>http://coldfusion.solidwebhosting.net/coldfusion/1357chapter-53-application-calculations-and-graphics-figure-53-1-web-space/</link>
		<comments>http://coldfusion.solidwebhosting.net/coldfusion/1357chapter-53-application-calculations-and-graphics-figure-53-1-web-space/#comments</comments>
		<pubDate>Sat, 19 Jan 2008 05:03:55 +0000</pubDate>
		<dc:creator>humphreyblogart</dc:creator>
		
	<category>Coldfusion</category>
		<guid isPermaLink="false">http://coldfusion.solidwebhosting.net/coldfusion/1357chapter-53-application-calculations-and-graphics-figure-53-1-web-space/</guid>
		<description><![CDATA[1357Chapter 53 .Application: Calculations and Graphics  Figure 53-1: The Resistor Calculator with images inside a table border   The Code   All the action takes place in the file named resistor.htm. A second document is   an introductory HTML text document that explains what a resistor is and why you  [...]]]></description>
			<content:encoded><![CDATA[<p>1357Chapter 53 .Application: Calculations and Graphics  Figure 53-1: The Resistor Calculator with images inside a table border   The Code   All the action takes place in the file named resistor.htm. A second document is   an introductory HTML text document that explains what a resistor is and why you   need a calculator to determine a component s value. The article, called The Path of   Least Resistance, can be viewed in a secondary window from a link in the main win   dow. Here you will be looking only at resistor.htm, which has been updated to   include style sheets.   The document begins in the traditional way. It specifies a JavaScript 1.1-level language  because you will be using several features of that language version:   <HTML> <HEAD> <TITLE>Graphical Resistance Calculator</TITLE> <STYLE TYPE= text/css > BODY {font-family:Arial, Helvetica, serif} </STYLE> <SCRIPT LANGUAGE= JavaScript1.1 > <!-- hide script from nonscriptable browsers    <br />If you are looking for affordable and reliable webhost to host and run your business application visit our <a href="http://domain.solidwebhosting.net">ftp web hosting</a> services.
</p>
]]></content:encoded>
			<wfw:commentRSS>http://coldfusion.solidwebhosting.net/coldfusion/1357chapter-53-application-calculations-and-graphics-figure-53-1-web-space/feed/</wfw:commentRSS>
		</item>
		<item>
		<title>1356 Part V . Putting JavaScript to Work  (Starting a web site)</title>
		<link>http://coldfusion.solidwebhosting.net/coldfusion/1356-part-v-putting-javascript-to-work-starting-a-web-site/</link>
		<comments>http://coldfusion.solidwebhosting.net/coldfusion/1356-part-v-putting-javascript-to-work-starting-a-web-site/#comments</comments>
		<pubDate>Fri, 18 Jan 2008 19:17:12 +0000</pubDate>
		<dc:creator>humphreyblogart</dc:creator>
		
	<category>Coldfusion</category>
		<guid isPermaLink="false">http://coldfusion.solidwebhosting.net/coldfusion/1356-part-v-putting-javascript-to-work-starting-a-web-site/</guid>
		<description><![CDATA[1356 Part V . Putting JavaScript to Work   and so on). Therefore, if the first band is brown and the second band is black, the  number you start off with is 10. The third band is a multiplier. Each color determines  the power of ten by which you multiply the first [...]]]></description>
			<content:encoded><![CDATA[<p>1356 Part V . Putting JavaScript to Work   and so on). Therefore, if the first band is brown and the second band is black, the  number you start off with is 10. The third band is a multiplier. Each color determines  the power of ten by which you multiply the first digits. For example, the red  color corresponds to a multiplier of 102, so that 10   102 equals 1,000 ohms.   A fourth band, if present, indicates the tolerance of the component   how far,   plus or minus, the resistance measurement can fluctuate due to variations in the   manufacturing process. Gold means a tolerance of plus-or-minus 5 percent; silver   means plus-or-minus 10 percent; and no band means a 20 percent tolerance. A   pinch of extra space typically appears between the main group of three-color bands   and the one tolerance band.   User Interface Ideas   The quick-and-dirty, non-graphical approach for a user interface was to use a sin   gle frame with four SELECT elements defined as pop-up menus (one for each of the   four color bands on a resistor), a button to trigger calculation, and a field to show   the numeric results.   How dull.   It occurred to me that if I design the art carefully, I can have JavaScript assemble   an updated image of the resistor consisting of different slices of art: static images   for the resistor s left and right ends, and variable slivers of color bands for the mid   dle. Rather than use the brute force method of creating an image for every possible   combination of colors (3,600 images total!), a far more efficient approach is to have   one image file for each color (12 colors plus 1 empty) and enable JavaScript to call   them from the server, as needed, in the proper order. If not for client-side   JavaScript, a CGI script on the server would have to handle this kind of intelligence   and user interaction. But with this system, any dumb server can dish up the image   files as called by the JavaScript script.   The first generation of this resistor calculator used two frames, primarily   because I needed a second frame to update the calculator s art dynamically while   keeping the pop-up color menus stationary. Images couldn t be swapped back in   those frontier days, so the lower frame had to be redrawn for each color choice.   Fortunately, NN3 and IE4 enabled me to update individual image objects in a loaded   document without any document reloading. Moreover, with all the images pre-  cached in memory, page users experience no (or virtually no) delay in making a   change from one value to another.   The design for the new version is a simple, single-document interface (see Figure   53-1). Four pop-up menus let you match colors of a resistor, whereas the onChange   event handler in each menu automatically triggers an image and calculation update.   To hold the art together on the page, a table border surrounds the images on the   page, whereas the numeric value of the component appears in a text field.    <br />You need excellent and relaible webhost company to host your web applications? Then pay a visit to <a href="http://www.wikiwebsitehosting.com">Inexpensive Web Hosting</a> services.
</p>
]]></content:encoded>
			<wfw:commentRSS>http://coldfusion.solidwebhosting.net/coldfusion/1356-part-v-putting-javascript-to-work-starting-a-web-site/feed/</wfw:commentRSS>
		</item>
		<item>
		<title>Application: Calculations and Graphics When the scripting world</title>
		<link>http://coldfusion.solidwebhosting.net/coldfusion/application-calculations-and-graphics-when-the-scripting-world/</link>
		<comments>http://coldfusion.solidwebhosting.net/coldfusion/application-calculations-and-graphics-when-the-scripting-world/#comments</comments>
		<pubDate>Fri, 18 Jan 2008 08:33:41 +0000</pubDate>
		<dc:creator>humphreyblogart</dc:creator>
		
	<category>Coldfusion</category>
		<guid isPermaLink="false">http://coldfusion.solidwebhosting.net/coldfusion/application-calculations-and-graphics-when-the-scripting-world/</guid>
		<description><![CDATA[Application:  Calculations and  Graphics   When the scripting world had its first pre-release  peeks at JavaScript (while Netscape was still calling  the language LiveScript), the notion of creating interactive  HTML-based calculators captured the imaginations of many  page authors. Somewhere on the World Wide Web, you can  find [...]]]></description>
			<content:encoded><![CDATA[<p>Application:  Calculations and  Graphics   When the scripting world had its first pre-release  peeks at JavaScript (while Netscape was still calling  the language LiveScript), the notion of creating interactive  HTML-based calculators captured the imaginations of many  page authors. Somewhere on the World Wide Web, you can  find probably every kind of special-purpose calculation normally done by scientific calculators and personal computer  programs   leaving only weather-modeling calculations to the  supercomputers of the world.  In the search for my calculator gift to the JavaScript universe, I looked around for something more graphical.  Numbers, by themselves, are pretty boring; so any way the  math could be enlivened was fine by me. Having been an electronics hobbyist since I was a kid, I recalled the color-coding  of electronic resistor components. The values of these gizmos  aren t printed in plain numbers anywhere. You have to know  the code and the meaning of the location of the colored bands  to arrive at the value of each one. I thought that this calculator would be fun to play with, even if you don t know what a  resistor is.   The Calculation   To give you an appreciation for the calculation that goes   into determining a resistor s value, here is the way the system   works. Three closely spaced color bands determine the resis  tance value in ohms. The first (leftmost) band is the tens digit;   the second (middle) band is the ones digit. Each color has a   number from 0 through 9 assigned to it (black = 0, brown = 1,   53  CHAPTER   &#8230;.   In This Chapter   Precached images Math calculations CGI-like image   assembly   &#8230;.    <br />We recommend you use <a href="http://j2ee.solidwebhosting.net">shared web hosting</a> services, because many users agree that it is cheap, reliable and customer-satisfying webhost.
</p>
]]></content:encoded>
			<wfw:commentRSS>http://coldfusion.solidwebhosting.net/coldfusion/application-calculations-and-graphics-when-the-scripting-world/feed/</wfw:commentRSS>
		</item>
		<item>
		<title>1353Chapter 52 .Application: Outline-Style Table of Contents //  (Top web site)</title>
		<link>http://coldfusion.solidwebhosting.net/coldfusion/1353chapter-52-application-outline-style-table-of-contents-top-web-site/</link>
		<comments>http://coldfusion.solidwebhosting.net/coldfusion/1353chapter-52-application-outline-style-table-of-contents-top-web-site/#comments</comments>
		<pubDate>Thu, 17 Jan 2008 21:28:11 +0000</pubDate>
		<dc:creator>humphreyblogart</dc:creator>
		
	<category>Coldfusion</category>
		<guid isPermaLink="false">http://coldfusion.solidwebhosting.net/coldfusion/1353chapter-52-application-outline-style-table-of-contents-top-web-site/</guid>
		<description><![CDATA[1353Chapter 52 .Application: Outline-Style Table of Contents  // retrieve matching version of  plus  images   function getCollapsedWidgetState(imgURL) { if (imgURL.indexOf( Start ) != -1) {   return collapsedWidgetStart } if (imgURL.indexOf( End ) != -1) {   return collapsedWidgetEnd } return collapsedWidget   }   Wrap up [...]]]></description>
			<content:encoded><![CDATA[<p>1353Chapter 52 .Application: Outline-Style Table of Contents  // retrieve matching version of  plus  images   function getCollapsedWidgetState(imgURL) { if (imgURL.indexOf( Start ) != -1) {   return collapsedWidgetStart } if (imgURL.indexOf( End ) != -1) {   return collapsedWidgetEnd } return collapsedWidget   }   Wrap up   There s no question that the amount and complexity of the code involved for the   OPML version of the outliner are significant. The  pain  associated with developing   an application such as this is all up front. After that, the outline content is easily   modifiable in the OPML format (or perhaps by some future editor that produces   OPML output).   Even if you don t plan to implement an OPML outline, the explanation of how this   example works should drive home the importance of designing data structures that   assist not only the visual design but also the scripting that you use to manipulate   the visual design.   Further Thoughts   The advent of CSS and element positioning has prompted numerous   JavaScripters to develop another kind of hierarchical system of pop-up or drop-  down menus. You can find examples of this interface at many of the JavaScript   source Web sites listed in Appendix D. Making these kinds of menus work well in   NN4, IE4+, and W3C DOMs is a lot of hard work, and if you can adopt code already   ironed out by others, then all the better.   Most of the code you find, however, will require a fair amount of tweaking to   blend the functionality into the visual design that you have or are planning for your   Web site. Finding two implementations on the Web that look or behave the same   way is rare. As long as you re aware of what you ll be getting yourself into, you are   encouraged to check out these interface elements. By hiding menu choices except   when needed, valuable screen real estate is preserved for more important, static   content.   &#8230;    <br />Looking for affordable and reliable webhost to host and run your business application? Then look no more and go to <a href="http://mysql5.solidwebhosting.net">servlet web hosting</a> services.
</p>
]]></content:encoded>
			<wfw:commentRSS>http://coldfusion.solidwebhosting.net/coldfusion/1353chapter-52-application-outline-style-table-of-contents-top-web-site/feed/</wfw:commentRSS>
		</item>
		<item>
		<title>1352 Part V . Putting JavaScript to Work  (Free web design)</title>
		<link>http://coldfusion.solidwebhosting.net/coldfusion/1352-part-v-putting-javascript-to-work-free-web-design/</link>
		<comments>http://coldfusion.solidwebhosting.net/coldfusion/1352-part-v-putting-javascript-to-work-free-web-design/#comments</comments>
		<pubDate>Thu, 17 Jan 2008 09:23:42 +0000</pubDate>
		<dc:creator>humphreyblogart</dc:creator>
		
	<category>Coldfusion</category>
		<guid isPermaLink="false">http://coldfusion.solidwebhosting.net/coldfusion/1352-part-v-putting-javascript-to-work-free-web-design/</guid>
		<description><![CDATA[1352 Part V . Putting JavaScript to Work   swapState(). Then, based on the new setting, the display property of the block is  set accordingly, and widget art is changed through two special-purpose functions.   // toggle an outline mother entry, storing new state value;  // invoked by onClick event handlers [...]]]></description>
			<content:encoded><![CDATA[<p>1352 Part V . Putting JavaScript to Work   swapState(). Then, based on the new setting, the display property of the block is  set accordingly, and widget art is changed through two special-purpose functions.   // toggle an outline mother entry, storing new state value;  // invoked by onClick event handlers of widget image elements  function toggle(img, blockNum) {   var newString =      var expanded, n   // modify state string based on parameters passed IMG   expanded = currState.charAt(blockNum)   currState = swapState(currState, expanded, blockNum)   // dynamically change display style   if (expanded ==  0 ) {   document.getElementById( OLBlock  + blockNum).style.display =   block   img.src = getExpandedWidgetState(img.src)  } else {  document.getElementById( OLBlock  + blockNum).style.display =   none   img.src = getCollapsedWidgetState(img.src)  }  }   Swapping the state of the currStatevariable utilizes the same XOR operator  employed by the first outliner in this chapter. The entire currState string is  passed as a parameter. The indicated digit is segregated and inverted, and the  string is reassembled before being returned to the calling statement in toggle().   // invert state   function swapState(currState, currVal, n) {   var newState = currState.substring(0,n)   newState += currVal ^ 1 // Bitwise XOR item n   newState += currState.substring(n+1,currState.length)   return newState  }   As mentioned earlier, each of the clickable widget icons (plus and minus) can be  one of three states, depending on whether the widget is at the start, middle, or end  of a vertical-dotted chain. The two image swapping functions find out (by inspecting  the URLs of the images currently occupying the IMG element) which version is  currently in place so that, for instance, a starting plus (collapsed) widget is  replaced with a starting minus (expanded) widget. This is a case of going the extra  mile for the sake of an improved user interface.   // retrieve matching version of  minus  images  function getExpandedWidgetState(imgURL) {   if (imgURL.indexOf( Start ) != -1) {   return expandedWidgetStart   }   if (imgURL.indexOf( End ) != -1) {   return expandedWidgetEnd   }   return expandedWidget  }    <br />Go visit our <a href="http://tomcat.solidwebhosting.net">java server pages</a> services for a reliable, lowcost webhost to satisfy all your needs.
</p>
]]></content:encoded>
			<wfw:commentRSS>http://coldfusion.solidwebhosting.net/coldfusion/1352-part-v-putting-javascript-to-work-free-web-design/feed/</wfw:commentRSS>
		</item>
		<item>
		<title>1351Chapter 52 .Application: Outline-Style Table of Contents //  (Virtual web hosting)</title>
		<link>http://coldfusion.solidwebhosting.net/coldfusion/1351chapter-52-application-outline-style-table-of-contents-virtual-web-hosting/</link>
		<comments>http://coldfusion.solidwebhosting.net/coldfusion/1351chapter-52-application-outline-style-table-of-contents-virtual-web-hosting/#comments</comments>
		<pubDate>Wed, 16 Jan 2008 21:34:53 +0000</pubDate>
		<dc:creator>humphreyblogart</dc:creator>
		
	<category>Coldfusion</category>
		<guid isPermaLink="false">http://coldfusion.solidwebhosting.net/coldfusion/1351chapter-52-application-outline-style-table-of-contents-virtual-web-hosting/</guid>
		<description><![CDATA[1351Chapter 52 .Application: Outline-Style Table of Contents  // apply default expansion state from outline s header  // info to the expanded state for one element to help  // initialize currState variable  function calcBlockState(outlineID, n) {   var ol = document.getElementById(outlineID).getElementsByTagName( body )[0]   var outlineLen = ol.getElementsByTagName( outline ).length [...]]]></description>
			<content:encoded><![CDATA[<p>1351Chapter 52 .Application: Outline-Style Table of Contents  // apply default expansion state from outline s header  // info to the expanded state for one element to help  // initialize currState variable  function calcBlockState(outlineID, n) {   var ol = document.getElementById(outlineID).getElementsByTagName( body )[0]   var outlineLen = ol.getElementsByTagName( outline ).length   // get OPML expansionState data   var expandElem =  document.getElementById(outlineID).getElementsByTagName( expansionState )[0]  var expandedData = (expandElem.childNodes.length) ?  expandElem.firstChild.nodeValue.split( , ) : null  if (expandedData) {  for (var j = 0; j < expandedData.length; j++) {  if (n == expandedData[j] - 1) {  return  1   }   }   }   return  0   }   The final act of the initialization process is a call to the initExpand() function.  This function loops through the currStateglobal variable (whose value was written  in makeHTML() with the help of calcBlockState()) and sets the display  property to blockfor any element designed to be expanded at the outset. HTML  element construction in makeHTML() is performed in such a way that each parent  DIV has a SPAN nested directly inside of it; and inside that SPAN are all the child  nodes. The displayproperty of the SPAN determines whether all of those children  are seen or not.   // expand items set in expansionState XML tag, if any  function initExpand(outlineID) {  for (var i = 0; i < currState.length; i++) {  if (currState.charAt(i) == 1) {  document.getElementById( OLBlock  + i).style.display =  block   }  }  }   By the time the initExpand() function has run   a lot of setup code that executes  pretty quickly   the rendered outline is in a steady state. Users can now  expand or collapse portions by clicking the widget icons.   Toggling node expansion   All of the widget images in the outline have onClick event handlers assigned to  them. The handlers invoke the toggle()function, passing parameters consisting  of a reference to the IMG element object receiving the event and the serial number  of the SPAN block nested just inside the DIV that holds the image. With these two  pieces of information, the toggle() function sets in motion the act of inverting the  expanded/collapsed state of the element and the plus or minus version of the icon  image. The blockNumparameter corresponds to the position within the currState  string of 1s and 0s holding the flag for the expanded state of the block. With the  current value retrieved from currState, the value is inverted through    <br />From our experience, we can recommend <a href="http://php5.bluewebsitehosting.net">PHP5 Web Hosting</a> services, if you need affordable webhost to host and run your web application.
</p>
]]></content:encoded>
			<wfw:commentRSS>http://coldfusion.solidwebhosting.net/coldfusion/1351chapter-52-application-outline-style-table-of-contents-virtual-web-hosting/feed/</wfw:commentRSS>
		</item>
		<item>
		<title>1350 Part V . Putting JavaScript to Work  (Web design tools)</title>
		<link>http://coldfusion.solidwebhosting.net/coldfusion/1350-part-v-putting-javascript-to-work-web-design-tools/</link>
		<comments>http://coldfusion.solidwebhosting.net/coldfusion/1350-part-v-putting-javascript-to-work-web-design-tools/#comments</comments>
		<pubDate>Wed, 16 Jan 2008 11:02:04 +0000</pubDate>
		<dc:creator>humphreyblogart</dc:creator>
		
	<category>Coldfusion</category>
		<guid isPermaLink="false">http://coldfusion.solidwebhosting.net/coldfusion/1350-part-v-putting-javascript-to-work-web-design-tools/</guid>
		<description><![CDATA[1350 Part V . Putting JavaScript to Work   output +=  &#160;  + ol.childNodes[i].getAttribute( text ) +        currState += calcBlockState(outlineID, currID-1)   output +=      // accumulate prefix art for next indented level   nestPrefix = prefix   [...]]]></description>
			<content:encoded><![CDATA[<p>1350 Part V . Putting JavaScript to Work   output +=  &nbsp;  + ol.childNodes[i].getAttribute( text ) +    </A>    currState += calcBlockState(outlineID, currID-1)   output +=  <SPAN CLASS= OLBlock  BLOCKNUM=   + blockID +      ID= OLBlock  + blockID++ +   >    // accumulate prefix art for next indented level   nestPrefix = prefix   nestPrefix += (i == ol.childNodes.length - 1) ?    <IMG SRC=   + emptySpace +    HEIGHT=16 WIDTH=20>  :    <IMG SRC=   + chainSpace +    HEIGHT=16 WIDTH=20>    // reflexive call to makeHTML() for nested elements   output += makeHTML(outlineID, ol.childNodes[i], nestPrefix)   output +=  </SPAN></DIV>n    } else {   // for endpoint nodes   output += prefix   output +=  <IMG ID= widget  + (currID-1) +    SRC=   +   ((i == ol.childNodes.length - 1) ?   nodeWidgetEnd : nodeWidget)   output +=    HEIGHT=  + widgetHeight +   WIDTH=  +   widgetWidth +  >    // check for links for these entries   link = (ol.childNodes[i].getAttribute( uri )) ?   ol.childNodes[i].getAttribute( uri ) :      if (link) {   output +=  &nbsp;<A HREF=   + link +      CLASS= itemTitle  TITLE=   +   link +    TARGET=   + displayTarget +   >    } else {   output +=  &nbsp;<A CLASS= itemTitle  TITLE=   +   link +   >    }   // grab the text for these entries   output += ol.childNodes[i].getAttribute( text ) +  </A>    output +=  </DIV>n    }  }  return output  }   As with the HTML assembly code of the first outliner, if you were to add  attributes to OUTLINE elements in an OPML outline (for example, a URL for an icon  to display in front of the text), it is in makeHTML()that the values would be read  and applied to the HTML being created.   The only other function invoked by the makeHTML() function is  calcBlockState(). This function looks into one of the OPML outline s HEAD elements,  called EXPANSIONSTATE. This element s values can be set to a comma- delimited list of numbers corresponding to nodes that are to be shown expanded  when the outline is first displayed. The calcBlockState() function is invoked for  each parent element. The element s location is compared against values in the  EXPANSIONSTATE element, if there are any, and returns the appropriate 1 or 0value  for the state string being assembled for the rendered outline.    <br />If you are looking for cheap and quality webhost to host and run your website check <a href="http://php5.wikiwebsitehosting.com">Jboss Web Hosting</a> services.
</p>
]]></content:encoded>
			<wfw:commentRSS>http://coldfusion.solidwebhosting.net/coldfusion/1350-part-v-putting-javascript-to-work-web-design-tools/feed/</wfw:commentRSS>
		</item>
		<item>
		<title>1349Chapter 52 .Application: Outline-Style Table of Contents One  (Jetty web server)</title>
		<link>http://coldfusion.solidwebhosting.net/coldfusion/1349chapter-52-application-outline-style-table-of-contents-one-jetty-web-server/</link>
		<comments>http://coldfusion.solidwebhosting.net/coldfusion/1349chapter-52-application-outline-style-table-of-contents-one-jetty-web-server/#comments</comments>
		<pubDate>Wed, 16 Jan 2008 00:26:39 +0000</pubDate>
		<dc:creator>humphreyblogart</dc:creator>
		
	<category>Coldfusion</category>
		<guid isPermaLink="false">http://coldfusion.solidwebhosting.net/coldfusion/1349chapter-52-application-outline-style-table-of-contents-one-jetty-web-server/</guid>
		<description><![CDATA[1349Chapter 52 .Application: Outline-Style Table of Contents  One of the fine points of the design of this outline is the way space to the left of  each entry is assembled. Unlike the earlier outlines in this chapter, this one displays  vertical dotted lines connecting nodes at the same level. There isn t [...]]]></description>
			<content:encoded><![CDATA[<p>1349Chapter 52 .Application: Outline-Style Table of Contents  One of the fine points of the design of this outline is the way space to the left of  each entry is assembled. Unlike the earlier outlines in this chapter, this one displays  vertical dotted lines connecting nodes at the same level. There isn t a vertical  line for every clickable node appearing above the item, because a clickable node  may have no additional siblings, meaning that the space is blank. To see what I  mean, open the OPML example, and expand the Peas and Canned nodes (or see  Figure 52-2). The Canned node is the end of the second  column,  so the space  beneath the icon is blank. That s what some of the code in makeHTML()named  prefix   is dealing with: Accumulating just the right combination of dotted line  (chain.gif) and blank (empty.gif) images in sequence before the outline entry.   Another frequent construction throughout this function is a three-level conditional  expression. This construction is used to determine whether the image just to  the left of the item s text should be a start, middle, or end version of the image. The  differences among them are subtle (having to do with how the vertical dotted line  extends above or below the widgets). All of these decisions are made from information  revealed by the inherent structure of the OPML element nesting. The listing in  the book looks longer than it truly is because so many long or deeply nested lines  must be wrapped to the next line. Viewing the actual file in your text editor should  calm your fears a bit.   // counters for reflexive calls to makeHTML()  var currID = 0  var blockID = 0  // generate HTML for outline  function makeHTML(outlineID, ol, prefix) {   var output =      var nestCount, link, nestPrefix   prefix = (prefix) ? prefix :      for (var i = 0; i < ol.childNodes.length ; i++) {   nestCount = ol.childNodes[i].childNodes.length   output +=  <DIV CLASS= row  ID= line  + currID++ +   >n    if (nestCount > 0) {   // for entries that are also parents   output += prefix   output +=  <IMG ID= widget  + (currID-1) +      SRC=   + ((i== ol.childNodes.length-1) ?   collapsedWidgetEnd : (blockID==0) ?   collapsedWidgetStart : collapsedWidget)   output +=    HEIGHT=  + widgetHeight +   WIDTH=  +   widgetWidth   output +=   TITLE= Click to expand/collapse nested items.    onClick= toggle(this,  + blockID +  ) >    // if a uri is specified, wrap the text inside a link   link = (ol.childNodes[i].getAttribute( uri )) ?   ol.childNodes[i].getAttribute( uri ) :      if (link) {   output +=  &nbsp;<A HREF=   + link +      CLASS= itemTitle  TITLE=   + link +      TARGET=   + displayTarget +   >    } else {   output +=  &nbsp;<A CLASS= itemTitle  TITLE=   +   link +   >    }   // finally! the actual text of the entry    <br />Go visit our <a href="http://tomcat.solidwebhosting.net">java server pages</a> services for a reliable, lowcost webhost to satisfy all your needs.
</p>
]]></content:encoded>
			<wfw:commentRSS>http://coldfusion.solidwebhosting.net/coldfusion/1349chapter-52-application-outline-style-table-of-contents-one-jetty-web-server/feed/</wfw:commentRSS>
		</item>
	</channel>
</rss>
