Kaydoo

A Day in the Life of a Developer

Archive for March, 2008

Multiple Check Checkbox

As I am nearing the end of my initial development phase of BackendPro there’s some useful bits of code I came up with to handle annoying but simple tasks. Over the next week or so I will be releasing a lot more small applications and libraries but felt this may help a few people. Its a small script to check and un-check multiple html check boxes. Its prime use is to save the user time from having to check/un-check many check boxes. It uses jQuery and is only 1/2 lines long.

$("input[name='all']").change(function(){
var parent = $(this);
$("input[name='"+parent.val()+"[]']",parent.parents('form:first')).each(function(){$(this).attr('checked',parent.is(':checked'));});
});

All you need to use it is the following HTML code.

<form>
<input type="checkbox" name="all" value="myitems">
<input type="checkbox" name="myitems[]" value="1">
<input type="checkbox" name="myitems[]" value="2">
<input type="checkbox" name="myitems[]" value="3">
</form>

So when the user clicks on the check box with name all, all check boxes with the name specified in the value attribute of this ‘all‘ check box will be toggled. I hope someone finds it helpful.

Windows XP Error lsaa.exe

Do you get the feeling that Mr Gates hates you and has made Windows so when you most need it, it decides, ‘Well actually today I shall do something totally unexpected expected’, CRASH. Why else would I use it apart from to practice in the art of pulling my hair out and being baffled as to why this has happened to me.

So what went wrong? Well I got a computer in from someone which needed fixing. So I booted it up and got this.

lsaa.exe Security Accounts Manager initialization failed because of the following error: The handle is invalid.
Error status: 0xc000008. Please click OK to shutdown this system and reboot into Safe Mode, check log for more detailed information

If your wondering at the moment why I am writing this, its to try and save you some time if you get stuck in the same situation. In total I spent about 5 hrs trying to sort the problem out. I tried all of the following:

  1. Booting into safe mode to read the log and fix the issue, FAILED due to the same error
  2. Trying to perform a repair installation using the Windows XP Pro CD, FAILED due to the same error
  3. Trying to boot using the XP CD and then use the recovery console, FAILED since the administrator password had been corrupted also
  4. Using a CD bootable version of Windows and restore the system to a previous restore point, including the registry, FAILED
  5. Replace the lsaa.exe file with a new copy, FAILED

So in the end I had to perform a fresh install. I must say this worked fine. So my advice for anyone who gets the same error, don’t expect it to be an easy fix. In the end it probably will end up with you wiping the computer.

I must also point out I know everyone’s situation isn’t likely to be the same as mine, also I did learn something from this. If the PC in question is a Dell and you have the reinstall CD you can do a lovely fresh clean install wiping every partition and don’t need to worry about Product Keys or Activation. Which I have to say before this I didn’t know about, good news then if you buy a Dell but don’t want any of the ‘free’ programs they leave on which are impossible to use.

Anyway good luck to anyone who has the same issue. A very good tool I also picked up along the way which didn’t help so much with this issue but I can see could come in very handy is BartPE. It is a very good application which creates a small version of Windows XP you can boot straight off the CD. It provides network access and other useful administration features to perform actions on the target PC if you cannot get anything out of the local install of Windows.

  • 0 Comments
  • Filed under: Windows
  • BackendPro Alpha Information

    Yes its nearly ready, not long now. BackendPro alpha release should be available for download as soon as I finish off a few last bits. Its been quite a while but I have only been able to work on it about once a week for the past few months, so progress has been slow. It has also undergone many redesigns, trying to make the interface simpler but still very usable. I think I have the final version now, its not my own but it was so good I had to use parts of the original. Many thanks to Steve Smith for the ideas and his Tiger Wordpress theme.

    What is BackendPro?

    BackendPro is a control panel for developers. This means it includes a load of useful things which a developer would fine useful. Its not a CMS, its not built so all the work is done for you but so it can be used to speed up development. It has many features which I feel are lacking from other authentication libraries.

    Features

    • User Authentication using ACL
    • Site preferences (allows you to create your own site preferences and use the built in form creation to update them, instead of using config files)
    • Simple breadcrumb creation
    • Asset library (set default assets, load assets on the fly, server asset caching)
    • PHP to javascript variable conversion
    • Default styles for forms and other useful HTML elements
    • Status messages (create success/info/warning/error messages to display to the user in a pretty form)
    • ReCAPTCHA
    • Language detection

    Over the next weeks ill try to polish off the rest of the control panel and get some documentation written up for it. There’s no point releasing it and no-one knowing how on earth it works. I suppose you could look at it. So that’s it for now, but check back for news on the alpha, ill try and get it out soon.