View Single Post
Old 12-14-2012, 06:35 PM   PM User | #2
AndrewGSW
Senior Coder

 
Join Date: Apr 2011
Location: London, England
Posts: 2,120
Thanks: 15
Thanked 354 Times in 353 Posts
AndrewGSW will become famous soon enough
I'll follow you to this post then..
I would correct the HTML at the beginning (in particular, to prevent IE dropping into quirks mode) so that it can be tested in all browsers:

Code:
<!DOCTYPE html>
<html>
<head>
<title> CBox/RBtn Tests </title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
Just my personal opinion/preference but I would return the value false rather than null. I might use null if a function is expected to return an object.

Seems to work well. Again, just my personal opinion , but I would prefer to use separate functions. I think these are trying to do too much, and if I look at this again in a couple of months I'll need to remind myself of what the functions do. Of course, function documentation (docstrings) would help with this.
__________________
"I'm here to save your life. But if I'm going to do that, I'll need total uninanonynymity." Me Myself & Irene.
Validate your HTML and CSS
AndrewGSW is offline   Reply With Quote