This message contains graphics. If you do not see the graphics: Graphic Version.
 
Event handlers in MSIE; Support Forum Update

How to use event handlers in Internet Explorer

A lot of customers ask our support engineers how to catch events in VBScript when using TX Text Control in the Internet Explorer. This is not that hard, but there is a difference between Visual Basic and VBScript.

If you are familiar with Visual Basic, then you should have no problem setting up event handlers in a web page. Event handlers are code that is called when a particular action is performed on or performed by a component. For example, let's say that you wish to perform an action whenever the user clicks on a field in the TX Text Control. You would setup an event handler for the FieldClick event as follows:

<SCRIPT ID="EventHandlers" LANGUAGE="vbscript"> <!-- Sub objTX_FieldClicked(ByVal FieldId) msgbox "A field has been clicked. Field identifier: " & FieldId End Sub --> </SCRIPT>

We recommend that script code that accesses components always be placed after the object tags of OCX components. But this is not neccessary with event handler code as this code will not be called until a component is initialized.

Since Internet Explorer's VBScript does not support variable types, you cannot use variables such as Long, Boolean, Double, Integer, etc in your code. All variables in VBScript are Variants. Therefore, the following code would be incorrect and would generate a script error.

Sub objTX_FieldClicked(ByVal FieldId as Integer)

Use the following code instead, omitting any "as Integer" or other variable types...

Sub objTX_FieldClicked(ByVal FieldId)

Anyway, the parameter of the FieldClicked event can be easily accessed by VBScript, because it casts automatically the variable into the correct variable type.

Major TX Text Control Support Forum Update

In the beginning... WWWBoard

Way back in 1997, we introduced an area on www.textcontrol.com that allowed developers using TX Text Control to communicate with one another in public. At the time, we implemented the novel concept of a 'discussion board' with the now legendary PERL script WWWBoard:

http://www.scriptarchive.com/wwwboard.html

WWWBoard quickly became the most frequented part of the web site, getting more than double the amount of hits than the homepage itself.

It did not take long before WWWBoard was overwhelmed by the sheer number of posts it was receiving. The index page became so long (over 1.5 MB in size) it took ages to load over the slow Internet connections of those days. At that time, we started looking for a new solution, preferably with a database backend. (WWWBoard worked with flat files).

And then came... Phorum

We eventually came across Phorum, an exceptional piece of Open Source software and worked on a way to convert the WWWBoard flat files into MySQL. We achieved this without to much hassle and thus the second discussion area was released.

http://phorum.org/

We used four versions of Phorum during the course of two and a half years. All in all, it offered us a great way to provide an online discussion area. Again, Phorum was by far the most popular part of www.textcontrol.com.

And finally... vBulletin

However, we finally arrived at the upper limits of Phorum, when other parts of The Imaging Source (the company that manufactures TX Text Control) also wanted a number of online discussion areas. And when we wanted to split the singular TX Text Control Support Forum into three sections (.NET, C++ Class Library and ActiveX).

Hence, we again started looking for a community software product that would allow us to have multiple forums in a company-wide, united interface. We came across (what turns out to be) the most celebrated vBulletin.

http://www.vbulletin.com/

vBulletin is the most commonly used commercial community software, as it offers an extremely vast number of features and a very comfortable user interface (the most important point). Thus, we again set about converting the old posts from Phorum into the format required by vBulletin. After a few days work, the third major version of the TX Text Control Support Forum was born.

We would whole heartedly recommend that you take a look at the shipped FAQ, as it contains information that is invaluable to using the new forums.

http://forums.textcontrol.com/misc.php?action=faq

One feature that you will find especially interesting is the section on 'vB Code':

http://forums.textcontrol.com/misc.php?action=bbcode

vB Code is very similar to HTML and allows you to format text. The most important feature of vB Code is certainly the source code formatting tag ([code]). Using this tag, you can be sure that the source code that you post will retain its formatting (from the FAQ):

The Code and PHP Tags

If you want to post some programming source code, or perhaps some ASCII art, which would require a non-proportional font, you can use the [code] tag to achieve this. For example:

[code]
<script language="Javascript">
<!--
alert("Hello world!");
//-->
</script>
[/code]

In the example above, the text enclosed in the [code] tags would be automatically indented, and the spacing would be preserved like this:

<script language="Javascript">
<!--
alert("Hello world!");
//-->
</script>

...


Please format your source code with the [code] tag when posting :-)

We wish you a lot of success with the new TX Text Control Support Forums.


Best regards

The Newsletter Team

Text Control GmbH respects your online time and privacy. We only send this newsletter to TX Text Control customers and people who have signed up to receive it. However, if you would prefer not to receive future issues of the newsletter, you may unsubscribe at any time. If you received this newsletter forwarded from a colleague or friend, you may wish to subscribe directly.

Sent to: N/A.

Imprint | Unsubscribe | Subscribe

© 2003 Text Control GmbH. All Rights Reserved.