English

Problem: Duplication of HTML code on client

Description

Sections of the HTML code may be repeated or incomplete when using MapObjects IMS (MOIMS) to serve HTML web pages to clients. As a result, certain sections or elements of the web page appear duplicated or incomplete when viewed in a browser.

Cause

There is a limit to the number of times the MOIMS Weblink.WriteString method can be called when creating an HTML document for the client. This limit is system-dependent. The duplicate HTML code results when this limit is exceeded.

Solution or Workaround

Do not use WriteString to create the HTML document on the client. Do the following instead:

1. Use the file editing functions available in your programming environment to write the lines of HTML into a new text file with a .html extension.

2. Use the MOIMS WebLink.WriteFile method to send the .html file to the client. For example:

Code:
Dim bWorked as Boolean
bWorked = WebLink1.WriteFile "C:\temp\topframe.html"

3. Use the file management functions available in your programming environment to delete the .html file. It is OK to delete the .html file immediately after using the WriteFile method.