AJAX and Accessibility

I’m working on a project that requires the use of some javascript for a simple survey.  The rub is that the pages all need to be accessible.  I’ve not yet done any work with any AJAX and accessibility but found a few links to articles to get me started.

AJAX and Screenreaders: When Can it Work?
Accessibility of AJAX Applications
AJAX and Accessibility

Accessing A Subversion Repository Via an SSH Tunnel from Windows XP with Interactive Password Login

First off, I didn’t want to simply forward port 22 on my firewall to my local machine as I didn’t want to completely expose it to the net.  I have a number of hardened Internet servers that are completely exposed (for ssh connections, that is) and sufficiently locked down that I felt comfortable configuring my network to only allow ssh connections from a specific server.  What I did there was specify firewall rules to only allow connections on port 22 from a specific machine and then forward those connections to my machine behind the firewall.  I’ll leave the details of that as an exercise for the reader (or a future article).

Once that was set up, I could now set up an SSH tunnel on the trusted Internet server to my machine behind my firewall.  To do that, login to your server and enter the following command:

ssh -N -L234.234.234.234:8888:121.121.121.121:22 username@234.234.234.234

Where:

  • 234.234.234.234 ip address of the local machine
  • 8888 is the port on the local machine that is accepting the ssh connection that you are tunneling
  • 121.121.121.121 is the ip address of the firewall (destination ip for the other end of the tunnel)
  • username@234.234.234.234 is a valid user name on the local box that is accepting and forwarding the connection

Run the command, you will now be forwarding ssh connections on port 8888 on your Internet server to your local machines firewall.  I added that command to a shell script that I could run.  When I was through with it, just CTRL-C and it kills the tunnel.

Now the Subversion part on the Windows client:

I had initially set up Subversion to use password-less ssh keys but decided that I wanted to use the interactive password instead.  I had installed TortoiseSVN, so that included Tortoiseplink.  In this case, I simply added a tunnels entry into the conf as such:

customssh = Tortoiseplink -P 8888

With that entered, my tunnel set up, I could now connect with the following:

svn+customssh:/username@234.234.234.234/path/to/repository local_dir_for_files

This’ll enable you to access your repository from anywhere with your password.

I’ve got a Subversion repository on my machine at my office, and it became clear that it would be really nice if I could access it from anywhere on the net.  It was also clear that it needed to be with an interactive password, and not using ssh keys as I did not want leave ssh keys on untrusted machines.

Click on Read More for the full explanation of how I put it together. First off, I didn’t want to simply forward port 22 on my firewall to my local machine as I didn’t want to completely expose it to the net.  I have a number of hardened Internet servers that are completely exposed (for ssh connections, that is) and sufficiently locked down that I felt comfortable configuring my network to only allow ssh connections from a specific server.  What I did there was specify firewall rules to only allow connections on port 22 from a specific machine and then forward those connections to my machine behind the firewall.  I’ll leave the details of that as an exercise for the reader (or a future article).

Once that was set up, I could now set up an SSH tunnel on the trusted Internet server to my machine behind my firewall.  To do that, login to your server and enter the following command:

ssh -N -L234.234.234.234:8888:121.121.121.121:22 username@234.234.234.234

Where:

  • 234.234.234.234 ip address of the local machine
  • 8888 is the port on the local machine that is accepting the ssh connection that you are tunneling
  • 121.121.121.121 is the ip address of the firewall (destination ip for the other end of the tunnel)
  • username@234.234.234.234 is a valid user name on the local box that is accepting and forwarding the connection

Run the command, you will now be forwarding ssh connections on port 8888 on your Internet server to your local machines firewall.  I added that command to a shell script that I could run.  When I was through with it, just CTRL-C and it kills the tunnel.

Now the Subversion part on the Windows client:

I had initially set up Subversion to use password-less ssh keys but decided that I wanted to use the interactive password instead.  I had installed TortoiseSVN, so that included Tortoiseplink.  In this case, I simply added a tunnels entry into the conf as such:

customssh = Tortoiseplink -P 8888

With that entered, my tunnel set up, I could now connect with the following:

svn+customssh:/username@234.234.234.234/path/to/repository local_dir_for_files

This’ll enable you to access your repository from anywhere with your password.

Goal Oriented Design and Its Impact on Your Site’s Effectiveness

Take a 5 second look at your website, and then close your eyes.

What were the top three things that you noticed? If those top three things are not related to the top three things directly related to helping your business turn visitors into customers, your site isn’t implementing Goal Oriented Design principals.

Goal Oriented Design is a layout philosophy that prominently features the information and/or activities on your site that are most relevant to bringing in new business. Every business has a different sales cycle, customer profile, and website activities that help bring in new customers. For example, one business might have a high conversion rate for those who sign up for an e-newsletter, another might have good success with offering a free survey or trial download. The point is, that each and every business has a specific set of activities or information, that it can provide on its website that helps it bring in new business. These set of activities, or Goals, are what should be featured prominently on the site.

