Reply To: Javascript for Digital Dashboards

  • Isaac Harned

    Member
    April 26, 2023 at 4:27 pm
    Points: 8,900
    Rank: UC2 Brainery Purple Belt III UC2 Brainery Purple Belt III

    This is pretty frustrating, it looks like one way to do this would be to place a field on the page to collect the base of the address, then concatenate with a set of standard relative links. Couple of problems I am running into playing with this, and maybe you can expand Liz:

    So there is no way that I can see to manipulate active hyperlinks as they are not named form fields, and as noted earlier, Revu has not made a method available to create link.

    The work around that I see would be to set the action of buttons or other dashboard items. Unfortunately I am having issues getting the second half of my “setAction” command to work. I am pretty unfamiliar with the usable function calls here, but I have tried a couple, icluding this one, which seemed the most obvious:

    (simplified without concatenating for now, just trying to get the base to work)

    // Get the value of the form field

    var fieldValue = this.getField(“Text1”).value;

    // Set the action of the button to follow the hyperlink on MouseUp

    this.getField(“Button1”).setAction(“MouseUp”, “this.getDoc().launchURL(\”” + fieldValue + “\”);”);