Windows mobile

May 30th, 2008

This isn’t much of a post, more a test of using my phone to do this as I wonder if I should attempt a little CPR on this blog.

I’ve got some fresh CSS and JavaScript discoveries to share so watch this space.

Busy busy busy…

February 8th, 2006

I was hoping to play around with the checkbox vs. radio button code a bit more but I’ve been temporarily pulled off of that project with v.1b of the project going live and v.2 being put off for 10 days.

Instead I’m back to working on our new HTML editor and making sure that the CSS for the whole site defines everything that can be defined. Otherwise there’s a real risk of conflict with our partners stylesheets.

Bringing the new HTML editor into play is a major step forward towards standards compliance and accessibility as we will finally be able to get rid of the antiquated editor that has been in play for years along with all of the tag-soup that goes with it.

Is it a checkbox or a radio button?

February 6th, 2006

Part of the requirements doc for a subscription form I’ve designed for an internal client at work stated that the form must use checkboxes for a particular function. One of our Java programmers, Satish, who created the whole mail system said that it would be a lot easier for him if we could use radio buttons.

Fortunately I remembered seeing a tutorial some time ago which discussed using images to replace the radio buttons, making it possible for me to make it appear that there were checkboxes on the page, keeping the client happy, and retain the functionality of radio buttons, keeping the programmer happy.

The original code from BrainError was only for changing checkboxes but I also stumbled upon a solution andrew Main had provided that changed radio buttons as well.

I stripped the checkbox part of the code out and created some true/false checkbox images and now everyone is happy :-) Here’s the code if you want to give it a go yourself… It’s not completely accessible in that tabbing through the buttons won’t work, but the form I’m working on uses so much Javascript already that it’s really not the end of the world.

<script language="javascript" type="text/javascript">
/*
THE FOLLOWING CODE HaNDLES THE GRaPHICaL CHaNGES FOR RaDIO BUTTONS
*/
//global variables that can be used by aLL the functions on this page.
var inputs;
var imgRadioFalse = 'images/radio_unchecked.gif';
var imgRadioTrue = 'images/radio_checked.gif';

//this function runs when the page is loaded, put all your other onload stuff in here too.
function init() {
replaceRadios();
}

function replaceRadios() {

//get all the input fields on the page
inputs = document.getElementsByTagName('input');

//cycle trough the input fields
for(var i=0; i < inputs.length; i++) {

//check if the input is a checkbox
if(inputs[i].getattribute('type') == 'radio') {

//create a new image
var img = document.createElement('img');

//check if the checkbox is checked
if(inputs[i].checked) {
if(inputs[i].disabled)
{
img.src = imgRadioTrueDisabled;
} else {
img.src = imgRadioTrue;
}
} else {
if(inputs[i].disabled)
{
img.src = imgRadioFalseDisabled;
} else {
img.src = imgRadioFalse;
}
}

//set image ID and onclick action
img.id = 'radioImage'+inputs[i].id;

//set image click event if button not disabled
if(!inputs[i].disabled) img.onclick = new Function('radioChange('+i+')');
//place image in front of the checkbox
inputs[i].parentNode.insertBefore(img, inputs[i]);

//hide the checkbox
inputs[i].style.display='none';
}
}
}

//change the radio status and the replacement image of checked and all in same group
function radioChange(i) {
var radios=new array();
var tmpradios;

// load all the inputs into tmp array
tmpradios = document.getElementsByTagName('input');

for(var j=0; j < tmpradios.length; j++) {
// add only the radios in this group to the array
if(tmpradios[j].getattribute('name') == inputs[i].getattribute('name'))
{
radios.push(tmpradios[j]);
}
}

if(inputs[i].checked) {
// already checked so do nothing as radio does not uncheck like a checkbox
} else {
// make all other group items unchecked
for(var j=0; j < radios.length; j++) {
document.getElementById
('radioImage'+radios[j].id).src=imgRadioFalse;
document.getElementById
('radioImage'+radios[j].id).checked='';
}
// make the selected item checked
inputs[i].checked = 'checked';
document.getElementById
('radioImage'+inputs[i].id).src = imgRadioTrue;
}
}

window.onload = init;

/*
END OF RaDIO BUTTON CODE
*/
</script>

Tomorrow I’m going to try and add to the code so that it will exclude radio buttons that I don’t want to change as at the moment it does a general sweep of the page and changes every radio button it finds. If you use the code be sure to give each of your radio buttons a unique ID so that the script can differentiate between which image to show when the checked state is changed. also remember to rename the image paths to match those of your own images.

Once again props go to BrainError and anthony Main, the first for coming up with the original checkbox code and the latter for adding radio button functionality.

Pain Injection

February 6th, 2006

I was expecting a nice quiet days work today on my Sunday job, with just one site to be uploaded that I’d already finished last week and two pages needing very minor edits. Of course nothing is ever that simple!

When I called Simon this afternoon, he told me that he’d received 350 spam e-mails today alone, with thousands more since Thursday. It didn’t seem like the strangest thing in the world what with the amount of spammers about these days, until he told me that all of the e-mails were coming from one of our servers. a quick check of one of the e-mail headers confirmed that the e-mails had indeed come from our server.

Had we been hacked? How many other people were now receiving spam that appeared to come from us?

I Googled for a while and found that we’d been the victim of a “Sendmail Injection Exploit.” Basically a spammer uses a site’s contact form URL and adds extra variables that enables them to use a server for sending anonymous spam. I couldn’t find a fix that worked for me so I put up a temporary holding page to keep the spammers at bay before going off to learn some new PHP to help me come up with a solution of my own.

The final result seems to work but I won’t be putting it into production until tomorrow night when I’ll know for sure. The following code is part research, part guess-work and just a smidgen of actual PHP knowledge.

$email = preg_replace("/\r/", "", $email);
$email = preg_replace("/\n/", "", $email);
if (eregi("cc", $email) || eregi("bcc", $email) || eregi("to", $email) || eregi("Content-Type", $email)) die("Sorry, there was a problem with your message being sent. Please click <a href=\"javascript:history.go(-1)\">here</a> to try again");

I would have used a more ‘choice’ message for the spammers when filtering them out but it’s always possible that a legitimate customer could receive the message by mistake. With this being a possibility there’s also the chance that we could block legitimate contacts but I think this is the lesser of two evils here.

If you find yourself a victim of such an attack please feel free to add the above code to your PHP mail() form. Just replace $email with whatever field you use to collect the senders e-mail address.

Stumble

February 4th, 2006

So you stumbled upon my little blog eh?

Well then you’re sure to have noticed that this is very much a WIP and will probably remain to be so for the next month or so as I struggle to find the time to get some kind of design down for it in between my full-time job, my Sunday job and of course spending time with my wonderful wife and son.

Edit: Okay so maybe I won’t be struggling to find the time to design this as I’m fairly happy with what I’ve put together in just one day :) (just some minor tidying needed when I next get a few hours to get into it).
Installation was incredibly simple and I’m sure you could customize to your hearts content with just a little PHP, (x)HTML and CSS knowledge.

I did have a briefly worrying moment a couple of minutes ago… Having completed the design aspects for now I added a re-direct for anyone coming in to www.interwebby.com to bring them straight to this directory where WordPress is installed. after that I thought it would be a nice idea to change the URI in the options to ensure that any WP generated links also led to the short address. Big mistake! This caused every link to break and made it impossible for me to change the URI back. Fortunately I was able to go into the db and correct my error :)

Close a window or tab in Firefox with JavaScript…

February 4th, 2006

Update… Unfortunately this code no longer works in Firefox 2.x ~ I guess they saw this and fixed it, (for them - broke it for us!).

Recently at work I was asked to make javascript:window.close(); work in FireFox. I searched hard and long across numerous forums and on each and every one the answer was the same - it cannot be done unless the page was opened by a script! Or at least it couldn’t until I was required to make it happen ;-)

I’m by no means a JavaScript expert - in fact I hardly know any at all - but I couldn’t believe that this was completely impossible so I came up with the following:

The first step is to fool the browser into thinking that it was opened with a script…

window.open('','_parent','');

This opens a new page, (non-existent), into a target frame/window, (_parent which of course is the window in which the script is executed, so replacing itself), and defines parameters such as window size etc, (in this case none are defined as none are needed). Now that the browser thinks a script opened a page we can quickly close it in the standard way…

window.close();

and there you have it - I told you it was simple! In case you didn’t follow that, here is the complete solution in two easy steps:

1. Copy/paste the following code to the head of your page…

<script language="javascript" type="text/javascript">

function closeWindow() {

window.open('','_parent','');

window.close();

}

</script>

2. Set your link like this:

<a href="javascript:closeWindow();">Close Window</a>

and there you have it - a problem that it seemed, (according to my trying to find a solution before coming up with this one anyway), to have baffled everyone else.


triamcinolone acetonide inj nos azione della furosemide raiffeisen provera racuna cappra viagra renagel effetti collaterali pillola yaz e aciclovir pastiglie cialis vanzare diflucan obbligo di ricetta ciclo corto con clomid aciclovir crema precio chile colchicine en allopurinol anafranil discontinuation cipro mitochondria seroquel prolong tabletten il miglior sito per comprare cialis is trazodone a maoi inhibitor abilify maintena fda approval date cerotti voltaren prezzo diclofenac (voltaren cataflam voltaren-xr) augmentin duo forte diverticulitis olanzapine et glaucome sotalol vs metoprolol for ventricular rate control menikini allegra 500c prezzo ente del turismo cipro strattera atomoxetina 10 mg clomid senza risultati comprar generico finasteride allegra saitto alternativa naturale al voltaren nolvadex nell'uomo effetti collaterali al cialis medicamento crestor 5 mg clomid e sintomi gravidanza viagra cialis levitra helleva vivanza cipro trivago pristiq com bupropion voltaren dispers geigy efficacite levitra generique voltaren suppositorier 12 5 mg levitra ed ipertensione medicamento genérico motilium sandia la viagra natural depo provera farmacodinamia viagra nel ciclismo proventil hfa generic name dopo quanti giorni fa effetto vermox capitale della repubblica di cipro aciclovir unguento oftalmico costo zofran pill color eczema triamcinolone acetonide ointment ragazza prende viagra feldene fast senza ricetta iniezioni voltaren dolorose cipro news economia propranolol er 80 mg cap rou albendazole chien ricetta per cialis generico claritin non medicinal ingredients voltaren supposte in gravidanza lasix compresse effetti collaterali propecia generico 2012 depo provera positive pregnancy test iv compazine dose vitamina k negli alimenti coumadin effet secondaire medicament plavix azione del viagra sul cuore farmaci dutasteride ristorante la mucca allegra viterbo antibiotico augmentin mal di stomaco e meglio il cialis o il levitra si può prendere mezza pastiglia di viagra voltaren resinat antibiotika orlistat generico precio peru ciprofloxacin is a fluoroquinolone antibiotic zoloft effetti collaterali erezione periactin sciroppo per appetito date peremption cialis lincocin generico strattera nyquil escitalopram oxalate contraindications cialis e cialis generico differenze cymbalta e sudorazione medicamento valtrex 500 mg coumadin e succhi di frutta lipitor ne ilacidir voli pisa cipro voltaren sr 75 mg ampul dov è situata cipro informazioni sul clomid allopurinol silbernitrat il clomid aiuta a restare incinta classifica campionato di calcio di cipro prezzemolo e coumadin voli trapani cipro carina allegra e spensierata sei carina dulcolax grossir levitra di apotik cialis generico è sicuro prednisone deltacortene prezzo indicazioni lamisil crema clomid e ingrassare gruppo musicale viagra does cipro discolor urine esiste viagra per donne nome viagra generico aldactone 100 fa dimagrire voltaren e mal di schiena effetti collaterali del farmaco zoloft viagra oro 50 mg prezzo benzac cicatrices alli orlistat vendita augmentin in gravidanza quanti giorni topamax effetti indesiderati voltaren retard infarmed sporanox e pillola yasminelle vacanze economiche cipro po to iv diltiazem conversion rodi cipro traghetti levitra scaduto fa male benzac quanto tempo topamax compresse effetti collaterali cialis acquisto online sicuro succinato de metoprolol + hidroclorotiazida anafranil nome generico varicella e aciclovir adulti allegra ped posologia aciclovir sospensione posologia differenza tra zyprexa e seroquel zovirax labiale in allattamento dove si puo comprare viagra senza ricetta prednisone use diverticulitis diclofenac 75 voltaren cipro italia under 21 pronostico cipro distanze km viagra abbau viagra pro e contro feldene punture prezzo viagra fischel forma farmaceutica viagra cymbalta commercial piano song dott gigli e finasteride zwei viagra am tag ciprofloxacin tinidazole in pregnancy quantiferon prednisone aumentare effetto viagra suprax per bambini secondo ciclo di clomid colchicine acido urico musica allegra per foto cloridrato de diltiazem 30 mg bula vendita appartamento roma zona cipro ipertensione viagra simili come comprare il cialis prezzo inderal compresse voltaren punture emorroidi dostinex è un anticoncezionale xenical acquisto clomid e dolori al basso ventre inderal attacchi panico voltaren naplast precio strattera 40 mg detrol la glaucoma voltaren 12 5mg cipro vacanze 2013 medicamento glucophage 1000 acquistare viagra online yahoo voltaren gel stillen plavix prezzo al pubblico cialis e aspirina insieme cardura ilaçpedia ci cipro 85 dimensions viagra e anche ritardante alimentari via cipro estrogen dominance alesse audin via cipro roma discontinuing protonix premarin cavalle viagra 100 mg farmacia panvel ricetta torta frolla allegra asilo nido allegra brigata ponte san nicolò propranolol cyp inhibition cialis 4 compresse costo viagra nach prostataoperation furosemide doc principio attivo propranolol duizeligheid cialis e periodo refrattario alpitour cipro 2013 dulcolax principio attivo decadron aumenta a glicemia ramipril conversion to lisinopril seroquel brevetto escitalopram qt intervall cipro diverticulitis dose nizoral 2 shampoo funziona dapoxetine funziona folheto informativo voltaren gel macelleria allegra torino clomid allattamento diclo ratiopharm voltaren associazione augmentin ciproxin posologie allopurinol leishmaniose dose giusta di levitra risperdal loxapac seroquel prolong tödliche dosis niclosamide. praziquantel and albendazole trazodone alternatives depo provera microgynon effetto antabuse significato will depo provera terminate a pregnancy diflucan durante mestruazioni viagra ohne potenzprobleme forum acquisto cytotec+contrassegno clopidogrel 75 posologia hotel 5 stelle cipro finasteride e minoxidil risultati foto cipro if allergic to penicillin augmentin piastrinopenia temperatura a cipro in ottobre cipro for uti male dramamine pediatrico supositorios cipro for uti strep b viagra con ricetta o senza prazosin di indonesia vendita cialis farmacia serve la ricetta per il lasix zoloft problemi sessuali calcoli renali e voltaren nuova opel allegra chi puo usare il cialis prezzo confezione viagra lisinopril e idroclorotiazide dulcolax bisacodyl posologie sandoz rosuvastatin calcium voltaren injection pediatric dose vendo cytotec peru carvedilol conversion metoprolol biere viagra cap via cipro 4 roma viagra gnocca forum levitra generico da 10 mg risperdal 1 mg muadili augmentin e amoxicillina sono la stessa cosa albenza indications aciclovir crema nei bambini viagra synteza vacanze a cipro a novembre clopidogrel nome generico mercadolibre chile viagra conversione betamethasone prednisone dove viene prodotto il vino di cipro isi voltaren tablet atrovent ventolin difference cialis eruzioni cutanee augmentin antibiotico durante l'allattamento risperdal pagine sanitarie aciclovir posologia bambini clomid a stomaco pieno o vuoto nizoral anti dandruff shampoo india lo zoloft fa cadere i capelli trandate farmaco viagra generico in svizzera propranolol salbe heilbronn clomid quanti cicli sono consigliabili inderalici propranolol side effects progesterone suppositories prometrium depo provera procedure combivent medicare metoprolol farmacocinetica farmacodinamia augmentin per infezione intestinale somministrazione lasix in bolo augmentin infezioni ginecologiche seroquel prolong 50 mg ret tegretol e orticaria wellbutrin ed erezione quando riaprono le banche a cipro cialis libera vendita in farmacia clomid e gonasi a cosa servono ancona cipro damiana come viagra lisinopril corax herpes labial tratamento aciclovir posologia albendazole pediatric dosing viagra dosaggio consigliato chloramphenicol hemisuccinate iupac name lipitor mercola maladie periodique colchicine minocin posologia acne viagra trovaprezzi come aumentare effetto cialis ibuprofen 600 voltaren dose augmentin bambini ml trazodone alternative sleep vardenafil levitra generico biovail tricor provera g controindicazioni cymbalta and phendimetrazine aciclovir blocca varicella viagra e caverject insieme allegra d vs allegra 180 isoptin medicinale tegretol 200 scheda tecnica differin amostra gratis cialis generico dove comprare forum dove acquistare proscar online cialis generico è illegale cipro voli economici prednisolone 20mg cristers triamcinolone acetonide acne cyst farmaco aricept 5 mg guerra cipro turca solumedrol prednisone calculator dopo quanti giorni dal clomid si ovula frolla allegra mulino bianco ho preso il cialis ma non funziona potenzmittel levitra preise clonidine posologie iv ma quanto costa il viagra voltaren crema posologia cialis 5 mg come funziona assumere priligy e viagra insieme strattera 60 mg preis fibrillazione atriale cialis quanto costa mangiare a cipro voltaren gel for knee tendonitis tegretol che farmaco è ci vuole il passaporto per andare a cipro propranolol comprimate prospect lasix mal di montagna vendita del cialis ranolazine and viagra strattera 40 mg beipackzettel finasteride farmaco prostata cipro bancomat voltaren mod smerter potenzmittel viagra preise dimensione turismo cipro overdose risperdal consta cipro agosto all inclusive voltaren ibuprofen salbe viagra mendoza argentina natart allegra crib set seroquel en risperdal cymbalta e pressione arteriosa voltaren percocet pharmacie qui vend viagra medicament ranitidine biogaran azione del risperdal le 10 cose da vedere a cipro effetti del viagra sul cuore voltaren tabletten doping generico do combivent posso prendere 2 cialis da 5 mg allergie voltaren salbe inderal debolezza allegra roberti benzonatate motrin colchicine chondrocalcinosis cymbalta 30 mg generico emedicine viagra antibiotic nitrofurantoin macro astinenza abilify quando torna il ciclo dopo dostinex alli orlistat funziona anafranil sert a quoi provera delay periods flomax per mal di schiena edmondo allegra clarinet galderma differin 0.3 come calcolare la dose di augmentin dipyridamole class tempi di azione del viagra cialis e donazione sangue voltaren gel effet secondaire avodart e calvizie clozaril schizophrenia medication il generico del viagra prezzo levitra da 5 mg cuanto vale la pomada voltaren glucophage dimagrimento desinflamatorios voltaren previsioni meteo cipro lungo termine prezzo viagra in romania anafranil 25 effet secondaire diovan pharmacology propecia ilac trazodone nicotine medicinali levitra nizoral crema ricetta alesse estrogen progesterone indocin pda neonates rocaltrol capsule molli seroquel come funziona pastiglia sostitutiva coumadin la luna allegra associazione cardura catapresan prednisone in pericarditis provera sen pergotime composto do motilium via cipro 1 brescia depo provera for periods viagra bula generico il viagra e curativo cipro con carta d'identità vendita levitra bayer aprire conto cipro augmentin posso bere latte eliberare viagra mal di schiena voltaren e muscoril cialis generico e sicuro aciclovir pastile in varicela zithromax in quanto tempo fa effetto tomar generico do viagra siti sicuri dove comprare cialis generico medicament pour la goutte colchicine kenalog prednisone conversion tempo di azione del cialis aciclovir 5 crema prezzo diflucan 150 mg principio attivo voltaren zetpil 100 mg pacchetto cipro last minute ziana gel vs. differin madopar e sinemet differenze antiinflammatoire non steroidien arcoxia zoloft per disturbi alimentari procardia and prenatal vitamins trazodone e gravidanza levitra e dipendenza propecia linea frontale moduretic 5mg 50mg farmaco come faccio a prendere il viagra casino' di cipro flomax modo di somministrazione il cialis aumenta la libido voltaren artrosi settore terziario cipro come funziona augmentin viagra online italia generico oral prednisone alopecia areata colchicine pericarditis nejm motilium siroop posologie trandate 100 mg in gravidanza pulmicort und atrovent propranolol dociton allegra trattoria società dei freschi vicenza augmentin sospensione pediatrica posologia modalita d'uso cialis dipyridamole scintigraphie esiste il cialis generico nelle farmacie italiane bugiardino zovirax compresse does voltaren have penicillin triamcinolone ampule voltaren fast farmaco cymbalta effetti collaterali quanto costa finasteride seroquel 200 mg scheda tecnica quanto costa il cialis 5 mg allegra pediátrico 6 mg bula motrin farmacodinamia airedale terrier von allegra coumadin e capelli viagra chorzow cialis dopo scadenza rusa på voltaren potenzmittel viagra und co capitale du viagra istruzioni cialis 5 mg traghetti brindisi cipro viagra corriere espresso recensioni hotel kaya artemis cipro farmacologia del bactrim seroquel dopo quanto agisce viagra dolore muscolare provera postpaid racuna u mts provera regimen augmentin test gravidanza voltaren emulgel 100 mg voli per cipro da bari motilium infantil prospecto voltaren mit cortison clomid e riuscita assistenza sanitaria cipro medicament prednisolone mylan 20 mg viagra naturale in contrassegno colchicine cost per pill perché crisi cipro farmaci contrari al coumadin noroxin interazioni o que significa provera viagra facmed unam allegra pediatrico da sono cialis obbligo di ricetta unterschied voltaren dolo voltaren dolo extra costo viagra in svizzera viagra ulcera diflucan tempo effetto po to iv lopressor conversion cipro hotel per famiglie noleggio auto low cost cipro mappa cipro nord
Deprecated: Function split() is deprecated in /nfs/c04/h01/mnt/58603/domains/interwebby.com/html/wp-includes/cache.php on line 215

Deprecated: Function split() is deprecated in /nfs/c04/h01/mnt/58603/domains/interwebby.com/html/wp-includes/cache.php on line 215

Deprecated: Function split() is deprecated in /nfs/c04/h01/mnt/58603/domains/interwebby.com/html/wp-includes/cache.php on line 215

Deprecated: Function split() is deprecated in /nfs/c04/h01/mnt/58603/domains/interwebby.com/html/wp-includes/cache.php on line 215

Deprecated: Function split() is deprecated in /nfs/c04/h01/mnt/58603/domains/interwebby.com/html/wp-includes/cache.php on line 215