We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 14280
    • 3 Posts
    I know that this must be very easy to do, but for the life of me, I can’t figure it out. I am working in MODx Revolution 2.0.0-rc-1 rev6614 if that matters.

    I am very new to this type of programming and have learned a lot just reading the forum...so thank you to all that have contributed and those yet to come!

    Now, what I am trying to do, is to change the value of several TV’s so that I can create a "highlight" over the section of the page. I would love to be able to change the TV values on a mouseup detection. I know, I’m asking for a lot! The value that will be placed into the TV’s is either NOTHING or "active".

    Is this possible without going into a lot of "coding" that I don’t know how to do yet?

    Thank you in advance for any and all help.

    Jon
      • 16545
      • 358 Posts
      I’m looking exacly the same thing only for Evolution 1.03
        • 28042 ☆ A M B ☆
        • 24,524 Posts
        I’m not sure exactly what you are trying to do, but with some javascript and AJAX you can set any TV to any value you want on a mouseup on a given element.

        This javascript will get the value of whatever was selected
        var selection = window.getSelection();

        Then you can feed the "selection" to an AJAX request. If that’s directed to a MODx resource set up to be an AJAX request processor, it would be very easy to set the TV value to whatever you want, depending on the "selection" value that was sent.
          Studying MODX in the desert - http://sottwell.com
          Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
          Join the Slack Community - http://modx.org