Simply Breath Teching…

Resources for PHP Programmers and Small Business Operators

Entries for the ‘Coding Help’ Category

SWFUpload gets stuck at uploading…

Recently I came across a problem while installing SWFUpload on my latest site. I had the problem before but couldn’t remember what the solution was.
When I uploaded a file with SWFUpload on my mac (OSX 10.5) it would get stuck at the uploading… status

This was cause by my upload_url file not returning any text at [...]

Can’t get image width or height using javascript in IE 7 and 8

Came across this one whilst working with an TinyMCE plugin.
I had some additional css on the image i was trying to get the height and width of – display:none;

That’s the problem. Just use visibility:hidden; in your CSS and all will be fine in the world.
Oh just in case you are using the incorrect javascript as [...]

Forms won’t submit in IE when pressing enter

Hi All
I’ve come across this issue yet again. Realised I’d forgotten to post it the first time.
Instance 1 – Form has 1 text field, when pressing enter the form doesn’t submit correctly, either won’t submit, or won’t send submit button value through to php.

Solution -
if ($noOfTextFields == 1)
{
//fix IE bug where if there is only [...]

Image Caching – Specifically for Firefox

Ok so it’s Friday and it’s 2:45pm. So close to the weekend and i just spent an hour or so figuring out how to get my image caching to work on my thumbnails. Against all odds i have managed to get firefox to cache images properly – well maybe how i want it is a [...]

FireFox Caches Images When It Shouldn’t

I’ve recently come across a small annoyance in the firefox browser. I was creating a website that allows you to modify images so they can be printed. I had a caching issue when users would press back then change a setting and go forward again. A refresh would fix the issue. So FireFox was using [...]

FireFox and IE Ignore Hosts File

Thought i’d share this with everyone, I recently ran into some trouble on my machine where my browsers began ignoring my Hosts file. After much annoying testing and what not I eventually found that the reason they were ignoring my hosts file was because it was going through a proxy.

I’ve never set a proxy [...]

Debugging Solutions – A Framework

Recently i’ve been running into numerous bugs occurring in my code, it mostly stems from the fact I am working with another companies poorly written code, planning on helping them out I decided to accept the job without a proper look at their current code, and database structure. Note To Self – Don’t ever accept [...]

Forms submitting twice in Firefox

Recently I uncovered an extremely annoying and difficult to find bug in a website I’ve been modifying a client. There are two things I dislike, the first being debugging code where there exists some obscure error, the second and the one I dislike the most is debugging someone else’s code where there exists some obscure [...]