Announcement

Collapse
No announcement yet.

Passing values to JS function

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

    Passing values to JS function

    I'd like to be able to pass l.var1 and l.var2. I thought miva_variable_value would work, but no joy. And the mveval syntax doesn't work inside the onchange attribute. How would I do this correctly? Will I need to or mveval or mvcapture the whole input string?

    HTML Code:
    <input type="text" name="{ MYINPUT[l.idx] }" value="{ l.var2 }" size="40" onchange="RunMyJSFunction( l.var1, l.var2 );">
    Thanks,

    Scott
    Need to offer Shipping Insurance?
    Interactive Design Solutions https://www.myids.net
    MivaMerchant Business Partner | Certified MivaMerchant Web Developer
    Competitive Rates, Custom Modules and Integrations, Store Integration
    AutoBaskets|Advanced Waitlist Integration|Ask about Shipping Insurance Integration
    My T-shirt Collection is mostly MivaCon T-shirts!!

    #2
    Code:
    <input type="text" name="{ MYINPUT[l.idx] }" value="{ l.var2 }" size="40" onchange="{ 'RunMyJSFunction( \'' $ encodejavascriptstring( l.var1 ) $ '\', \'' $ encodejavascriptstring( l.var2 ) $ \'' );' }">
    David Carver
    Miva, Inc. | Software Developer

    Comment


      #3
      Thanks, David, I appreciate it.
      Need to offer Shipping Insurance?
      Interactive Design Solutions https://www.myids.net
      MivaMerchant Business Partner | Certified MivaMerchant Web Developer
      Competitive Rates, Custom Modules and Integrations, Store Integration
      AutoBaskets|Advanced Waitlist Integration|Ask about Shipping Insurance Integration
      My T-shirt Collection is mostly MivaCon T-shirts!!

      Comment


        #4
        Install the latest compiler to run the latest mivascript coding features.

        Is there a readme type document that covers the full range of the compiler updates. I'm not finding it. Thanks.

        Scott
        Need to offer Shipping Insurance?
        Interactive Design Solutions https://www.myids.net
        MivaMerchant Business Partner | Certified MivaMerchant Web Developer
        Competitive Rates, Custom Modules and Integrations, Store Integration
        AutoBaskets|Advanced Waitlist Integration|Ask about Shipping Insurance Integration
        My T-shirt Collection is mostly MivaCon T-shirts!!

        Comment

        Working...
        X