Image representing the Articles category

Creating Checkboxes that Behave Like Radio Buttons with jQuery

Published 13 years ago

Some time ago I received a question on the Wrox P2P forum about checkboxes that should behave like radio buttons. The poster of the question was looking for a (client side) solution to have multiple checkboxes per row in a GridView with multiple rows. A user should only be able to check off at most one of the checkboxes in each row. My first thought was to use radio buttons instead, but then I realized that with radio buttons you lose the ability to uncheck all options. Once you've selected a radio button in a group of radio buttons, there's no way for an end user to uncheck it again.

Fortunately, with a bit of jQuery, this is really simple to accomplish with checkboxes as I'll show you in this short article.

Read on ...
Image representing the Articles category

Avoiding the "Works on My Machine" Syndrome

Published 14 years ago

A long time ago I worked on a web application for a large Dutch newspaper that provided access to all pictures that had ever been published in the paper, or were taken by photographers employed by the publishing agency. In total, there were around 250,000 pictures in the database used by the web application. One of the areas I worked on was the "picture list" that had features such as displaying, searching, filtering and paging of pictures. Things seemed to work fine on my machine, even with the large amount of pictures in the database. Until one day I worked from home.

Read on ...
Image representing the Articles category

Creating Super Printer-Friendly Pages

Published 17 years ago

Don't you just hate it? You find a good article somewhere on the Internet and you decide to print it so you can read it later. But when you read it, you find out that all the links in the article are missing. All you see is something like "Click here to read this other very interesting document". On the web site, the word here links to some kind of other document, but on paper that is pretty useless. The only option you have left is to revisit the original article, find the link and follow it.

Fortunately, with a little bit of JavaScript and some DOM modification, it's easy to improve your user's experience, even long after they have visited your site and printed parts of the content.

Read on ...
Image representing the Articles category

A Better Alternative to Dreamweaver Templates

Published 18 years ago

As a web developer and consultant, I am often involved in the upgrade or redesign process of existing web sites. Clients have had a site for a couple of years, and are now ready for something bigger, better or more feature rich. They approach the company I work for (Design IT) for a new web site. Upgrading (or even maintaining) these sites is often not an easy task, especially when they have been built with Dreamweaver and its Templates and Library features.

While in itself these features can be very useful, and allow you to create a consistent looking web site with little work, these features often make it hard to upgrade the web site. In this short article, I show you the common pitfalls with templates and library items, and show you a better alternative. While this article uses ASP for any sample code, the concepts also apply to other programming languages and web servers that support server side includes.

Read on ...
Image representing the Articles category

Howto send E-mail from an ASP page

Published 20 years ago

Note: this is a very old article targeting Classic ASP. To see how to send email from modern-world ASP.NET core applications, check out the article Improving your ASP.NET Core site's e-mailing capabilities.

This article will show you how simple it can be to send an e-mail from an ASP page. With just a few lines of code, you can add mail sending capabilities to your ASP page in your Web site. Notice that I put the focus on can be; depending on your network setup, this approach may be very easy, or it may require you to setup or configure your network for this code to work. See the reference section at the end of this document for more information.

Read on ...
Image representing the Articles category

Searching TheSoccerSite With Dreamweaver MX

Published 20 years ago

More and more Web sites these days are database-driven. That means that most of the content, customer data, site statistics and maybe even information used for the navigation menu or other layout purposes is stored in a database.

With all that data stored in a database, you also need to provide a means to let your users search for it in the database. Since this information is not file based, you can no longer use tools like Index Server that index the contents of physical files. Instead, you'll need to code the query logic yourself. For each database-driven application, the search facility will be different, because usually your back-end database and the front-end requirements are different. However, part of code can easily be reused in other projects. In this article, I will focus on building a search facility for TheSoccerSite, a database-driven soccer fan site that was created in section 2 of the books Beginning Dreamweaver MX and Beginning Dreamweaver MX 2004. Although the implementation will be specific for the Soccer Site project, you'll get enough background to successfully implement a search facility on your own Web site.

Read on ...
Image representing the Articles category

Allowing Your Users to Sign Up for Your Site

Published 21 years ago

If you have a copy of the book Beginning Dreamweaver MX, I am sure you are familiar with the project TheSoccerSite. For those not familiar with the project, TheSoccerSite is a Web site where soccer fans around the world go for up-to-date information about soccer events. In 7 Chapters, Server- and Client-Side programming, using ASP, HTML, JavaScript and a Microsoft Access database were introduced. One of the features of the site was a login mechanism to protect the admin section from unauthenticated and unauthorized users.

However, with the current implementation of the login mechanism, you would have to add new users to the database directly. To do this, you'd need to download the database, add the user and then upload the database again. Fortunately, Dreamweaver has a few handy Server Behaviors that make adding a new user to the database very easy.

Read on ...
Image representing the Articles category

Howto Force the Save As Dialog in the Browser

Published 21 years ago

Your Web browser is set up to handle all kinds of documents. For example, when you open an .html page from a Web site, the browser knows it should parse this file, and display its rendered contents onscreen. The same is true for images; when you click on a link that directly links to an image, the image will be displayed in the browser.

This default behavior may not always be what you want. In some scenario's, it's useful to have the user download and save the file, instead of displaying it in the browser. This is a common requirement for files like images, Word documents, spread sheets and so on. This article will demonstrate you how you can force the client browser to present the Save As dialog, so your users can download the file and save it on their local hard disk.

Read on ...
Image representing the Articles category

Howto Create a Hit Counter Using a Database

Published 21 years ago

If you have a live Web site on the World Wide Web, you may be interested in how many people are visiting your site. You can of course analyze the log files of your Web server but that information is usually difficult to read. The log files contain information for each and every request a visitor has made to your site, including resources like images, Flash movies and so on. This makes it near impossible to extract information about individual users. It would be a lot easier if you could count the number of individual users that have visited you since you started your site. It would also be useful if you could see the number of users that are currently browsing your site.

This article will show you how to accomplish these two tasks by storing the hit counters in Application variables and in a database using code in the global.asa file. The counters in the Application variables are used to display them on a page in your Web site; either as a counter so your visitors can see it as well, or somewhere on a page in your Admin section, so only you have access to them. By writing the counter to a database you can maintain its value even when you restart the Web server, while you still have a fast and scalable solution.

This article extends the ideas from two previous articles where the values of the counters were just stored in Application variables and in a text file.

There is also an ASP.NET version of this article available.

Read on ...
Image representing the Articles category

Howto Create a Hit Counter Using a Text File

Published 21 years ago

If you have a live Web site on the World Wide Web, you may be interested in how many people are visiting your site. You can of course analyze the log files of your Web server but that information is usually difficult to read. The log files contain information for each and every request a visitor has made to your site, including resources like images, Flash movies and so on. This makes it near impossible to extract information about individual users. It would be a lot easier if you could count the number of individual users that have visited you since you started your site. It would also be useful if you could see the number of users that are currently browsing your site.

This article will show you how to accomplish these two tasks by storing the hit counters in Application variables and in a text file using code in the global.asa file. This article extends the ideas from a previous article where the values of the counters were just stored in Application variables. By writing the counters to a file you can maintain their values, even when you restart the Web server.

There is also an ASP.NET version of this article available.

Read on ...

Mobile: False

Crawler: True

I: False