Announcement

Collapse
No announcement yet.

Using Miva functions in JS

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

    Using Miva functions in JS

    Hello,

    I'd like to do a series of Miva actions on form submission, and I think the easiest way to do that would be from JS. But I wanted to know what the syntax is for calling mvt:item/do functions?

    #2
    The syntax for mvt:do api functions is listed for each function here: https://docs.miva.com/api-functions

    As for mvt:item functions, those syntaxes are dependent on the component modules that provide them. There is no "universal" mvt:item syntax apart from the basic call, such as <mvt:item name="some_name" param="some params" /> (params and name are dependent on what the module developer has given you to work with.)
    M.A.D.* since 1997

    http://www.scotsscripts.com

    *miva application developers

    Comment


      #3
      Oh, I meant from JS. I know how to use them when they're a striaght <mvt:do file=... etc> I was just wondering if you can still call them from JS or if they have to be called inline.

      On form submit it needs to: write to several custom fields and then send an email.

      Comment


        #4
        Originally posted by rwilder View Post
        I'd like to do a series of Miva actions on form submission, and I think the easiest way to do that would be from JS. But I wanted to know what the syntax is for calling mvt:item/do functions?
        Would this scenario work?

        Use JavaScript to make an AJAX call when the form is submitted passing the data to a page created in Miva. Then in the Miva page template run the Miva template code using the global variables passed to complete the actions and return the result to the AJAX call.
        Nicholas Adkins
        Technical Training Specialist / Miva, Inc.
        [email protected]
        https://www.miva.com/mivalearn

        Comment

        Working...
        X