A couple of developments
Hi,
Bruce & Julian have released Taking Notes podcast 42, featuring me, which you can get here! At the end of the podcast (assuming you get that far) Bruce mentions openCOD.org and because he mentioned it I've been working double time to develop the site (at this rate I'll be sleeping all through Lotusphere!) . There's more content to add and more testing needed but since it got so public a mention I had to try and get the basics ready.
openCOD.org, I hope, will try to emulate the spirit of openNTF but for Open Source BlackBerry development. I hugely admire the openNTF team and it's contributors and I owe special thanks to Bruce and Anil, thank you both! I also owe a huge thanks to everyone that contributed to the templates that make the site what it is. When I get time I'll blog a little more about my hopes for openCOD but I hope it will take on a life of it's own and find good people to help run it and contribute to it.
By the way Bill Buchan has registered craicBerry.com for openCOD and that will shortly point to the craicBerry web application so that you'll have an easier url to work with. Which is nice
Thanks Bill!
I found my WDW for Adults book so I can start adding more venue information (I've added a few). I added the first real Official event Jamfest 2007! If anybody has a nice list of Official events they'd like to share do let me know. I'm juggling so many balls at the moment any help would be welcome.
Not sure if I've mentioned it before but the BB app gets it's updates from a Domino page with an embedded view and put together they generate a simple XML document. I've been concerned that the XML could be broken if an event or venue were to be created and any one of these characters were in an editable field: & ' " < >
I'd considered wrapping the fields up with CDATA tags but that would considerably increase the amount of data the BlackBerry would have to download. That's still an option but for now I wrote a little javascript validation routine to try and prevent those characters getting into the database at all:
function doSubmit2() {
var frm = document.forms(0);
var cont = true;
var bLegal = true;
var fields;
var re = new RegExp("\"|'|&|<|>","i");
switch (frm.name.toUpperCase()) {
case "_UEVENT":
case "_VENUE":
var alltags=document.getElementsByTagName("INPUT");
for (i=0; i<alltags.length; i++) {
var match = /evt|ven/i.exec(alltags[i].name);
if(match =="evt" || match == "ven") {
var match2 = re.exec(alltags[i].value);
if (null == match2) {
} else {
fields += " " +alltags[i].name;
bLegal = false;;
}
}
if (alltags[i].className=='requiredField') {
if (trimAll(alltags[i].value)=="") {
cont = false;
}
}
}
var alltags=document.getElementsByTagName("TEXTAREA");
for (i=0; i<alltags.length; i++) {
var match = /evt|ven/i.exec(alltags[i].name);
if(match =="evt" || match == "ven") {
var match2 = re.exec(alltags[i].value);
if (null == match2) {
} else {
fields += " " + alltags[i].name;
bLegal = false;
}
}
if (alltags[i].className=='requiredField') {
if (trimAll(alltags[i].value)=="") {
cont = false;
}
}
}
break;
}
if (bLegal)
{
if (!cont) {
alert ("Please complete all fields marked with a *");
} else {
frm.submit();
}
} else
{
alert("You will need to check " + fields + " for one or more of the following characters and remove them: & ' \" < >");
}
}
Not quite perfect but it seems to work. I'll also create an alternative view to present the XML data for the BB that wraps each field inside a CDATA tag and if necessary I can switch from the standard view to the failsafe one in a few minutes.
OK well I've been up for almost 24 hours now and I'm going to have a little nap. There's a lot going on but I'm glad to be busy, roll on Lotusphere I can't wait ![]()
ttfn


Comments