To remove stuff such as punction and spaces (or anything you want) from a text box before sending to the server for validation you can use code like this, first the HTML:-
<input name="name" onblur="this.value = entrycheck(this.value);" type="text" size="20">
And then the following Javascript will remove invalid characters when the user moves to another field:-
<script type="text/javascript"> function namecheck(theInput) { var valid = 'abcdefghijklmnopqrstuvwxyz1234567890'; var test =''; var ret =''; for(i=0;i<theInput.length;i++) { test = theInput.substr(i,1); if(valid.indexOf(test.toLowerCase()) != -1) { ret = ret + test; } } return ret; } </script>
In this example I just want digits and characters. If you want to add certain punctuation such as stops and commas just add them to the valid variable.
My father, an ex RAF fighter pilot, sent this to me this morning and I just don’t want to lose it!
Seven years ago I tried to persuade my business partners and investors not to outsource our startup development to Oracle, but at the time ‘the city’ could not understand how two or three passionate programmers could compare with the might of a 20 strong team of Oracle professionals.
BlueBlog Alex article Software Engineering Tips For Startups provides an explanation of the issues the project suffered albeit unwittingly at the time.
The detachment of the programmers supplied by the outsourcing agency meant it was impossible for them to understand our passions and goals. They clocked in at 9.00am and were out by 5.00pm at the latest. Their conversation focused on TV, football and who was being promoted where in the company.
Their attitude was infectious and soon the original hand picked team was dissolusioned and faded into the background noise of the companies general operation.
But the company hasn’t failed. Seven years after funding it remains a veteran of the pre-bubble-bursting-funded-but-not -IPO’d companies. There’s not many of them left today. Their success, if you can call it that, has been due to two general business factors.
It may pay the bills but it’s Hobsons Choice, they exist at the behest of the investor who provides cash and customers.
The only regret they have is not knowing where it would have gone had they been brave enough to give the original business a chance to develop.
They had an opportunity to launch the first community based business of it’s kind but that meant relying on a handful of super-geeks. Something institutional investors claimed they would never do.
Where are those investors now? They’re still there and they still have their hands on the controls, but they wobble from one investment to the next while Google, Yahoo and Microsoft cream off the best.
With a time machine most of us will be content finding out what next weeks lottery numbers are. Writing software is another way of predicting the future, the challenge is to produce the next new new thing. One thing is for certain, this video, although already old, has a frighteningly satisfying message!
Ever need to send a one-line email from a DOS/CMD batch file? If your PC or Server has .Net 2 installed you can use this application.
It’s straightforward. Place the cmdSendmail.exe in your path or working directory and then type something like this at the command line:-
cmdSendMail you@emailtest.com~you@somewherelse.com~The Subject~The main text of the message~you@somewherelse.com~pass123~mail.somewherelse.com
Usage
cmdSemdMail {command string delimited by tilde}
To send an email create a single string with all the paramters of your message. Use the tilde (~) to delimit the paramters of your email.
Sometimes it’s useful to extract a web page to a file from a Windows batch.
For example I have a batch file that downloads financial figures every day, processes them and updates a database.
vbcurl http://myfinancialfigures.com/something.php >mydatafile.htm
If you don’t have a copy of Opera handy use a statement like the following to read the source from a page that blocks right click:-
vbcurl http://annoyingwebsitesthat.com/blockrightclicks.php >secret_source.htm
Click the above link to download a small tool for encrypting small chunks of HTML such as PayPal and AlertPay buttons. It doesn’t actually encrypt code it obfuscates it which is a fancy way of saying it jumbles it up a bit. It’s enough to deter the casual thief from checking out the successful return URL where he might find your goodies.
It’s a VB6 application (Google site:microsoft.com vb6 runtimes if you don’t have them already).
Free to use but usual disclaimers, use at your own risk etc..
You could prepare a batch to call VBCurl, and call it from a Windows Schedule too. However if you are looking for something quick to setup you might find this better.
The application is written with VB6. It’s not a commercial grade product but it does the job. I meant to add it to the System Tray but never got around to it and as VB6 is no longer supported it’s unlikely I will bother. However it’s been working well for several years and as far as I know remains bug free!
Using it is self explanatory so I won’t bother with much detail. Only to say use at your own risk, no warranty, no guarantee, blah blah blah…. but at least it’s free!