0

Here is the javascript file http://www.zaarly.com/anywhere.js

I'm calling Zaarly.Anywhere.open({title : 'iPad', description : 'An iPad', time : '6h', price : 200, mapCenter : 'San Francisco'}); from onclick event but it's giving this error in error console:

Zaarly.Anywhere is  undefined

The script is included successfully in header, I've checked that Any suggestions? I'm new to javascript

I'm loading the javascript dynamically i.e. including it through javascript and it's loading correctly I've checked that

1

1 Answer 1

1

Zaarly.Anywhere.open() is undefined

According to that error message, Zaarly.Anywhere.open() does not have any properties. In fact, it's undefined.

So, you have to look for Zaarly.Anywhere.open().xxxxx in your code, and remove/adjust .xxxxx, depending on the context.

Sign up to request clarification or add additional context in comments.

3 Comments

there's nothing like that in it. I'm not accessing any property
@UzairFarooq Show your HTML: The only cause for that error message is that you're trying to call/use a method/property on Zaarly.Anywhere.open(), literally.
I can't answer your question without more context. You have to post the relevant code (HTML and JavaScript). You can use jsfiddle.net to set up a demo.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.