================================================

Importing HTML

If you read the user question section or visit the newsgroup at:
newsgroup you will have noticed that one of the most common support questions we receive relates to apparent HTML errors when a user Previews or Publishes their Web Pages. This is especially true when viewing the pages with Netscape.

As I have previously mentioned no software is bug free, not even ours. The IMS applications however, have been available for over a year now and all known bugs related to exported HTML have been corrected. When we receive a support request that a Web Page is not displaying correctly, the first thing we consequently suspect is that the problem is caused by imported HTML.

There are many legitimate reasons why a user may wish to import HTML. The most common are to add a 3rd party component such as a counter, banner ad, bulletin board and so forth. These are often supplied as a block of HTML code that you are supposed to copy and paste to your web page. If everything works as intended, the imported code will operate as expected generating the component desired. When it doesn't, your web pages can appear to be a disaster.

How reliable is 3rd party code? Can it adversely affect your web page's performance? Why does it work when you test it but not when some of your visitors view your pages?

The answers are a very definite "it depends". There is no reason why you should avoid reliable 3rd party HTML and Scripts. But you need to use them with care. The first thing to consider is the source. Is the code being provided by an established well supported site or does it come from an unknown source? Note that the apparent size of the company is not the important factor. Large sites can often provide code that was created someplace else and is now out of date. Smaller sites that actually develop the code will quickly post corrections if a problem is found. In either case you should not simply assume that the code is viable.

A lot of imported code is designed to work online. The consequence of Previewing your project with imported HTML when you are not online will depend upon what the code is attempting to do. A lot of counters for example, will attempt to display a smaller banner with the current count. This should work without a problem if you are Previewing while connected to the Internet but will fail if you are not. This not a problem provided you are aware of why your code is not operating correctly. It should work once you connect or when it is published.

Performance can be more problematic. Imported code will often attempt to link to another site to retrieve information and images or banners. If the Internet is slow, the source site is experiencing heavy traffic or worse, the source site is offline, then it can significantly slow down your web page load time and/or display an empty box where an image should be. The more external code you add to your web page, the greater the potential problem. The best solution here it to set up your project so that the code will display last. You can do this by selecting the code Object and selecting the To Front command from the Arrange menu. Then if there is a problem or delay, your visitor will still be able to view the rest of the web page.

Although an error may exist in your imported HTML, when a problem does occur it is far more likely that is was caused when the code was transferred to your project. Code is often supplied either in an email or from a form on a Web Page. The correct way to transfer it to your IMS project (or any other authoring tool) is to Copy and Paste. Use your mouse to select the code and then press Ctrl-C. In your IMS Editor select the HTML button to open the text editor and press Ctrl-V to paste it into the editor window. Exit the text editor and Preview while online as the first test to confirm that it works.

Correctly transferring your code is critical. It definitely helps to know a little HTML so that you know exactly what to copy and can identify any possible errors.

When the code is supplied from an online web site it will often be displayed in a text box. Simply select everything in the box, CTRL-C and CTRL-V into the IMS Text editor. When it is not in a text box or is provided in an email, you will have to be more cautious.  

A typical email with a block of code may look like:

------------
Here is your special HTML code.

<!---Start Code---><P>
Visit Ed's Diner.
</p><!----End Code--->

Copy and paste it to your Web Page.

------------
is3fig1

In this example, the code starts with the first Less-Than bracket .
Everything between and including these two brackets should be copied. Nothing before or after these two brackets should.
Although this is a common format it is not necessarily the only way you will receive your code.

Problems occur when the code is not transferred correctly. Missing the first Less Than < bracket is common and will
definitely cause problems. I have also seen examples where the descriptive text before or after the code segment was
included and also caused errors. A real recipe for problems is to attempt to type the code into the text editor instead of using
Ctrl-C and Ctrl-V.

Another common cause of problems is when the code has been formatted by another program. Forwarded email will
usually do this by adding >> double Greater-Than symbols at the start of lines that are being forwarded. The above example
in this case would look like:

------------
>>Here is your special HTML code.
>>
>><!---Start Code----><P>
>>Visit Ed's Diner.
>></p><!----End Code--->
>>
>>Copy and paste it to your Web Page.
------------
is35fig2

Attempting to transfer this code is bound to cause problems.

Finally, you have transferred and tested your code, published it to your site and tested it again to confirm that it works. Then you start to receive messages that your web site is a mess. You view your web site and it appears fine. After a little testing you discover that the problems only occur with visitors that are using Netscape. Maybe IMS does not support Netscape?

IMS does support Netscape. The problem is again likely caused by Imported HTML. Netscape is a lot fussier about HTML errors than Internet Explorer. IE may simply ignore a missing tag or skip an extraneous character. Netscape may suddenly display a mixed up mess for your Web Page. If you have a single block of imported code, check it carefully. If you are not sure which code is causing the problem, try deleting your Text Objects one at a time while previewing with Netscape. If the page suddenly starts to work after you delete an Object, then that Object will be the cause of the problem.  


==============================================
"IMS Web Tips" ISSN 1488-7088
© Copyright 2001 Virtual Mechanics
==============================================

"IMS Web Tips" is a weekly news letter for all web site managers regardless of experience who are looking for detailed information on creating, maintaining and promoting their web sites.

To subscribe send an email to join.imswebtips@list.imswebtips.com or visit www.IMSWebTips.com for subscription information and a list of past articles.

-----------------------------------------------------------

If you like the contents of this newsletter, please recommend it to a friend. Not only will you help us to continue to provide you with useful and informative articles, you could also win $10,000. Click here for details.
Click here for a free WYSIWYG pixel precision HTML editor.
Home Page | Archive by Date | Archive by Topic | Virtual Mechanics | DHTML Magic | SVG Magic