Table of contents problem (iframe linking) fixed

November 11, 2008

Yesterday I was able to fix the Javascript code that prevented the left-side table of contents from working properly in the Safari and Google Chrome browsers. I tweaked a solution suggested in an online comment (#7) by “inimino” at Targeting an anchor within iFrame; his(?) original code is in the source of this page.

function scrollToFrag(frag){
// Called by clicking on a link in the left-side table of contents in the main page.
// The argument ‘frag’ is the element identifier of a paragraph in the agreement draft,
// which is located is is in an iframe (’ContentFrame’) on the right of the main page.

  objTemp=top.frames["ContentFrame"].document.getElementById(frag);
  objTemp.style.display=’block’;
  tmp = getPos(objTemp);
    // getPos is a routine that determines where in the document
    // the ‘frag’ paragraph is located
  top.frames["ContentFrame"].scrollTo(0,tmp);
    // I had to prepend the ‘top.frames["ContentFrame"].’ part
    // to make it work in Safari and Google Chrome.
    // The original code is more succinct; I expanded it
    // for debugging purposes.
}

function getPos(e) {
  var y=0;
  do{
    var yd = e['offsetTop'];
    y += isNaN(yd)?0:yd;
    e = e.offsetParent;
    } while (e && e!=document.body);
  return y;
  }

Radio button problem solved

August 1, 2008

Late last night I noticed that the radio buttons in my clauses weren’t working. Uh oh; what’d I do?

Fortunately I’m using the Firebug add-on debugger with my Firefox browser. That let me track the problem down fairly quickly: A week ago I’d commented out what I thought was dead code, but it wasn’t - its absence was what broke the radio buttons. I uncommented the code, and things work fine.

Instruction page now has screen shots

July 5, 2008

Pure-text help pages are pretty boring. So this evening I used Wink, an open-source screencasting program, to capture a quick series of screen shots.  Still in Wink, I added some call-outs and circled highlights. Then I used the Wink “Export” feature to save the project as an HTML with JPG images. 

Finally, I added the images to the Instructions page. You can see it via the menu near the top of this page.  The screen shots make for a much nicer help page than just plain text.

I plan to do a video demo too. I won’t be using Wink, because its audio codec is awful. The narration sounds great in Wink, but then when rendered into a complete Flash file it sounds terrible.  I’ve been playing with Camtasia, which seems to be the leading package, albeit a bit pricey.

Zemanta Pixie

Not a substitute for legal advice

Copyright © 2008 D. C. Toedt III

All rights reserved.