Skip to content

Keep getting Cal is not a function error message in console #27124

@manoj-identixweb

Description

@manoj-identixweb

Issue Summary

I have been trying to use the Cal booking in the <a> tag for booking meetings for our Customers. While using the code in the file, getting Uncaught Error: Cal is not defined. This should't happen error message in the console from embed.js.

I've added the following script in head of the code.
<script type="text/javascript" src="https://app.cal.com/embed/embed.js"></script>

Steps to Reproduce

  1. Use the following code at your end
<a onclick="if(typeof Cal !== 'undefined') {
    Cal('popup', {
      calLink: 'identixweb-shopify-apps',
      config: {
        metadata: {
          utm_source: 'website',
          utm_medium: 'medium',
          utm_term: 'schedule_meeting'
        }
      }
    });
  } else {
    console.log('Cal script not loaded yet');
  }
  return false;"
  rel="noopener"
  style="cursor: pointer;">
  Schedule Meeting
</a>
  1. You can check the following link, where I have made a simple HTML file, and the preview is also showing the same error message in the console. Also, the console shows the "Cal script is not loaded yet" message after clicking on the Schedule meeting link that I set in the code for troubleshooting.

Any other relevant information. For example, why do you consider this a bug, and what did you expect to happen instead?

Actual Results

  • Showing an uncaught error in colsole saying that Cal is not defined.

Expected Results

  • Clicking on the Schedule meeting should open the Cal popup for scheduling a meeting

Evidence

  • Find the attched screenshot for the error:
Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    🐛 bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions