Windows mobile

May 30th, 2008

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /nfs/c04/h06/mnt/58603/domains/interwebby.com/html/wp-includes/functions-formatting.php on line 76

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

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /nfs/c04/h06/mnt/58603/domains/interwebby.com/html/wp-includes/functions-formatting.php on line 76

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

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /nfs/c04/h06/mnt/58603/domains/interwebby.com/html/wp-includes/functions-formatting.php on line 76

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

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /nfs/c04/h06/mnt/58603/domains/interwebby.com/html/wp-includes/functions-formatting.php on line 76

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

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /nfs/c04/h06/mnt/58603/domains/interwebby.com/html/wp-includes/functions-formatting.php on line 76

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

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /nfs/c04/h06/mnt/58603/domains/interwebby.com/html/wp-includes/functions-formatting.php on line 76

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.



Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /nfs/c04/h06/mnt/58603/domains/interwebby.com/html/wp-content/themes/interwebby/footer.php(12) : eval()'d code on line 1
musico vedova allegra augmentin pediatrico costo triamcinolone nasal spray generic xalatan collyre posologie clomid da quale giorno intolleranza al bactrim dolo-voltaren diclofenac situazione politica attuale a cipro norvasc farmaco effetti indesiderati voltaren resinat magen darm suprax per bambini levitra 5 mg tutti i giorni augmentin compresse prezzo con ricetta viagra dall'india ciclo lungo con clomid bactrim cane effetti collaterali immagini nicosia cipro farmacie lugano viagra zoloft durata del trattamento prezzo fosamax 70 cymbalta e sudorazione costo viagra cialis levitra lisinopril preço ultrafarma succinato de metoprolol selozok quanti follicoli si producono con clomid vacanze isola di cipro benzac 5 crema prezzo allattare con dostinex coumadin negli anziani lisinopril e idroclorotiazide propranolol na arytmie serca pamelor dizziness bactrim e alimenti diflucan cura la cistite orari centro per l'impiego brescia via cipro nizoral shampoo effetti indesiderati ho provato viagra lincocin soluzione iniettabile aerosol prometrium dolori addominali voltaren nella ionoforesi voltaren 50 mg compresse prezzo ranitidine and escitalopram nome commerciale viagra generico foro levitra genericos la popolazione di cipro viagra online prezzo iniezioni viagra voli piu hotel cipro viagra e arginina voltaren subcutaneo antibiotico augmentin bambini per quanti giorni lamictal mot bipolar confetti e confetti via cipro roma prezzo arcoxia 60 augmentin e ovulazione vermox ulcerative colitis riccardo allegra riccadonna allegra stockists cialis originale pagamento alla consegna il clomid quando fa effetto medicinale crestor 10 trazodone pain pill principio attivo viagra generico minocycline uti dosage clomid acquisto on line bere alcolici con augmentin aciclovir crema e pillola anticoncezionale cialis fertilità cozaar vs losartan potassium ventolin aerosol dosato muscoril e voltaren insieme ricetta per vermox seroquel ed epilessia prednisolone iniettabile veterinario prometrium fa dimagrire escitalopram medication guide medicina alternativa al coumadin voltaren per bruciature avis autonoleggio cipro mal di testa da levitra voltaren gel 1 percent scheda tecnica del coumadin costo de motrin dove comprare orlistat viagra rosa in farmacia dosaggio augmentin 400 mg/57 modna kuca allegra biaxin clostridium difficile betamethasone prednisone conversion diclofenac 75 voltaren metoprolol succ ret 95 mg temperature mensili cipro gente allegra il ciel cipro febbraio diflucan interferisce con la pillola aerosoli ventolin flixotide cipro ad aprile clima quando riaprono le banche a cipro previsioni meteo nicosia cipro aciclovir tratamento profilatico iontophoresis voltaren gel lisinopril consulta viagra femenino foro offerte pacchetto cipro cialis non funziona sempre quanto costa il cymbalta voltaren cepici protiv temperature cytoxan etoposide vincristine prednisone generico de viagra chile clomid e gonasi ritardo del ciclo sovradosaggio di zoloft casa allegra cannaregio prednisone uti cats clindamycin fluocinonide trazodone pap chloramphenicol o.5 testimoni pil cytotec quanto viagra si puo' prendere cleocin crema rapporti sessuali viagra ed i suoi effetti cardura ilaçpedia effetti collaterali del nexium costo tegretol 200 allegra groppelli prezzo farmaco viagra lioresal torrinomedica cipro lapta aciclovir sospensione bugiardino dottor allegra dietologo diovan 80 mg cena bateria tramontina allegra comprare finasteride in farmacia triamcinolone uveitis harga risperdal consta viagra venta libre colombia effet secondaire cipro 500 tegretol bugiardino consiglio vacanza cipro metformin pharmazie.com atrovent berotec posologia kombinera citodon voltaren aciclovir crema precio chile voltaren tiene corticoides cialis nello sport pesca sportiva cipro metoclopramide aspirin come smettere il seroquel consilieri locali calan triamcinolone singapore depo provera no period pregnancy situazione bancaria di cipro viagra ai giovani fa male risperdal 3 mg prezzo prezzo nizoral crema cipro uti prescription prednisolone aspirine voltaren rapid 50 overdose proventil nombre generico tratament aerosoli cu ventolin come somministrare viagra di nascosto viagra precio farmacia peru voltaren indigestion psoriasis triamcinolone acetonide cream clomid e dolore al basso ventre frasi la vedova allegra augmentin per tracheite bambini finasteride per ricrescita capelli zyprexa e stitichezza costo noleggio scooter cipro depo provera cramps but no period quanto costa il cialis 5 mg quanto costa il cialis generico viagra prezzo in svizzera acquistare viagra legalmente zoloft per tutta la gravidanza voltaren groin pain assunzione dostinex in gravidanza ristorante bufala allegra roma trappa ner seroquel voltaren oftalmico prezzo voli roma larnaca cipro contagion gale apres stromectol viagra farmacia italiana crema differin gel tempo azione vermox debito estero cipro cialis acquisto online sicuro esperienze cialis generico acheter colchicine opocalcium offerte capodanno a cipro arcoxia 120 mg indicazioni interazione coumadin e farmaci frolla allegra mulino bianco cipro é sicura dieta per chi usa il coumadin trazodone clonidine viagra nombre farmaceutico laboratorio abilify augmentin bambini esposizione al sole fosamax fda approval augmentin posologia bambini sciroppo tomar nolotil con voltaren prometrium 100 mg prezzo cialis generico sicuro cialis 20 mg generico alerta sanitaria escitalopram voltaren patch le prix clomid e sintomi gravidanza meglio lamictal o depakin viagra generico miglior prezzo come ottenere il cialis siti acquisto viagra cymbalta e antibiotici voltaren diclofenaco sodico 75mg clomid rimanere incinta subito carvedilol conversion metoprolol letrozole metformin pcos albendazole sulfa allergy strattera 18 mg preis allegra dimperio dancing astronaut diflucan e spermiogramma chloromycetin palmitate oral suspension tegretol ritalin hydroquinone 4 tretinoin 0.05 and fluocinolone acetonide 0.01 finasteride dove si trova efficacite cialis 20 mg dose massima giornaliera viagra allegra galimberti porro cialis e fibrillazione atriale principali città di cipro teatro verdi firenze la vedova allegra offerta viaggi a cipro diflucan capsule 150 mg prezzo azione del risperdal dulcolax bisacodyl suppositories 10mg viagra synteza claritin non medicinal ingredients differin vitamin c generic triamcinolone acetonide nasal spray sbraccia estetica via cipro sostituzione al viagra feldene e voltaren insieme depo provera for periods cipro nord passaporto la vedova allegra yahoo viagra ca sert a quoi codice iata cipro diflucan donazione sangue naprosyn 750 indicazioni azul generico do viagra trombosi con coumadin clomid niente ciclo renagel precio chile prometrium a bioidentical nitrofurantoin mrsa uti anafranil discontinuation aldara pomata foglietto illustrativo allegra pediatrico es un antialergico uso continuo do viagra a quoi sert propranolol vorteil voltaren resinat il benzac 5 metronidazole or tinidazole voltaren tabletten docmorris dove si puo comprare viagra senza ricetta abilify scadenza brevetto propranolol clorhidrato laboratorio andromaco zoloft e ansia generalizzata clozaril depression arcoxia va bene per il mal di schiena nitrofurantoin microgynon escitalopram lamotrigine atrovent ventilan soro triamcinolone acetonide 0.1 solution zyrtec contre allergies albendazole suspension uk augmentin e latticini laboratorio fabrica voltaren zovirax e insufficienza renale allegra d pediatrico bula carvedilol x viagra voltaren va bene per lividi aliment effet viagra voltaren emulgel 2 foglietto illustrativo cipro tendons magnesium dove sono le spiagge piu belle a cipro cos'è levitra olanzapine cinv volare a cipro nord antibiotics for diverticulitis cipro investimenti immobiliari cipro viagra o cialis commenti comprar viagra generico contrareembolso cytotec misoprostol lima peru a quoi sert kamagra invega conversion to risperdal simvastatin contra crestor zoloft da problemi sessuali giudizi sul cialis dosaggio levitra 5 mg levitra generici come funzione cialis perchè il levitra non funziona dostinex periodo refrattario farmacocinetica del finasteride lipitor generico chile levitra porto alegre cari viagra di makassar diflucan 100 mg per 10 giorni altace norvasc combination ramipril lisinopril dose conversion precio strattera 40 mg generico aciclovir comprimido costa allegra verschrottet differin punti neri agenzia viaggi roma via cipro escitalopram oxalato interacciones triamcinolone acetonide cream and tinea versicolor augmentin può causare emorroidi effetti collaterali prometrium 200 mg motilium contre indication levitra fantastico allegra carotti acquistare propecia on line on provera no period cymbalta collagenous colitis augmentin sciroppo eccipienti si può acquistare il viagra in farmacia senza ricetta avapro generic substitute clomid aiuta l'ovulazione voltaren emulgel precio argentina actonel ed estrazioni dentarie il dosaggio lasix per un cane aldara per verruche clopidogrel tem generico atac parcheggio cipro laboratorio fabricante cialis voli per cipro da torino zovirax labiale sui genitali allegra valentina viagra massimo effetto triamcinolone ulcerative colitis cialis generico fiable acquisto finpecia abilify somministrazione finasteride e prolattina risperdal consta felleskatalogen generic alesse lutera bactrim compresse indicazioni seroquel 25 mg foglio illustrativo farmacocinetica del orlistat cosa non mangiare con coumadin acquisto tadacip dolore al seno dopo clomid voltaren tabletten doping rocaltrol farmacocinetica effetti abuso viagra cipro spiagge sabbia noleggio barche vela cipro zyprexa composizione flomax bustine prezzo isola di cipro superficie allegra calzature cytotec misoprostol argentina precio 2013 augmentin e spossatezza forzest generic cialis ventolin prescrizione medica cose da visitare a cipro colchicine en allopurinol strattera edronax voltaren crema opiniones amoxil contre indication viagra natural venta argentina bi combivent voltaren gel diclofenac diethylamine voltaren ampolla precio isola di cipro mappamondo come faccio a prendere il viagra atarax 100 mg effet secondaire cipro corticosteroids personaggi celebri di cipro effetti del cialis scaduto che cos'è la finasteride flomax 350 posologia monica provera rodriguez viagra pfizer prezzo farmacia ragazza allegra voltaren spray precio colombia seroquel casa farmaceutica lioresal posologie alcool l'occupazione allegra come procurarsi il viagra allegra deserio viagra e prescrizione medica quanto costa il voltaren pomata metoprolol succinate 50 mg sa tab differin amostra gratis pillole simili al cialis voltaren emulgel sciatique depo provera microgynon cialis 5 mg dopo quanto tempo fa effetto cipro temperatura a ottobre voltaren 50 mg czopki meclizine percocet turisanda catalogo cipro le punture di voltaren fanno male voltaren dolo verspannungen lasix per crisi ipertensiva lamisil pret farmacie cipro meteo ottobre viagra ci vuole la prescrizione medica cipro ufficio del turismo cipro ci sono stato percentuale di gravidanze con clomid lincocin generico vigorelli allegra voltaren for patellar tendonitis associazione furosemide idroclorotiazide farmacologia del bactrim vacanze a cipro dicembre inderalici 10 mg propranolol combivent medicare prometrium fino a quando viagra italienisch deralin 40 propranolol acquistare viagra originale risperdal consta refrigeration voltaren iğne emzirme cialis generico con ricetta medica risperdal consta insomnie atrovent e aerolin sintomi da astinenza da cymbalta retin a differin benzac pantip teatro alfieri torino la vedova allegra levitra e alcolici voltaren for achilles tendonitis principio attivo aldactone olanzapine effet secondaire generico de viagra peru ordine avvocati cipro clomid dal 3 al 7 giorno sospensione di cymbalta proscar ricetta medica temperature medie stagionali cipro e.coli ampicillin sensitive viagra doctor simi chile risperdal gynécomastie triamcinolone acetonide canada finasteride propecia effet secondaire new cipro bisazza quanto dura effetto cialis 5 mg frigideira allegra tramontina medicamentos strattera dosage allopurinol chien usare voltaren in allattamento costo viagra nelle farmacie il viagra quanto tempo prima va preso telenor provera racuna u romingu musica al pianoforte allegra nazionale di calcio di cipro wikipedia voltaren patch canada il lasix è un diuretico rosuvastatin cost australia effetti indesiderati del remeron voltaren in pill form savella cymbalta comparison voltaren gel mot svullnad sostituire zyprexa ventolin spray in sarcina clomid terzo giorno mitico re di cipro cialis viamedic antagonista del coumadin allegra d class augmentin piastrinopenia risperdal hyponatremia equivalente di cardura aldara non fa effetto benzac ac in india augmentin sospensione orale bambini dose cipro forma di governo zoloft allucinazioni cialis esenzione per patologia voltaren tarm antibiotico augmentin mal di stomaco voltaren gel prescription assistance que soigne le risperdal clomid e riuscita voltaren fitil fiyat prometrium blocca ovulazione dividere pasticca cialis voltaren gel lumbar viagra a domicilio rosario moduretic 5mg 50mg farmaco diflucan e rapporti sessuali ciprofloxacin fluocinolone acetonide and clotrimazole cream voltaren rapid na gravidez viagra e assuefazione limassol cipro clima
Deprecated: Function split() is deprecated in /nfs/c04/h06/mnt/58603/domains/interwebby.com/html/wp-includes/cache.php on line 215

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

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

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

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