Commenting Your Code

If you're new here, you may want to subscribe to my RSS feed.

Have you even written some code then come back to it a few days or even months or years, and not understand what you were trying to do? This is a part of coding that few people actually practice yet alone try to master.

Read the rest of this entry »
1 Star2 Stars3 Stars4 Stars5 Stars (2 votes, average: 5 out of 5)
Loading ... Loading ...

SlashDot Style HyperLinks

In Slashdot’s commenting system, you can see the URL of the site that the commenter has posted. This tutorial will show you how to do the same effect with just CSS and using the attr attribute. Read the rest of this entry »
1 Star2 Stars3 Stars4 Stars5 Stars (1 votes, average: 5 out of 5)
Loading ... Loading ...

Form Submit Image Doesn’t Submit on Enter

Recently I was working on a simple ‘Go to page #’ form for a book list with multiple pages. Usually, this works without a hitch but something on this page was stopping the ‘Enter’ key functionality to submit the form. When a user types in a page # into the input field and clicks the go button (input type="image", in this case), the form submits fine. I discovered the root of this problem was actually the input button and our use of input type="image" instead of input type="submit". The submit button code was using input type=”image” instead of input type=”submit” but the goal was to have it function in the same way.

However, when a user inputs a page # into the input field and presses the ‘Enter’ (or return) key, the page just refreshes.

The button code looks like this:

<input src="/images/btn_go.gif" alt="GO" class="go_btn" name="navigateGo" type="image" />

The fix was simple:
Use an actual submit button and style it with a background image using CSS.

<input class="go_btn" name="navigateGo" type="submit" />

W3 specifies VALUE is not required for submit buttons.

Has anyone run into this problem and discovered an alternative solution?


1 Star2 Stars3 Stars4 Stars5 Stars (5 votes, average: 4.6 out of 5)
Loading ... Loading ...

The one and only CSS cheat sheet

Ilovejackdaniels.com has developed a great Cheat Sheet for CSS developers, beginners, and professionals. I have gone over this sheet numerous times, and I am impressed with it. Personally I don’t need a cheat sheet, but anybody thats just getting into CSS and HTML this is great for them! It comes in 2 formats, PNG, and PDF. You can print it out and set it on your desk, or just keep it on your computer it is a great reference!

Download it
PNG Format (97KB)
PDF Format (379KB)

Form more information checkout ilovejackdaneils article about it.


1 Star2 Stars3 Stars4 Stars5 Stars (1 votes, average: 5 out of 5)
Loading ... Loading ...