HTML Tricks

1. Using HTML to enhance text 
    You can format text, display special characters and even convert text using HTML tags.

    For example, in our first program "Hello World", we popped up a Dialog Box with the text "Hello World" when the button was pressed.
                            
                               

The code on the button was:

        on mouseUp

           answer "Hello World"

        end mouseUp


Knowing HTML, you can enhance the text of the message with HTML so that it looks like this:

                            

with this code:

        on mouseUp

               answer "<i><font size=36 color=red>Hello World</font></i>"

        end mouseUp


2. Modifying fields with the HTMLText command
You can apply HTML tags to any field with the HTMLText  command

e.g.
      set the HTMLText of field "myData" to "<i><font size=24 color=red>132.23</font></i>"
      
   
   




3. Showing HTML content without the HTML tags with the HTMLText command
This code loads a webpage - "Mobgui.html" into a field on the card. It is hard to read with all the tags

    on mouseUp

           put url "http://www.mobgui.com" into field "test"

    end mouseUp


It looks as follows:


                       

    You can use HTMLText to remove (not show) the HTML tags and make it more readable 

        on mouseUp

               put url "http://www.mobgui.com" into temp

               set the htmlText of field "test" to temp

        end mouseUp



                     






Comments