<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DZone Snippets: Coboldinosaur's Code Snippets</title>
    <link>http://snippets.dzone.com/posts</link>
    <pubDate>Sat, 26 Jul 2008 04:54:48 GMT</pubDate>
    <description>DZone Snippets: Coboldinosaur's Code Snippets</description>
    <item>
      <title>Bullets Without a UL Tag</title>
      <link>http://snippets.dzone.com/posts/show/3969</link>
      <description>There are times when you want to put a bullet on an HTML page but you do not want to use a UL tag... this is how you do it:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;&lt;html&gt;&lt;br /&gt;&lt;head&gt;&lt;br /&gt;&lt;/head&gt;&lt;br /&gt;&lt;body&gt;&lt;br /&gt;&lt;span style="font-size: 20px;"&gt;&amp;bull;a&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 25px;"&gt;&amp;bull;b&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 30px;"&gt;&amp;bull;c&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 35px;"&gt;&amp;bull;d&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/body&gt;&lt;br /&gt;&lt;/html&gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;For more tips on HTML, CSS, and most Web technologies &lt;a href="http://www.expertsrt.com"&gt; visit me at ERT&lt;/a&gt;</description>
      <pubDate>Wed, 09 May 2007 00:00:16 GMT</pubDate>
      <guid>http://snippets.dzone.com/posts/show/3969</guid>
      <author>COBOLdinosaur (Roy Marchand)</author>
    </item>
    <item>
      <title>Making Columns Render with Equal Height</title>
      <link>http://snippets.dzone.com/posts/show/3791</link>
      <description>A problem sometimes faced by web developers is trying to get two (or more) columns in a multi-column layout to be the same height when the content is variable.  Rather than using an arbitrary hardcoded value, the heights can be equalized (to the tallest one) with this script.&lt;br /&gt;&lt;br /&gt;Assuming two columns in div tags with ids of "leftside" and "rightside" this script will set the height of the shorter to the height of the taller one.  The page must be in standards compliant mode with a valid doctype or IE will mess it up in quirks mode.  For longer articles and discussion &lt;a href="http://www.expertsrt.com"&gt; visit my home site... ERT&lt;/a&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;&lt;script type="text/javascript"&gt;&lt;br /&gt;function setH()&lt;br /&gt;{&lt;br /&gt;   var maxH = Math.max(document.getElementById('leftside').offsetHeight,document.getElementById('rightside').offsetHeight);&lt;br /&gt;   document.getElementById('leftside').style.height=maxH+'px';&lt;br /&gt;   document.getElementById('rightside').style.height=maxH+'px';&lt;br /&gt;}&lt;br /&gt;onload=setH;&lt;br /&gt;&lt;/script&gt;&lt;br /&gt;&lt;/code&gt;</description>
      <pubDate>Tue, 10 Apr 2007 01:46:39 GMT</pubDate>
      <guid>http://snippets.dzone.com/posts/show/3791</guid>
      <author>COBOLdinosaur (Roy Marchand)</author>
    </item>
    <item>
      <title>Detecting Mouse Position</title>
      <link>http://snippets.dzone.com/posts/show/3764</link>
      <description>This is an easy way to determine the mouse position (click anywhere and the co-ordinates get displayed:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"&gt; &lt;br /&gt;&lt;head&gt;&lt;br /&gt;   &lt;title&gt;Mouse co-ordinates&lt;/title&gt;&lt;br /&gt;   &lt;style type="text/CSS"&gt;&lt;br /&gt;      .holder {background-color:lightyellow;color:blue;width:40}&lt;br /&gt;   &lt;/style&gt;&lt;br /&gt;&lt;script type="text/javascript"&gt;&lt;br /&gt;function showit()&lt;br /&gt;{&lt;br /&gt;   document.forms['theform'].xcoord.value=event.x;&lt;br /&gt;   document.getElementById('spanx').innerHTML='x='+event.x;&lt;br /&gt;   document.forms.theform.ycoord.value=event.y;&lt;br /&gt;   document.getElementById('spany').innerHTML='y='+event.y;&lt;br /&gt;}&lt;br /&gt;function showitMOZ(e)&lt;br /&gt;{&lt;br /&gt;   document.forms['theform'].xcoord.value=e.pageX;&lt;br /&gt;   document.getElementById('spanx').innerHTML='x='+e.pageX;&lt;br /&gt;   document.getElementById('spany').innerHTML='y='+e.pageY;&lt;br /&gt;   document.forms.theform.ycoord.value=e.pageY;&lt;br /&gt;}&lt;br /&gt;if (!document.all){&lt;br /&gt;window.captureEvents(Event.CLICK);&lt;br /&gt;window.onclick=showitMOZ;&lt;br /&gt;}&lt;br /&gt;else&lt;br /&gt;{&lt;br /&gt;document.onclick=showit;&lt;br /&gt;}&lt;br /&gt;&lt;/script&gt;&lt;br /&gt;&lt;/head&gt;&lt;br /&gt;&lt;body&gt;&lt;br /&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br /&gt;&lt;h1&gt;You can store them in form fields&lt;/h1&gt;&lt;br /&gt;&lt;form name="theform"&gt;&lt;br /&gt;x = &lt;input name="xcoord" style="width:40"&gt; &lt;br /&gt;y = &lt;input name="ycoord" style="width:40"&gt;&lt;br /&gt;&lt;/form&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;h1&gt; or as plain text&lt;/h1&gt;&lt;br /&gt;&lt;span id="spanx"&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span id="spany"&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;/body&gt;&lt;br /&gt;&lt;/html&gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Of course knowing the co-ordinates also makes it possible to position elements based on the position of the mouse pointer.  It will work for any mouse event Mouseover, mouseout, etc; just change click to the desired event in the final if statement of the script. More good stuff and articles at &lt;a href="http://www.expertsrt.com"&gt; the home of real IT Mentors&lt;/a&gt;</description>
      <pubDate>Thu, 05 Apr 2007 02:36:06 GMT</pubDate>
      <guid>http://snippets.dzone.com/posts/show/3764</guid>
      <author>COBOLdinosaur (Roy Marchand)</author>
    </item>
    <item>
      <title>Dynamic Modification of CSS Class Properties</title>
      <link>http://snippets.dzone.com/posts/show/3737</link>
      <description>Modifying the rendering of an element with an ID is relatively easy using document.getElementById.  Modifying the attributes fo an entire class dynamically is a little more code, but the DOM does provide the means to do it through the stylesheet object; with some cross-browser variations.  &lt;br /&gt;&lt;br /&gt;For additional CSS and HTML see some of the full length articles&lt;br /&gt;&lt;a href="http://www.expertsrt.com/"&gt; Written by IT professionals&lt;/a&gt; from Experts Round Table&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"&gt; &lt;br /&gt;&lt;head&gt;&lt;br /&gt;&lt;title&gt; Fragment&lt;/title&gt;&lt;br /&gt;&lt;style type="text/css"&gt;&lt;br /&gt;A.topLinks {font-weight:bold}&lt;br /&gt;.Borders {font-weight:bold}&lt;br /&gt;&lt;/style&gt;&lt;br /&gt;&lt;script type="text/javascript"&gt;&lt;br /&gt;function modRule()&lt;br /&gt;{&lt;br /&gt;	if (!document.styleSheets) return;&lt;br /&gt;	var thecss = new Array();&lt;br /&gt;	if (document.styleSheets[0].cssRules)  // Standards Compliant&lt;br /&gt;        {&lt;br /&gt;	   thecss = document.styleSheets[0].cssRules;&lt;br /&gt;        }&lt;br /&gt;	else&lt;br /&gt;        {         &lt;br /&gt;           thecss = document.styleSheets[0].rules;  // IE &lt;br /&gt;        }&lt;br /&gt;        for (i=0;i&lt;thecss.length;i++)&lt;br /&gt;        {&lt;br /&gt;           if ((thecss[i].selectorText.toLowerCase()=='a.toplinks') || (thecss[i].selectorText.toLowerCase()=='.borders'))&lt;br /&gt;           {&lt;br /&gt;	     thecss[i].style.cssText="font-weight:normal; color:red";&lt;br /&gt;           }&lt;br /&gt;        }&lt;br /&gt;}&lt;br /&gt;&lt;/script&gt;&lt;br /&gt;&lt;/head&gt;&lt;br /&gt;&lt;body&gt;&lt;br /&gt;&lt;a href="#" class="topLinks" onclick="modRule();return false;"&gt;click here&lt;/a&gt;&lt;br /&gt;&lt;div class="Borders"&gt; hello world. &lt;span style="color:blue"&gt;All of your bases are belong to us.&lt;/span&gt; &lt;/div&gt;&lt;br /&gt;&lt;/body&gt;&lt;br /&gt;&lt;/html&gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Notice that the color of the text in the span is not changed, because the inline style prevails over the class in the stylesheet. This technique can be used to make on the fly changes to the look and feel of a page in response to events or user input.</description>
      <pubDate>Wed, 28 Mar 2007 01:49:01 GMT</pubDate>
      <guid>http://snippets.dzone.com/posts/show/3737</guid>
      <author>COBOLdinosaur (Roy Marchand)</author>
    </item>
    <item>
      <title>Setting Element Height Dynamically</title>
      <link>http://snippets.dzone.com/posts/show/3733</link>
      <description>There are times when you need to control the height of an element based on the screen size. However youcan control the user setup, and of course there are browser differences so this snippet handles browser and object detection and sets the height during page load and for any re-sizing event.  &lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.expertsrt.com/scripts/Cd/dynamic_hgt_div.html"&gt; An example of the snippet in action&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;  var minorOffset = (document.all)? 25 : 38;&lt;br /&gt;   function setHgt()&lt;br /&gt;   {&lt;br /&gt;      var sHGT;&lt;br /&gt;      srcobj=document.getElementById('main');&lt;br /&gt;      if (self.innerHeight)&lt;br /&gt;      {&lt;br /&gt;	   sHGT = self.innerHeight;&lt;br /&gt;	}&lt;br /&gt;      else&lt;br /&gt;      { &lt;br /&gt;         if (document.documentElement &amp;&amp; document.documentElement.clientHeight)&lt;br /&gt;         {&lt;br /&gt;	      sHGT = document.documentElement.clientHeight;&lt;br /&gt;         }&lt;br /&gt;         else&lt;br /&gt;         {&lt;br /&gt;            if (document.body)&lt;br /&gt;            {&lt;br /&gt;              sHGT = document.body.clientHeight;&lt;br /&gt;            }&lt;br /&gt;         }&lt;br /&gt;      }&lt;br /&gt;      sHGT=sHGT-(document.getElementById('main').offsetTop+minorOffset);&lt;br /&gt;  document.getElementById('main').style.height=sHGT+"px";&lt;br /&gt;   }&lt;br /&gt;window.onload=setHgt;&lt;br /&gt;window.onresize=setHgt;&lt;br /&gt;&lt;/code&gt;</description>
      <pubDate>Mon, 26 Mar 2007 11:58:49 GMT</pubDate>
      <guid>http://snippets.dzone.com/posts/show/3733</guid>
      <author>COBOLdinosaur (Roy Marchand)</author>
    </item>
    <item>
      <title>Typed Tooltip Effect</title>
      <link>http://snippets.dzone.com/posts/show/3706</link>
      <description>This simple bit of scripting will create a dynamic typing effect for your tool tips.&lt;br /&gt;The script can be &lt;a href="http://www.expertsrt.com/scripts/Cd/typed_tooltip.html"&gt;&lt;br /&gt;seen implemented here&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;var str='';&lt;br /&gt;var obj='false';&lt;br /&gt;var pntr='';&lt;br /&gt;var cnt=0;&lt;br /&gt;var textArr = new Array(5);&lt;br /&gt;textArr[0] = "All your bases are belong to us!";&lt;br /&gt;textArr[1] = "The answer is 42; of course.";&lt;br /&gt;textArr[2] = "The end of the universe will be the result of a mis-calculation in the core.";&lt;br /&gt;textArr[3] = "I don't believe its alive; but it thinks it is.";&lt;br /&gt;textArr[4] = "About 10 seconds after you open it; you'll wish you hadn't";&lt;br /&gt;&lt;br /&gt;function looptext()&lt;br /&gt;{&lt;br /&gt;   obj.innerHTML=str.substr(0,cnt);&lt;br /&gt;   cnt++;&lt;br /&gt;   if (cnt&lt;=str.length) setTimeout('looptext()',100);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;function typeText(lnk,lyr)&lt;br /&gt;{&lt;br /&gt;   str=textArr[lyr];&lt;br /&gt;   pntr= 'lyr'+lyr;&lt;br /&gt;   obj=document.getElementById(pntr);&lt;br /&gt;   obj.style.left=(lnk.offsetLeft+30)+'px';&lt;br /&gt;   obj.style.top=(lnk.offsetTop+25)+'px';&lt;br /&gt;   obj.style.display='block';&lt;br /&gt;   cnt=1;&lt;br /&gt;   looptext();&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;function clearText(lyr)&lt;br /&gt;{&lt;br /&gt;   cnt=2500;&lt;br /&gt;   pntr='lyr'+lyr;&lt;br /&gt;   obj=document.getElementById(pntr);&lt;br /&gt;   obj.style.display='none';&lt;br /&gt;   obj.style.left='-50px';&lt;br /&gt;   obj.style.top='-50px';&lt;br /&gt;   obj.innerHTML='&amp;nbsp;';&lt;br /&gt;}&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;The links using the effect are done this way:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;   &lt;a href="javascript:alert('no page linked')"&lt;br /&gt;      onmouseover="typeText(this,2)"&lt;br /&gt;      onmouseout="clearText(2)"&lt;br /&gt;      onclick="clearText(2)"&gt; &lt;br /&gt;   This is link Three&lt;br /&gt;   &lt;/a&gt;&lt;br /&gt;&lt;/code&gt;</description>
      <pubDate>Tue, 20 Mar 2007 11:31:22 GMT</pubDate>
      <guid>http://snippets.dzone.com/posts/show/3706</guid>
      <author>COBOLdinosaur (Roy Marchand)</author>
    </item>
    <item>
      <title>Expand and collapse effect for data grids</title>
      <link>http://snippets.dzone.com/posts/show/3667</link>
      <description>This is a little use of dynamic CSS to create expandable, and collapsible sections in data grid presentations.&lt;br /&gt;Cd&amp;&lt;br /&gt;&lt;a href="http://www.expertsrt.com"&gt; Experts Round Table&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"&gt; &lt;br /&gt;&lt;html&gt;&lt;br /&gt;&lt;head&gt;&lt;br /&gt;&lt;style type="text/CSS"&gt;&lt;br /&gt;   table {&lt;br /&gt;          width:100%; &lt;br /&gt;          border-collapse:collapse;&lt;br /&gt;          border:2px solid silver;&lt;br /&gt;         }&lt;br /&gt;   tbody {&lt;br /&gt;          display:block&lt;br /&gt;         }&lt;br /&gt;   th {&lt;br /&gt;       font-weight:normal;&lt;br /&gt;       text-align:left;&lt;br /&gt;      }&lt;br /&gt;   td {&lt;br /&gt;       text-align:center;&lt;br /&gt;       padding:8px;&lt;br /&gt;       border:1px solid silver; }&lt;br /&gt;   .linkspan {&lt;br /&gt;              color:gold;&lt;br /&gt;              background-color:blue;&lt;br /&gt;              font-weight:bold;&lt;br /&gt;              text-decoration:none;&lt;br /&gt;              padding:0 2px; &lt;br /&gt;              font-size:1.2em;&lt;br /&gt;              margin:right:3px;&lt;br /&gt;             }&lt;br /&gt;   .vis {&lt;br /&gt;         display:block;&lt;br /&gt;        }&lt;br /&gt;&lt;/style&gt; &lt;br /&gt;&lt;br /&gt;&lt;script type="text/javascript"&gt; &lt;br /&gt;   var ELpntr=false;&lt;br /&gt;   function hideall()&lt;br /&gt;   {&lt;br /&gt;      locl = document.getElementsByTagName('tbody');&lt;br /&gt;      for (i=0;i&lt;locl.length;i++)&lt;br /&gt;      {&lt;br /&gt;         locl[i].style.display='none';&lt;br /&gt;      }&lt;br /&gt;   }&lt;br /&gt;&lt;br /&gt;   function showHide(EL,PM)&lt;br /&gt;   {&lt;br /&gt;      ELpntr=document.getElementById(EL);&lt;br /&gt;      if (ELpntr.style.display=='none')&lt;br /&gt;      {&lt;br /&gt;         document.getElementById(PM).innerHTML=' - ';&lt;br /&gt;         ELpntr.style.display='block';&lt;br /&gt;      }&lt;br /&gt;      else&lt;br /&gt;      {&lt;br /&gt;         document.getElementById(PM).innerHTML=' + ';&lt;br /&gt;         ELpntr.style.display='none';&lt;br /&gt;      }&lt;br /&gt;   }&lt;br /&gt;   onload=hideall;&lt;br /&gt;&lt;/script&gt;&lt;br /&gt;&lt;/head&gt; &lt;br /&gt;&lt;body&gt; &lt;br /&gt;&lt;table&gt;&lt;br /&gt;   &lt;thead&gt;&lt;br /&gt;   &lt;tr class="vis"&gt; &lt;th colspan="3"&gt;&lt;a href="#" &lt;br /&gt;      onclick="showHide('fruit','fruitspan')"&gt;&lt;br /&gt;        &lt;span id="fruitspan" class="linkspan"&gt; + &lt;/span&gt; Fruit:&lt;/a&gt;&lt;/th&gt;&lt;/tr&gt;&lt;br /&gt;   &lt;/thead&gt; &lt;br /&gt;   &lt;tbody id="fruit"&gt;&lt;br /&gt;      &lt;tr&gt; &lt;td&gt; Apple&lt;/td&gt;&lt;td&gt; Red&lt;/td&gt;&lt;td&gt; Shiny&lt;/td&gt;&lt;/tr&gt;&lt;br /&gt;      &lt;tr&gt; &lt;td&gt; Pear&lt;/td&gt;&lt;td&gt; Green&lt;/td&gt;&lt;td&gt; Firm&lt;/td&gt;&lt;/tr&gt;&lt;br /&gt;      &lt;tr&gt; &lt;td&gt; Banana&lt;/td&gt;&lt;td&gt; Red&lt;/td&gt;&lt;td&gt; Shiny&lt;/td&gt;&lt;/tr&gt;&lt;br /&gt;   &lt;/tbody&gt;&lt;br /&gt;&lt;/table&gt;&lt;br /&gt;&lt;table&gt;&lt;br /&gt;   &lt;thead&gt;&lt;br /&gt;   &lt;tr class="vis"&gt; &lt;th colspan="3"&gt;&lt;a href="#" onclick="showHide('vegtable','vegtablespan')"&gt;&lt;br /&gt;        &lt;span id="vegtablespan" class="linkspan"&gt; + &lt;/span&gt; Vegtable:&lt;/a&gt;&lt;/th&gt;&lt;/tr&gt; &lt;br /&gt;   &lt;/thead&gt;&lt;br /&gt;   &lt;tbody id="vegtable"&gt;&lt;br /&gt;      &lt;tr&gt; &lt;td&gt; Carrot&lt;/td&gt;&lt;td&gt; Orange&lt;/td&gt;&lt;td&gt; Crisp&lt;/td&gt;&lt;/tr&gt;&lt;br /&gt;      &lt;tr&gt; &lt;td&gt; Cucumber&lt;/td&gt;&lt;td&gt; Green&lt;/td&gt;&lt;td&gt; Delicious&lt;/td&gt;&lt;/tr&gt;&lt;br /&gt;      &lt;tr&gt; &lt;td&gt; Cauliflower&lt;/td&gt;&lt;td&gt; White&lt;/td&gt;&lt;td&gt; Firm&lt;/td&gt;&lt;/tr&gt;&lt;br /&gt;   &lt;/tbody&gt;&lt;br /&gt;&lt;/table&gt;&lt;br /&gt;&lt;table&gt;&lt;br /&gt;   &lt;thead&gt;&lt;br /&gt;   &lt;tr class="vis"&gt; &lt;th colspan="3"&gt;&lt;a href="#" onclick="showHide('animal','animalspan')"&gt;&lt;br /&gt;        &lt;span id="animalspan" class="linkspan"&gt; + &lt;/span&gt; Animal:&lt;/a&gt;&lt;/th&gt;&lt;/tr&gt;&lt;br /&gt;   &lt;/thead&gt; &lt;br /&gt;   &lt;tbody id="animal"&gt;&lt;br /&gt;      &lt;tr&gt; &lt;td&gt; Cat&lt;/td&gt;&lt;td&gt; Calico&lt;/td&gt;&lt;td&gt; Lazy&lt;/td&gt;&lt;/tr&gt;&lt;br /&gt;      &lt;tr&gt; &lt;td&gt; Dog&lt;/td&gt;&lt;td&gt; Retriever&lt;/td&gt;&lt;td&gt; Golden&lt;/td&gt;&lt;/tr&gt;&lt;br /&gt;      &lt;tr&gt; &lt;td&gt; Badger&lt;/td&gt;&lt;td&gt; Muddy&lt;/td&gt;&lt;td&gt; Mean&lt;/td&gt;&lt;/tr&gt;&lt;br /&gt;   &lt;/tbody&gt;&lt;br /&gt;&lt;/table&gt; &lt;br /&gt;&lt;/body&gt; &lt;br /&gt;&lt;/html&gt; &lt;br /&gt;&lt;/code&gt;</description>
      <pubDate>Wed, 14 Mar 2007 01:14:32 GMT</pubDate>
      <guid>http://snippets.dzone.com/posts/show/3667</guid>
      <author>COBOLdinosaur (Roy Marchand)</author>
    </item>
    <item>
      <title>Passing parameters between pages without servers side scripting</title>
      <link>http://snippets.dzone.com/posts/show/3609</link>
      <description>// description of your code here&lt;br /&gt;Sometimes you need to pass parameters directly between pages for dynamic effect. This is the way to process those on the receiving page.  The arguments can be added directly onto the url or a form with a get method caa be used.  As long as the server just passs the request through the receiving page can use the parameters to present alternate presentations, pre-populate form eleemnts, or just carry through the values for a multi-page form.&lt;br /&gt;&lt;br /&gt;Cd&amp;&lt;br /&gt;&lt;a href="http://www.expertsrt.com"&gt; Experts Round Table &lt;/a&gt;&lt;br /&gt; &lt;br /&gt;&lt;code&gt;&lt;br /&gt;&lt;html&gt; &lt;br /&gt;&lt;head&gt; &lt;br /&gt;&lt;script type="text/javascript"&gt; &lt;br /&gt;   parmarr = new Array;&lt;br /&gt;   valuearr = new Array;&lt;br /&gt;   function readparms()&lt;br /&gt;   {&lt;br /&gt;      if(location.search!='')&lt;br /&gt;      { &lt;br /&gt;         Args = location.search.substring(1); &lt;br /&gt;         parmarr = Args.split('&amp;');&lt;br /&gt;         for(i=0;i&lt;parmarr.length;i++)&lt;br /&gt;         {&lt;br /&gt;            valuearr[i] = parmarr[i].split('='); &lt;br /&gt;         }&lt;br /&gt;      } &lt;br /&gt;   }&lt;br /&gt;&lt;/script&gt; &lt;br /&gt;&lt;/head&gt; &lt;br /&gt;&lt;body onLoad="readparms();showparms();"&gt; &lt;br /&gt;&lt;script type="text/javascript"&gt;&lt;br /&gt;   // all this script does is display the parms but the&lt;br /&gt;   // stored values can be used by any function&lt;br /&gt;   function showparms()&lt;br /&gt;   { &lt;br /&gt;      if(location.search!='')&lt;br /&gt;      { &lt;br /&gt;         for(i=0;i&lt;valuearr.length;i++)&lt;br /&gt;         {&lt;br /&gt;            document.write(valuearr[i][0] +'=' +valuearr[i][1] +'&lt;br&gt;'); &lt;br /&gt;         }&lt;br /&gt;      } &lt;br /&gt;   } &lt;br /&gt;&lt;/script&gt;  &lt;br /&gt;&lt;/body&gt; &lt;br /&gt;&lt;/html&gt;&lt;br /&gt;&lt;/code&gt;</description>
      <pubDate>Thu, 01 Mar 2007 13:05:35 GMT</pubDate>
      <guid>http://snippets.dzone.com/posts/show/3609</guid>
      <author>COBOLdinosaur (Roy Marchand)</author>
    </item>
    <item>
      <title>Add Rows to an HTML table Dynamically</title>
      <link>http://snippets.dzone.com/posts/show/3558</link>
      <description>// description of your code here&lt;br /&gt;This script modifies an existing table in a page using&lt;br /&gt;the DOM methods to add rows&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"&gt; &lt;html&gt;&lt;br /&gt;&lt;head&gt;&lt;br /&gt;&lt;script type="text/javascript"&gt;&lt;br /&gt;function addRow(content,morecontent)&lt;br /&gt;{&lt;br /&gt;         if (!document.getElementsByTagName) return;&lt;br /&gt;         tabBody=document.getElementsByTagName("TBODY").item(0);&lt;br /&gt;         row=document.createElement("TR");&lt;br /&gt;         cell1 = document.createElement("TD");&lt;br /&gt;         cell2 = document.createElement("TD");&lt;br /&gt;         textnode1=document.createTextNode(content);&lt;br /&gt;         textnode2=document.createTextNode(morecontent);&lt;br /&gt;         cell1.appendChild(textnode1);&lt;br /&gt;         cell2.appendChild(textnode2);&lt;br /&gt;         row.appendChild(cell1);&lt;br /&gt;         row.appendChild(cell2);&lt;br /&gt;         tabBody.appendChild(row);&lt;br /&gt;       &lt;br /&gt;   &lt;br /&gt;}&lt;br /&gt;&lt;/script&gt;&lt;br /&gt;&lt;/head&gt;&lt;br /&gt;&lt;body&gt;&lt;br /&gt;&lt;table border='1' id='mytable'&gt;&lt;br /&gt;&lt;tbody&gt;&lt;br /&gt;&lt;tr&gt;&lt;td&gt;22&lt;/td&gt;&lt;td&gt;333&lt;/td&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;td&gt;22&lt;/td&gt;&lt;td&gt;333&lt;/td&gt;&lt;/tr&gt;&lt;br /&gt;&lt;/tbody&gt;&lt;br /&gt;&lt;/table&gt;&lt;br /&gt;&lt;button onClick='addRow("123","456");return false;'&gt;&lt;br /&gt;Add Row&lt;/button&gt;&lt;br /&gt;&lt;/body&gt;&lt;br /&gt;&lt;/html&gt;&lt;br /&gt;&lt;/code&gt;</description>
      <pubDate>Wed, 21 Feb 2007 13:02:17 GMT</pubDate>
      <guid>http://snippets.dzone.com/posts/show/3558</guid>
      <author>COBOLdinosaur (Roy Marchand)</author>
    </item>
    <item>
      <title>Javascript to put a hotkey on a Web Page</title>
      <link>http://snippets.dzone.com/posts/show/3552</link>
      <description>// description of your code here&lt;br /&gt;This page will fire an event when the key specified in the&lt;br /&gt;variable key1 is pressed. &lt;br /&gt;&lt;br /&gt;Cd&amp; &lt;br /&gt;http://www.expertsrt.com&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;var key1="32";&lt;br /&gt;var x='';&lt;br /&gt;function handler(e) &lt;br /&gt;{&lt;br /&gt;  if (document.all) {&lt;br /&gt;  var evnt = window.event; &lt;br /&gt;  x=evnt.keyCode;&lt;br /&gt;}&lt;br /&gt;else&lt;br /&gt;x=e.charCode;&lt;br /&gt;if (x==key1) location.href='http://www.expertsrt.com';&lt;br /&gt;}&lt;br /&gt;if (!document.all){&lt;br /&gt;window.captureEvents(Event.KEYPRESS);&lt;br /&gt;window.onkeypress=handler;&lt;br /&gt;}&lt;br /&gt;else&lt;br /&gt;{&lt;br /&gt;document.onkeypress = handler;&lt;br /&gt;} &lt;br /&gt;&lt;/code&gt;</description>
      <pubDate>Tue, 20 Feb 2007 12:53:56 GMT</pubDate>
      <guid>http://snippets.dzone.com/posts/show/3552</guid>
      <author>COBOLdinosaur (Roy Marchand)</author>
    </item>
  </channel>
</rss>
