Dr Design Answers your Questions
After a very long hiatus, Dr. Design is back! He’s found his stethoscope, donned a white coat, and is now seeing patients. So if your layout’s ailing, you’ve got a chill in your PNGs, or you need a little something for those troublesome stylesheets, why not seek a consultation? The good Doctor is in!
Dear Dr. Design,
I have a site that uses frames. I’m able to change the content of a single frame when a user clicks a link. But now I want to know how I can change the content in multiple frames when the user clicks a single link. Can you help me?
As I’m sure you’re aware, most frame links look something like this:
<a href="hello.html" target="main">my link</a>
you can reuse the code. This allows you to do stuff like:
<a href="doSwitch('main','top','main.asp','top.asp');"> test</a>
Make default.asp Your Main Page
Dr. Design, I’m using ASP on an NT server and was wondering if there was an easy way I could make default.asp the main page that loads (instead of index.html or .htm)? Do I need to contact my host, or is there a way I can do this automatically?
This is a great question — though the answer may not be what you expected. Many hosts employ very strong Control Panels, which can often be found at www.mydomain.com/cp or some similar address. If your host either does not have a Control Panel, or the Control Panel does not give you the option to specify Default Home Pages, you need to contact them in order to effect the change.
Because of the way Internet Information Server is set up, there is a list of default pages it looks for whenever a directory (www.mydomain.com/mydirectory) is accessed without a specified file. IIS maintains a list (set up by your host) of the files which are "allowed" to be Default Home Pages. Setting this up is actually a fairly simple task, but the fact that your default.asp page isn’t showing up suggests you will need to contact them in order to ask them to add it to the list. It’s literally a 20 second job. Good luck!
Hey Dr. Design, is there such a thing as an ASP manual (sort of an equivalent to the PHP manual for ASP)? What are some good resources for learning ASP?
I’ll defer this question to the members of the SitePointForums, as they’ve amassed an amazing list of resources. I think this list is about as complete as can be, and I’d recommend that you save this somewhere handy.
General ASP Sites
Though there are literally thousands of ASP-based sites around, here’s a list of our favorites — they’re the most comprehensive and useful.
- 4Guys From Rolla
- ASP Zone
- ASP Today
- DevDex — ASP
- ASP FAQs
- ASP Emporium
- ASP Programmers resource
- adOpenStatic (a small site but a real gem. Has the best article I’ve ever read (online or off) regarding data validation)
As the developer of ASP, Microsoft has provided a veritable treasure trove of resources, chief among which is the Microsoft Developers Network (MSDN). These documents can be confusing, but are worth digging through.
- Active Server Pages Guide
- Platform SDK: Internet Information Services 5.1 – Visual Basic Object Model
- ADO Programmer’s Guide
- ADO API Reference
- Introduction to CDO for NTS
- About CDO for Windows 2000
- MSDN Magazine – loads of articles covering ASP/ADO/COM/XML etc
Miscellaneous MS Database Links
Several especially important parts of the MSDN are those related to Microsoft’s databases. Here are a few important aspects:
- Fundamental Microsoft Jet SQL for Access 2000
- Intermediate Microsoft Jet SQL for Access 2000
- Advanced Microsoft Jet SQL for Access 2000
- SQL Server
ASP Documentation is available with every full install of Microsoft Internet Information Server. It is viewable through http://localhost/iishelp if this is installed. If not, check your installation options. Though Microsoft Personal Web Server does allow ASP, and does provide ASP documentation, it can be both sparse and inaccurate.
Popup Window Woes
Help me, Dr. Design! Popup windows may seem simple to some, but to me they are an absolute pain… Is there an easy way to make them?
Yes! Builder.com’s Window Builder is just what you need. It allows you to specify your settings to find the perfect combination for you. You can then simply cut and paste the code into your HTML page! I use it all the time…
Coloured Scrollbars Are Easy
Doc, I’ve seen coloured scrollbars on many sites, but I have no idea how to create them! Any ideas?
It’s very simple, and it’s done using CSS. CSS allows us as designers to do all kinds of things that were previously impossible using HTML. Here’s the code you’re looking for!
Stop My Background Moving!
Dr. Design, on many Web pages I’ve seen these backgrounds that don’t move. How is this done?
There are two ways to create this effect, but before I show them to you, let me encourage you to use them in moderation. Much like a clock that flies around the screen, using fun effects can easily cross the line from attractive to amateurish. Be sure to use this one carefully, and only when appropriate!
Our first example uses CSS. Personally I prefer this method as I can link to it via an external style sheet and maintain control over my whole site from one file.
In the above example I’ve added an extra line of code to give you more power. The
background-repeat property will allow you to either have the image occur only once (like a classy watermark), to have it repeat only horizontally (by changing the
x), or vertically (by changing the
There is another simple way to create this effect, using the following code:
<body background="images/mainback.jpg" bgproperties="fixed">
HTML to Word Document Conversion
Dr. Design, is there any quick and easy way to turn HTML documents into Word documents? If it’s helpful, I have ASP installed on my Web hosting account.
Good question! Often the Web can be such a pain to work with in terms of data collection and getting people to fill out forms online. Streaming data to our users in different formats than HTML is a great idea.
Using MIME and Content-types we are able to stream data to our users as if it were something other then HTML. In the example below, we’ll stream data to your users as if it were a Word file.
Response.ContentType = "application/msword"
This is a great technique. However MS Word is not the only format in which you can stream data. Here’s a sampling of just a few others:
Spread the love!
Many thanks to this week’s patients. The Dr. Design consulting rooms will open again at the same time next week, but you can contact the Doctor with your design ailments at any time, and he’ll answer them here at SitePoint.