We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 4172
    • 5,888 Posts
    is there a default way how we can add javascript together with custom-TVs?
    For example when we want to add a sortable multiselect-box, datepicker or colorpicker and want to use jquery or mootools?
    $this->regClientStartupScript() is not working in this context.
      -------------------------------

      you can buy me a beer, if you like MIGX

      http://webcmsolutions.de/migx.html

      Thanks!
      • 28215
      • 4,149 Posts
      Quote from: Bruno17 at May 17, 2010, 01:39 PM

      is there a default way how we can add javascript together with custom-TVs?
      For example when we want to add a sortable multiselect-box, datepicker or colorpicker and want to use jquery or mootools?
      $this->regClientStartupScript() is not working in this context.

      I’m assuming this is for a custom TV *Input*?
        shaun mccormick | bigcommerce mgr of software engineering, former modx co-architect | github | splittingred.com
        • 4172
        • 5,888 Posts
        right, this is for custom TV *Input*
          -------------------------------

          you can buy me a beer, if you like MIGX

          http://webcmsolutions.de/migx.html

          Thanks!
          • 28215
          • 4,149 Posts
          Well, for one, the default mgr backend uses ExtJS - so you’ll have to use that.

          Secondly, no, since the TVs are loaded via AJAX, you can’t include an external JS file. You’ll have to do the JS inline (similar to how the other, default TVs do).

          *Edit*: Although, you could always fire a plugin as well on the Resource edit page to load the custom JS file.
            shaun mccormick | bigcommerce mgr of software engineering, former modx co-architect | github | splittingred.com