So, when you are looking to develop a new website or redesign an existing one, the following steps will help you develop a design and layout that helps you meet your business goals:

  1. Examine your sales cycle. What are the activities and/or information that prospects typically need before they decide to buy?
    1. Are there a series of FAQs or specific questions that most prospects ask?
    2. Do you tend to convert people who read your newsletter?
    3. Do prospects need to compare your product or service to one of your competitors?
  2. Distill this list down to three to five distinct activities or key pieces of information. These will be your Goals and you will want to create design elements that feature these items prominently in your layout.
  3. Create a design/layout that make each of those items prominent on every page on your website. Adding these elements to just the homepage on your site will minimize the effect. In most cases many people enter your site through a page other than the home page. Moreover, you never know when they will decide to click on the item that you are trying to feature and don’t want them to have to find their way back to the home page to do it.

For example: look at http://www.personalstockstreamer.com. The two prominent buttons on the home page, and at the top of every sub page on the site, correlate to the two most important parts of this business’s sales cycle: offering a free download so that prospects can try out the product, and making it easy for prospects to read about the feature set offered in the software. When you first look at the site, these items “jump out at you” and are easy to find.

So, take a 5 second look at your website and then close your eyes.

What are the top three things you remember? Are those things that your prospects are interested in, or will give them the information that they need to move them along the path of your sales cycle? If not, your site might not be doing everything that it could to help you bring in new business.

With a little bit of business introspection and some modifications to your site you can go a long way to help increasing your site’s effectiveness.

— Ryan Chapin
President, Nuts & Bolts Interactive, Inc.

Chaging the Default Browser under Windows XP for IE and Firefox

There are times when you might want to change your default browser; especially if you are a developer and want to make sure that something works as it should with both IE and Firefox.

To change your default browser:

  • Go to: Start/Control Panels/Add or Remove Programs
  • Click on "Set Program Access and Defaults", the last button in the left-hand nav
  • Click on the "Custom" set of options
  • You will see an expanded list of items, Web Browser, E-mail Program, etc.
  • Under the "Choose a default Web browser", select the radio button next to browser you would like to set as default.
  • Click "OK"

getURL() in a Projector Firefox Bug and Solution

If you have ever tried to do a simple getURL() command in Flash from an .exe projector you’ll notice that it fails when Firefox is your default browser.

Following is the solution to the problem in both AS 2.0 and AS 3.0

Here’s the code for the fix in AS 2.0:

// code on a keyframe on the main timeline

var swfUrl:String = _root._url;
var lastSlashIndex:Number = swfUrl.lastIndexOf("/");
var pipeIndex:Number = swfUrl.indexOf("|");
var baseUrl:String;
if (pipeIndex >= 0)
{
baseUrl = swfUrl.substring(0, pipeIndex);
baseUrl += ":";
}
else
{
baseUrl = "";
}
baseUrl += swfUrl.substring(pipeIndex + 1, lastSlashIndex + 1);

myButton.onRelease = function()
{
var targetUrl:String = baseUrl + "test.html";
getURL(targetUrl, "_blank");
};

Here’s the code for the fix in AS 3.0:

// code on a keyframe on the main timeline

import flash.events.MouseEvent;
import flash.net.*;

output_txt.text = this.loaderInfo.url;

var swfUrl:String = this.root.loaderInfo.url;
var lastSlashIndex:Number = swfUrl.lastIndexOf("/");
var pipeIndex:Number = swfUrl.indexOf("|");
var baseUrl:String;
if (pipeIndex >= 0)
{
baseUrl = swfUrl.substring(0, pipeIndex);
baseUrl += ":";
}
else
{
baseUrl = "";
}
baseUrl += swfUrl.substring(pipeIndex + 1, lastSlashIndex + 1);

function gotoTestHtml(event:MouseEvent):void
{
var targetUrl:URLRequest = new URLRequest(baseUrl + "test.html");
navigateToURL(targetUrl, "_blank");
}

myButton.addEventListener(MouseEvent.CLICK, gotoTestHtml);

Here is a link to the original article where I found this with the full explanation and fix.

How to Run Firefox 2 and 3 at the Same Time

