Showing posts with label HTML. Show all posts
Showing posts with label HTML. Show all posts

Friday, January 18, 2013

Mixed security pages: How to avoid error messages

Depending on what browser and what version you use, the dialog box will appear differently.  The message is still the same though: You're viewing a secure page (https://...) and a warning pops up that there is some insecure content mixed in, asking you what to do about it.  It happens on small sites, corporate sites, even banks, social networking and other very large sites that should have the technical know-how not to scare you like that.  (This can be especially scary when you get security messages from your bank's website!)

Thursday, January 17, 2013

Submitting Forms: Don't Forget the NAME Attribute...

Just a quick post on something I stumbled across recently... I was submitting a form with several checkboxes and text fields, but no matter what I did on the receiving page, it wasn't getting any values from either POST or GET data. At first I assumed I was doing something wrong in PHP, since I'm new to the language and have been doing forms for many years. It wasn't until I was thoroughly frustrated and finally searched Google for help that I slapped my forehead and had it solved within seconds.  Hopefully, I can give you the same head-slapping moment with less frustration.

Wednesday, November 7, 2012

Doctypes: What are they and why should you care?


Imagine walking into a room where everyone speaks english, but they all come from different countries, and different sections of each country.  It's all the same language, but the words they use can mean different things to each person.  For instance, somebody from England might ask you to "fetch a torch from the boot".  To an American, that wouldn't make much sense unless you knew to expect the British version of English.  Then you'd know that he was asking you to get a flashlight from the trunk of his car.

A doctype can be thought of as a definition of what variation of language your page is written in.  If you don't specify a doctype, each browser will try to interpret things their own way and the results can either be subtly different or completely off, so a doctype should be considered mandatory.  Unfortunately, they are very often forgotten about until after you've spent hours or even days trying to figure out why your page isn't working as it should.