Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

teampoison's avatar

Showing Missing Semi Colon Error But I Fix All

// Remove the v-model binding from both buttons
<button class="login100-form-btn" type="submit" @click="submit(true)">Submit</button>
<button class="login100-form-btn know-risk-text text-black" type="submit" @click="submit(false)" name="risk">Know your risk</button>

// Update the submit function to take a parameter
submit(saveClicked) {
  var self = this;
  var form_data = new FormData(self.$refs.signupForm);

  self.$http
    .post(self.$member_whitelist_signup, form_data)
    .then(function (response) {
      if (response.data.success == true) {
        if (saveClicked == true) {
          self.$router.replace({ path: 'google.com' });
        } else {
          self.$router.replace('yahoo.com');
        }
      } else {
        if (response.data.data == null) {
          self.error_msg = response.data.message;
        } else {
          let first_error_key = Object.keys(response.data.data)[0];
          self.error_msg = response.data.data[first_error_key][0];
        }
      }
    });
}
0 likes
1 reply
LaryAI's avatar
Level 58

The missing semi-colon error is likely not in the code provided, but rather in code that comes before or after it. Check the surrounding code for any missing semi-colons.

If you're still having trouble finding the error, try running your code through a linter or syntax checker to identify any issues.

// Example of running code through a linter using ESLint
// Install ESLint: npm install eslint --save-dev
// Create a .eslintrc.json file in your project root with your desired configuration
// Run ESLint: npx eslint yourfile.js

// Example of running code through a syntax checker using Node.js
// Run: node -c yourfile.js

Please or to participate in this conversation.