Here’s a quick how to on running Firefox 2 and 3 at the same time under Windows

  1. Right click the shortcut of the Firefox 2, click "Properties". Add "-profilemanager" at the end of the shortcut path. Click OK. Then run this shortcut to launch Firefox Profile Manager.
  2. Create a new profile, name it "firefox3". And uncheck the "Don’t ask at startup"
  3. Go to Properties of the Firefox 2 shortcut again, remove the "-profilemanager" and add "-p default" at the end of the path. This forces Firefox 2 to open the original profile.
  4. Install Firefox 3. Choose "Custom" when you are asked.
  5. Change the installation folder to "Mozilla Firefox 3"
  6. Same in Start Menu Folder name.
  7. When is complete, uncheck the "Launch Firefox now". You still have something to do before you can run it.
  8. Go to the Properties of the Firefox 3 shortcut. Append "-no-remote -p firefox3" to the Target. The "-no-remote" will let Firefox run a separate instance. The "-p firefox3" will force your Firefox 3 to run the newly clean profile.
  9. Run the Firefox 3, and you will be prompted that your Firefox is not the default browser. DON’T click Yes. Firefox 3 is not stable and you won’t like to use it as your default browser. Simple uncheck the "Always perform this check when starting Firefox" and click No.
  10. Now you can run Firefox 2 and Firefox 3 at the same time.

VB6 Code for Openning an External File

The following VB6 code will open an external file with it’s associated application.  This assumes that there is an application on the system that is already associated with a specific executable.
Under your General Declarations:

‘ Runs an external file/launches it’s associated app
Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hWnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long

On whatever Form/Button/Event

Dim FileName As String
FileName = "C:\path\to\some\file.pdf"
ShellExecute 0&, "open", FileName, "", "", vbNormalFocus

Creating MovieClips with Button States in AS 2.0

Here is a quick tutorial on how to create MovieClips that act like buttons using ActionScript 2.0.  Attached is a sample .fla file with a complete, working example.

  1. Create a new Flash document for AS 2.0
  2. Create whatever graphic/shape that you would like and convert it to a symbol.  Double click on on it with the selection tool, and then press F8 to open the create symbol dialog box, or right click on it and select "Create Symbol".  Make sure that you create it as a MovieClip.
  3. Double-click on the new MovieClip to enter the symbol edit mode.
  4. Rename the existing "Layer 1" layer that contains the base graphic "bg".
  5. Create three new layers above that one in this order:
    1. labels
    2. actions
    3. text
  6. On the labels layer:
    1. Create a keyframe at frame 10, 20, and 30
    2. In frame 1, enter the following label: _up
    3. In frame 10, enter the following label: _over
    4. In frame 20, enter the following lable: _down
  7. On the actions layer create a keyframe at frame 10, 20, and 30 and put a stop(); action in frame 1, 10, and 20.
  8. On the text layer, create a keyframe at frame 10 and 20.
    1. Add the following text to each keyframe:
      1. Frame 1: Steady State
      2. Frame 10: Over
      3. Frame 20: Down
  9. Go back to your main timeline, by clicking on the "Scene 1" button.
  10. Select your MovieClip and give it an instance name of button_mc.
  11. Create a new layer in the main timeline and name it actions
  12. Add the following actions to it:
    1. button_mc.onRelease = function(){
          trace( "Click" );
      }
  13. Test your movie and when you rollover and click on the clip you will see the different states displayed.

Doing a Little Something to your Site is Better than Doing Nothing

Recently, I have gotten back into roadracing motorcycles after a 7 year hiatus (here are some photos that Yermo took this past weekend, 2008-09-20).  Before the weekend, I had to get some minor repairs done to my leathers.  I called and talked to Connie at Vanson (the company that made the leathers) and they asked me the last time that I’d given them a cleaning.  I had to admit that it had been quite a long time.  A full-on “proper” cleaning is moderately involved and can take some time, of which most racers don’t have a lot of.  Connie said that a quick and easy thing to do was to hit them with any furniture polish and a soft rag.  She went on to say that because it was so quick and easy to do that the benefit of the quick cleaning a few times a season was far better than doing nothing at all.

That got me thinking about small businesses and websites, and that the same axiom applies.  You are far better coming up with a strategy to make regular, even minor, updates to your site than doing nothing at all.
As I have mentioned in previous articles, your website should become a valuable resource to people who are looking for information about your product or service.

The best way to further that goal is to just fill it with content.  Unfortunately, most small businesses that I know just don’t have the time to spend weeks or months when they redesign, or redevelop their site to write content.  Moreover, many of them do not have their website set up with a CMS (Content Management System) that enables them to easily make updates and changes without having to know how to write HTML/CSS/server-side code, navigate FTP programs, and get everything working properly with their hosting environment.  The typical result is that because it is so time consuming that the website is never updated.

The solution:  get your small business website set-up so that you can use one of the many CMSs out there and come up with a plan whereby you can set aside 20 – 30 minutes a couple of times a month to add a few things to your site.  Like cleaning my leathers with furniture polish vs. the full-on “proper” cleaning, it’s far better than doing nothing at all.

In the case of your website, it will continue to grow on a regular incremental basis that fits into your schedule and will hopefully increase your search engine ranking, your relevant traffic, and ultimately your bottom line.

— Ryan Chapin
President, Nuts & Bolts Interactive, Inc.