Question T8896
Visible to All Users

Getting an error $(...).Survey is not a function

created 3 years ago

I have integrated survey js in vue app , I am getting error at the time of initialization.
Error in mounted hook: "TypeError: $(…).Survey is not a function",
i am attaching my codesandbox link, can you please check this link

https://codesandbox.io/s/wizardly-wright-9j5che

Answers approved by surveyjs Support

created 3 years ago

Hello,

You need to use the survey-vue library in a VueJS application. Here is the working example - https://codesandbox.io/s/61f7f?file=/src/components/SurveyComponent.vue

Thanks, Serge
SurveyJS Team

    created 3 years ago

    Hello,

    Error "TypeError: $(…).Survey is not a function" is because Survey is really not a function. Something is wrong in your code.
    Please check this working Vue example:
    https://codesandbox.io/s/rmlub
    I hope it will help you.

    Thank you,
    Alex
    SurveyJS Team

      Comments (2)

        can you please check this link , I want similar functionality on vue app when we click on complete button it shows display mode result,

        <script src="https://unpkg.com/jquery"></script>
        <script src="https://surveyjs.azureedge.net/1.1.12/survey.jquery.js"></script>

        these scripts are not working properly on my code this error done by it.

        https://plnkr.co/edit/AAhfhwz0YJBZhpZhbrm7?p=preview&preview

        Plunker - Example of setting and getting results into/from the survey, jQuery Survey Library Example

        Example of setting and getting results into/from the survey, jQuery Survey Library Example

        plnkr.co


          https://plnkr.co/edit/AAhfhwz0YJBZhpZhbrm7?p=preview&preview

          I have added same (plnkr) functionality on codesandbox, but it's not working
          https://codesandbox.io/s/wizardly-wright-9j5che

          please help me out with this


          From: Ajay Singh <ajay@pseudocode.com.au> Sent: