Javascript


conditions
July 28, 2007: 2:03 pmnews: LokkjuJavascript, Projects

I wrote a couple of quick jQuery plugins over the last few days.

First is jqFrag, an implementation of the fragment uri scheme that allows jumping to a specific instance of word in a document, by using uri://site/page?query#@ syntax. Example and code:
http://projects.lokkju.com/jquery/jqfrag/index.html#@rutrum

Second is jqProps, a var_dump/Dumper implemtation for javascript – essentially, it will let you see all the properties (fields, methods, etc) of anything you pass it. Code at:
http://projects.lokkju.com/jquery/jqdumper/jquery.dumper.js

Comments welcome

language
June 22, 2007: 3:30 pmaddress: LokkjuJavascript, Projects

Changes:
– broke configuration out to config.php
– included the ability to log errors
– added TXT records
– added CNAME records
– forced all zones to lower case
– forced all types to upper case
– changed serial format
– zone list refreshes when new zone is added
thanks to Valery Duchev for some patches

Demo:
http://www.lokkju.com/projects/dnsEditor2/dnsEditor.php

Source:
https://svn.lokkju.com/svn/dnsEditor/trunk

July 6, 2006: 11:03 pm: LokkjuJavascript, Projects, Widgets

Screenshot

This is a very alpha release of a new widget I have been trying to get out for a while now.

Download Link: myBalance_0.01_Alpha.wdgt.zip

This widget will periodically check a bank account you have configured it for, and display the current balance. In this release, only US Bank is supported, however the code for Washington Mutual and for Wells Fargo is complete, just not included. You can configure the title of the widget, to reflect the account, and if you have multiple accounts, you specify the last 4 numbers of the account you want to monitor. The background changes color based on the amount in your account *grin*.

All communications are done directly with the banks, through HTTPS in javascript – none of your information ever goes anywhere else.

Issues that will be resolved in future releases:

  • More banks
  • Better error handling
  • Some sort of automatic update feature
  • Storage of access credentials within Keychain

Have fun!

As a side note, part of the reason for my lack of updates lately is that my development speed has been drastically hindered – my only Mac decided to bust both hinges (Powerbook Titanium 550Mhz) – so I am having to develop with it plugged into an external keyboard, mouse, and monitor – not the most conducive to relaxing and programming… but the new GMaps WILL be coming.

report
May 30, 2006: 3:40 pm: LokkjuJavascript, Projects

The source code for the dnsEditor:Ajaxified is now available. you can get it anonymously at:

https://svn.lokkju.com/svn/dnsEditor/trunk

Yes, it is ugly, but it *does* work.
All of the code is released under GPL, and other licenses are open to negotiation.
I will be commenting more code and cleaning it up as time goes by, and patches are always welcome – if you really want to help, I can also give you subversion access.

And donations are always welcome as well (see that little button on the side? it is there for a purpose…) *grin*.

Have fun…

advertise
conditions
April 28, 2006: 2:34 pmnews: LokkjuGoogle Maps, Javascript, Projects, Widgets

Just a quick note, I have started back in on the gmaps widget, using the GMap2 structure, and basing it on the API code to prevent future breakage.

Hopefully it should be released in a couple weeks!

language
February 8, 2006: 8:13 pmaddress: LokkjuJavascript, Projects

UPDATE:Source is now available!

So I finally found some more time to work on the dnsEditor interface – and I think I’ve done most of what was needed for now.
Demo: http://www.lokkju.com/projects/dnsEditor2/dnsEditor.php

Screenshot:
dnsEditor2: Ajaxified

Fixes/Additions:

  • Replaced all the +/- links to add/delete items with image buttons
  • Implemented Add/Delete Zones
  • Added a Refresh Zone List button
  • Added a hover tip box
  • Implemented multi-server update (through mysql) of modified records. (disabled in demo)
  • Automatically update the SOA serial with epoch time on changes

Still to possibly do:

  • Add TXT (and perhaps CNAME) abilities, this is actually very quick to do.
  • Add SPF generator to TXT records editor.
  • Add as you edit help – for instance, describe what the rules are for the feild you are currently in.
  • Add a verification function, to verify either a specific zone, or all zones in your DB, and generate a report (similar to dnsreports.com).
  • Add authentication, on a per zone, and possibly fine grained control of which records in a zone are allowed to be updated. Would most likely require seperate permissions table.
  • Add a database abstration layer for both different RDBMS and different table layout – I would love some suggestions on this. (MAJOR)

More suggestions are always welcome.

Original Post Here

January 10, 2006: 2:21 pm: LokkjuJavascript, Projects

Bind-DLZ (Dynamically Loadable Zones) is a patch for BIND version 9 that simplifies BIND administration and reduces memory usage and startup time. DLZ allows you to store your zone data in a database. Unlike using scripts, the changes in your database are immediately reflected in BIND’s response to DNS queries, so there is no need to reload or restart BIND. You see, BIND “dynamically loads” the “zone” data it needs to answer a query from the database.

Though DLZ is the best thing to happen to DNS (and Bind specifically), it has one major flaw – there is no suitable front end for managing the database that DLZ uses.

Over the past few weeks I have been working on a front end for DLZ, and I think I finally have a decent one. Please note, this is a beta, and demo, only, and the code is for you to look at, not to use, as I am not sure on my licensing yet for this.

At any rate, here is a link to the demo:
http://www.lokkju.com/projects/dnsEditor/SampleEditInterface.php

It currently edits against a mysql database of sample data, which has the exact same table structure as the version I use for production (live) editing of our DNS records.

The two things that currently do not work right are adding and deleting actual domain names (only because I have not figured out the method I want to use, in terms of the GUI), and the SOA record layout is a little funky.

report
January 5, 2006: 10:11 pm: LokkjuGoogle Maps, Javascript, Projects

About 6 months ago, when the Google Maps API first came out, I did some major work with it, both in providing functions to make it run better, and in extending it. Based on the idea by David Schuetz’s TerraServer functionality for the old style of Google Maps hacking, I wrote a simple library to enable TerraServer maps through the Google Maps API (you can still get it here). I released it through the newsgroups, and then prompty forgot about it.

Well, today I was looking into some more Google Maps stuff (I use it on and off in many of my projects), and I found that there are quite a few sites out there using my library. Needless to say, I was pleasantly suprised. The two best are below:

AccuTracking – http://www.accutracking.com/
Weather Quality Reporter – http://weather.gladstonefamily.net/site/C0506

advertise
conditions
: 2:18 pmnews: LokkjuJavascript, Projects

Demo:

Filter:
States
Alabama
Alaska
Arizona
Arkansas
California
Colorado
Connecticut
Delaware
Florida
Georgia
Hawaii
Idaho
Illinois
Indiana
Iowa
Kansas
Kentucky
Louisiana
Maine
Maryland
Massachusetts
Michigan
Minnesota
Mississippi
Missouri
Montana
Nebraska
Nevada
New Hampshire
New Jersey
New Mexico
New York
North Carolina
North Dakota
Ohio
Oklahoma
Oregon
Pennsylvania
Rhode Island
South Carolina
South Dakota
Tennessee
Texas
Utah
Vermont
Virginia
Washington
West Virginia
Wisconsin
Wyoming

So I was working on my DNS Editor back end last night, while using iTunes - and I decided I want the same type of filtered list that iTunes has. About 4 hours later, I came up with this, so here it is. It really only takes two lines of code, and one class statement, to add:

HTML:
  1. <script charset="utf-8" language="javascript" type="text/javascript" />
  2. <input type="text" maxlength="10" size="8" id="filterable_filter" name="filterable_filter" />

then, in your table, just make sure your class name includes "filterable". The input box ID must be the table id plus "_filter". In addition, if you want to make a row that never gets filtered, you can include "nofilter" in the td's class name.

If you want to get the library right now, you cen grab it here. You will find the code for the demo down further.

Right now, I am filtering on the inputbox value being anywhere in each cell's text - however, since I am using a regex, it would be very easy to modify to only match at the start of the string, etc. Here within the next few weeks, I hope to mature this library to the point of have some way of specifying (perhaps based on the class) what type of match you want, as well as specifying which columns in the table you want to match against.

Thanks go to Stuart Langridge, over at Kryogenix, for ideas on handling tables unobtrusively, in his sorttable library (here). In fact, I wrote this library to be compatible with his - so you can have sortable tables, that are also filterable.

Sample code after the break

(more...)

language
Make payments with PayPal - it's fast, free and secure!