Posts Under Internet Category
Get Value of Checkbox using jQuery
This one is quite an easy one, but a good one to mention non-the-less as it does definitely come in really handy. If you would like to get a checkbox’s value to send to the backend using jQuery you can always do the following: Firstly let’s draw some HTML to illustrate our example. <input id="chkOurCheckbox" type="checkbox" /> Now we need some jQuery to do the real work. var ourCheckboxValue =…
Everybody's a web host
To cut straight to the point, “we’re living in the age where everybody’s a web host”. Whether it be small and quite pathetic or just another reseller of a larger service trying to get their cut of things, everybody truly is spamming the world with more and more web hosting packages. Just a few short years ago this problem didn’t exist and getting web hosting was quite expensive, unless you…
Stop That Referrer in PHP!
Today I will show you a method to stop the traffic that a referrer site is sending your way, you may wonder why you would want to ignore traffic, after all, isn’t inbound traffic to your site fantastic no matter what? The simple answer is “NO!” Let me explain it in a real life situation so that you can better understand where to use this. Understanding where to use it…
Ternary Operation
If you do not know what the Ternary operator is, or do not use it while you are coding, let me be the first to tell you how much you are missing out! The Ternary operator looks like this: “?“, that’s right, it’s a question mark! My favourite way of using it is to shorten Conditional If Statements, so let me show you what I’m on about. The long way:…
Oops… the system encountered a problem (#104)
If you get the following error while using Google’s Gmail Service (gmail.com): Oops… the system encountered a problem (#104) ..then you should try deleting your browser’s cache and everything will be resolved. This appears to be a local problem and not on the Google servers as data is pushed via cookies to the local machine using the web service. In order to delete your browser’s cache in Firefox click Tools->Clear…
When to use SSL?
There has always been quite a lot of heated discussion around the question of when to use SSL and when to avoid it while building websites. I have been asked this question a few times myself and finally thought that it would be good for everybody if I just wrote an article on it explaining what the big huff was all about. Obviously if anyone has anything to add or…
IE6 PngFix in Javascript
As a web developer you will know just how much we all love hate Internet Explorer 6 – one of the most dreaded browsers and browser versions that still exists in the deep dark corners of the interwebs – and you will probably have figured out that it doesn’t play well with PNG images. So here is how you can resolve this problem. It’s not as nice as an actual…
[Exception... "Could not convert JavaScript" nsresult: "0x80570009 (NS_ERROR_XPC_BAD_CONVERT_JS)"
What the heck is.. uncaught exception: [Exception... "Could not convert JavaScript argument arg 0 [nsIDOMHTMLDivElement.appendChild]” nsresult: “0×80570009 (NS_ERROR_XPC_BAD_CONVERT_JS)” location: “JS frame :: PATH_TO_MY_JAVASCRIPT_FILE :: THE_METHOD_NAME :: line #” data: no] For me it was just an appendChild() that was causing the problems. You can always try the innerHTML+= way if all else fails
What does __FILE__ in php mean?
In php there are a few magic constants and I find __FILE__ to be a very useful one. It returns the full path and filename of the file in question. Take a look at the PHP Manual – Magic Constants for more information on the others.
Woopra Failed to Connect?
I have used Woopra for a few months now and have started seeing this warning/error almost everyday now: Could not enable live functionality at this time. Click to reconnect. If you click the text/warning/error it seems to go away… Anybody konw what’s really going on under the cover? What happened: It turns out Woopra have upgraded their desktop application and will get to the web based application once they are…
Change PHP Session Time
The default time for a php session is 1440 seconds. You can change it by doing the following: ini_set("session.gc_maxlifetime",1440); You can obviously adjust the second parameter (1440) to anything you like to change the timeout limit.