Skip to content
Advertisement

Tag: api

My first api request always fails after page load

I’m having a problem with my API request that always fails after page load. Don’t really know where Im wrong. Here’s my request and I call it when I interact with handleOpen function. ERROR: Answer It’s because your Ticker parameter is empty. When you create “stock”, clickedElement.ticker is undefined. Do this: Make getStock like like this:

mmenu js API – menu not showing

I want to use the mmenu js API but I’m having some difficulties. I was able to put a basic example up and running and all was fine. Next, I tried to add a searchfield but the searchfield wasn’t showing. At that point I realized that the source js file I was using didn’t have the searchfield add-on. After some

How to display a dynamic image based on geo location?

I’m trying to display a specific image based on the country the user is visiting my site from. I’ve managed to use ajax and the https://geolocation-db.com/jsonp/ to capture the location information. If I check this from the US, or any other country, I’m able to output that country (using TunnelBear), but my goal is to display a different image depending

Advertisement