How to set input field string to message data?

(1 post) (1 voice)
  • Started 2 years ago by Cromfel

Tags:

No tags yet.

  1. Cromfel

    veteran
    Joined: Apr '08
    Posts: 243

    How to read HTML input field and set it as a message data to be sent to virtools? Im just trying to return user name from input field to Virtools as message.

    <input type="text" name="data" size="32"/>

    JavaScript:
    
    function SendMessageToTheObject(ObjectName,MessageName)
    {
        var cmd = "SendMessage" + " '" + ObjectName + "' " + "'" + MessageName + "' ";
        alert(cmd);
        var res = document.VirtoolsATL.DoCommand(cmd);
    }
    
    HTML:
    
    <a href="#" OnClick="SendMessageToTheObject('blue_cube','OnClick');return true;"> Message </a>
    Posted 2 years ago #

Reply

You must log in to post.