Archive for the 'Beginner' Category
Setting up PHP 5 on IIS 5
This was tons of fun, in a few easy steps:
**NOTE: I am installing using CGI and not ISAPI
Download and unzip PHP package to desired PHP directory (eg: C:\PHP)
Add ‘;c:\PHP’ (or wherever you stored your PHP directory without quotes) to your PC Path. To get there go to “my computer” -> right click > properties > [...]
Filed under: Beginner, Intermediate, PHP | Leave a Comment
Coldfusion & Cfouput Group
I really do like Coldfusion. No, really =).
However, here is an ever so useful tip brought to you by me – CodeStar.
So, CFoutput should be on the forefront of every beginner ColdFusion scrip-tor. However, lo- and behold, I wanted to group my results. Simple right? No, not so much. In order to use the [...]
Filed under: Beginner, ColdFusion, RTM | Leave a Comment
Server side validating fields
As many of us know by now, it is never best to only validate fields with client side code. You must also validate on the server.
As I was writing code today for a multi-page form, I was trying to think of the best way to validate fields. Although the below is verbose and written [...]
Filed under: Beginner, ColdFusion, PHP | Leave a Comment
Simple JQuery check-all
Simple check all with Jquery:
function checkAll(el, fieldName){
var checkBoxes = $(‘input[name=' + fieldName + ']‘);
var curValue = el.value;
if(curValue == ‘Check All’){
$.each(checkBoxes, function() {this.checked = true});
el.value = ‘Uncheck All’;
} else {
$.each(checkBoxes, function() {this.checked = false});
el.value = ‘Check All’;
}
}
How to use?
Pass in the “this” keyword as the first parameter. Second, pass in the name of the fields that [...]
Filed under: Beginner, Javascript, Jquery | Leave a Comment
Creating a javascript select box with numbered selections in multiples:
var i;
var totalRows = 20;
var selectBox = document.getElementById(‘thisSelect’);
for (i = 1; i < = totalRows; i++ ){
if( (i % 5) == false ){
var newOption = new Option(i, i);
selectBox.options.add(newOption);
}
}
What’s going on?
Initialize variables:
var i;
var totalRows = 20;
var selectBox = document.getElementById(‘thisSelect’);
var newOption;
Loop over total rows:
for (i = 1; i [...]
Filed under: Beginner, Javascript | Leave a Comment
I am a programmer. However, I am also a lover of any language – be it computers, foreign, or even my own. Therefore, I like to read, I love to learn, and I love to understand. One of the areas in my life that this applies to is creating beautiful code. And of course, as [...]
Filed under: Beginner | Leave a Comment
Search
-
You are currently browsing the ✩CodeStar✩ weblog archives for the Beginner category.