
|
HTML Naming Conventions & Visual Interdev HTML Generation By Nannette Thacker - 05/05/1999 In Visual Interdev 6.0, an HTML Toolbox allows the user to click on a button and produce automatic HTML coding: <INPUT type="text" id=text1 name=text1> However, the code created needs edited in order to make it useable. For instance, there should be a Size value, indicating the maximum length displayed on the screen. There should be a MaxLength value indicating the maximum number of characters allowed for input. If you're using values from a form to populate a database table, you will find the MaxLength field invaluable for eliminating database errors when saving. The MaxLength field should match the database table field length. And finally, you will want to use HTML naming conventions when naming the ID and NAME. < INPUT TYPE="text" SIZE="50" MAXLENGTH="50" NAME="txtSearch" VALUE="Enter Search Value Here">
You may edit these values manually, or you may use the Properties screen (right click on the HTML code and select Properties) to edit these values. I personally prefer to edit all of my HTML code manually. I don't care for the way the Design mode formats HTML. See my tips on using the Design mode without messing up your HTML formatting: Working with and in spite of the Visual Interdev Design Mode. Below are suggested Names for each form type. However, you may use your own. The key is to be consistent throughout your coding, so that any developer, including yourself, can later read your source code and easily tell what is happening. Instead of "checkboxGender" you may wish to use "ckGender" or "cbxGender." What you use is insignificant as long as all checkboxes have the same prefix and the prefix makes the type identifiable. If you're working with a team of developers, have the team create naming standards and styles.
|
|
