Announcement

Collapse
No announcement yet.

Buttons and loading websites

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Buttons and loading websites

    I would like to use the drawTextAbsolute() function to put a button on a chart that would use the standard functionality to go to a website when the left button is clicked and also allow a callback function to do something when the right mouse button is clicked. I have code now that does either one but not both on the same button. Is there a way to go to a website without using the button syntax? If so then I could add that to my callback function for the left button.

    Thanks in advance for any suggestions/solutions.

    Carl

  • #2
    Use the following as an example..

    They dont' need to be buttons. You just need to include a URL for the text label.

    vURL = "@URL=http://www.ment.com/esignal/CS3RM.html";
    drawTextRelative(0, 8, "3R+" + vURL, Color.black, Color.lime, Text.FRAME | Text.ONTOP | Text.BOLD, null, null, getValue("rawtime") );


    Brad
    Brad Matheny
    eSignal Solution Provider since 2000

    Comment


    • #3
      Left and right button on same button

      Brad,

      Thanks for the suggestion about using a frame instead of a button but it still has the same functionality problem where both the left and right buttons go to the URL. I would like to be able to left click on the button or frame to go to the website and then a right mouse click on the SAME button or frame would be able to execute a function within EFS. I thought that if there was a way within EFS to load a website then I could use the button handler to execute that code for the left button. If there isn't an easy way in EFS then I can always execute a DLL call to the Windows API to load a browser and pass the URL, but I was hoping for an EFS solution.

      Carl

      Comment


      • #4
        Hello Carl,

        We don't currently have a function to launch the browser within EFS. Within the Text object, the URL is built-in to the text string parameter when drawing the button so you won't be able to do a left-click/right-click to two different urls from one button. You will need to draw two buttons.
        Jason K.
        Project Manager
        eSignal - an Interactive Data company

        EFS KnowledgeBase
        JavaScript for EFS Video Series
        EFS Beginner Tutorial Series
        EFS Glossary
        Custom EFS Development Policy

        New User Orientation

        Comment

        Working...
        X