Archive for April, 2008

Extra Comma in Request.Form

Posted by admin on April 26, 2008  |  No Comments

Just in case you run into this weird situation: You have a web page with a rather extensive form (that really should be broken up into multiple pages, but that’s another discussion), submit the form, and you end up with extra commas that are getting submitted to your database.

Troubleshooting forms with extra commas in the fields

Here’s one troubleshooting tip (that could save you the better part of an hour): Make sure you don’t happen to have multiple input fields with the same name. True story!

It doesn’t even matter whether you are using Classic ASP, PHP, ASP.NET, JSP, ColdFusion, AJAX or JavaScript: If you happen to have multiple fields with the same name, you will end up getting value 1, value 2… etc. in your form response.

Obviously, errors such as this stem from COPY & PASTE jobs and deadline pressure. And it’s extremely easy to overlook something like this if you’re working with web designers and/or graphic artists who mock up the forms and then hand it over to the back-end developers.

As with any error that takes a while to track down, if somebody else runs into this kind of situation and spends a long time trying to figure out what’s going on (pulling their hair out and increasing the caffeine intake), all they say, when you figure out what’s going on and you tell them — thereby saving them additional minutes and/or hours of troubleshooting — is, “Oh, duh! That’s silly. Thanks.”

Yes, it is.

Try . . . Catch in JavaScript

Posted by admin on April 19, 2008  |  No Comments

Note to myself: The try / catch statement only works in web browsers that are capable of running at least JavaScript 1.3.

If you try to run “try / catch” statements in older web browsers, you get a JavaScript message (or, as your end users will point out, “a browser error”), stating something the lines of: try is a reserved identifier.

FYI:
IE6 and IE7 support JavaScript 1.3.
Firefox 1 and Firefox 2 support JavaScript 1.5.

If you want to make absolutely sure that your “try / catch” statements don’t cause errors for those end user’s with older web browsers (yes, they do exist), you could use the following statement in your < script > tag:

language=”JavaScript1.3″ . . .

Unsure about your web browser’s JavaScript capabilities? Check out The language attribute of JavaScript, run by the friendly folks from JavaScript Kit, which contains JavaScript code to test versions up to 2.0.

 

Pimp Your Web Page: QuickRibbon

Posted by admin on April 11, 2008  |  No Comments

Here’s a quick and attractive way to spice up any web page or web marketing campaign: QuickRibbon.

QuickRibbon.com

This free Web 2.0 web application does thing, and it does it really well: It generates a web page ribbon for you. You know, one of those slanted graphics that shows up in the upper right corner of a web page.

According to the QuickRibbon.com web site:

“QuickRibbon is a completely free Web2.0 tool, a website ribbon generator which lets you create a custom ribbon, insert a link in it and place it in the top right corner of your website.”

“It will take you less than 5 minutes to generate your own website ribbon with this trendy widget and add a stylish Web2.0 look to your page – it’s quick, easy and fun. We recommend using our QuickRibbon tool to attract your site’s visitors attention to new features, announcements, sales, etc. Get rid of the boring banners and make your news stand out with a style.”

I found this extremely useful for a couple of web campaigns, where we needed to draw attention to a new service or a special promotion.

The text, font, size, colors and style can be selected and auto-generated. And when you’ve generated the ribbon, you even get a code snippet that you can insert into your web page to display the ribbon. Additionally, you can add links to your ribbon and specify whether to show them in the same window or in a new window.

How cool is that? Oh, and did I mention that you can also use this tool for BLOGs (WordPress, blogger, etc.), MySpace, and LiveJournal?

 

Filed Under: Uncategorized