JavaScript JSON request denied

As I develop a website, I am encountering an issue with my query requests from local host. Whenever I try to query from Google or the specific address provided, I do not receive any results. Is it possible that there are query limits set for certain URLs? What suggestions do you have for avoiding this issue in production?

 function searchSymbol() {    
        ticker = "AAPL";


    var url="https://ir.stockpr.com/service/quote_jsonp?symbol=";
    var extra="&jsonp=quote_search";

    // Remove already existing script tag
    if(document.getElementById('myScript'))
        document.getElementById('myScript').parentNode.removeChild(document.getElementById('myScript'));

    // Create script tag and add it to head
    var script = document.createElement('script');
    script.src = url+ticker+extra;

    script.id = 'myScript';
    document.head.appendChild(script)
}

function quote_search(json) {       
    var tickerSymbol = json.symbol;
    var tickerPrice = json.last;
}

Answer №1

To modify a URL, it becomes inaccessible even through a browser and returns

Temporary inability to retrieve quotes.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Issues with react-bootstrap component Switches functionality not operating as expected

It looks like the bootstrap switches are not functioning properly. Even the documentation version is not working as expected <Form> <Form.Check type="switch" id="custom-switch" label="Check this switch" /> <Form.Check ...

Is there a way to connect a controller to rootDocument without using a directive?

I'm currently developing a custom plugin for bootstrapping my Angular application manually, using the document as the root. I want to attach a controller to my root without utilizing the ng-controller directive in order to create a global controller e ...

Change the size of a particular div upon hovering over another element

I'm trying to figure out how to scale my div with text when a user hovers over a button, but I've tried various operators like >, ~, +, - with no success. section { background: #000; color:#fff; height: 1000px; padding: 150px 0; font-family ...

send json data using $resource to interact with an mvc controller and get json responses

Check out my AngularJs code: var adminApp = angular.module('adminApp', ['ngResource']); adminApp.controller('adminCtrl', function ($scope, AdminService) { AdminService.getRoles().$promise.then(function (rolesData) { ...

It seems that JavaScript is unable to detect newly added elements following an AJAX request

One issue I'm facing is that when an element loads data based on a clicked block, all javascript functionalities break. Currently, using Ajax, I load an entire PHP file into my index after sending a variable to it. For example: If Block 1 is clicked ...

Incorporate CSS file into the head section or directly within the HTML section without the need for JavaScript

I'm facing an issue with adding a CSS file to my webpage using JavaScript code at the bottom of the page. When users disable JavaScript, the file cannot be added. Is there a way to include the CSS file in the page without relying on JavaScript? $(doc ...

For each individual category in the mongoose database, conduct a search

Seeking assistance with mongoose scope issue User.findById(req.user.id, (err, result) => { var cartProduct = []; result.cart.map(async (item) => { //item represents the following object: productId: "product-id", quan ...

The redirection to the HTML page happens too soon, causing the ASYNC functions to fail in saving the user's image and data to the server

Hey everyone! I'm facing an issue with async/await functions. Here's the code snippet from my backend where I'm trying to save details of a newly registered user. I'm puzzled as to why the Redirect() function is executing before the f ...

Having difficulty transferring navigation props between screens using react-navigation

Within my ContactList component, I have utilized a map to render various items. Each item includes a thumbnail and the desired functionality is that upon clicking on the thumbnail, the user should be directed to a new screen referred to as UserDetailsScree ...

Is there a way to bring my popup closer to my button?

Check out my jsfiddle example here: https://jsfiddle.net/annahisenberg/ft10ersb/34/ Currently, I have the following code: <div id="more_options_popup" style={{ left: this.ref.current.offsetLeft - 140 + "px", top: this.ref.current.offsetTo ...

Searching for Regular Expressions to extract the full JSON object from JavaScript code embedded within an HTML document

Is there a way to access the entire JSON object passed to the rwt.remote.MessageProcessor.processMessage() function within the shortcuts app on iOS? The code snippet below does not show the full HTML document or JSON string, but it is important to note t ...

The function to save a mongoose schema is not valid

I encountered an issue with the StripeToken.save function while using the code snippet below. After double-checking my model, I can't seem to pinpoint what went wrong. var mongoose = require('mongoose'); var Schema = mongoose.Schema; var s ...

Regular expression for substituting values in a JSON string

Does anyone have a regular expression that can be used to identify all the numbers in a JSON string and enclose them in double quotes? For instance, in the JSON string below, I aim to enclose the Id and Phone values in double quotes. String jsonString = ...

Typeahead feature not displaying expected values in JSON object response

I am encountering an issue with retrieving specific data from a JSON file as it returns nothing. I came across an example on http://jsfiddle.net/Fresh/1hrk0qso/ which works perfectly when using the provided URL. url: 'https://cdn.rawgit.com/twitter/ ...

Searching for a specific field within an array in a nested subdocument in MongoDB: What you need to know

I am having trouble retrieving lookup data for an embedded array within a document. Below is a snippet of the data: { "_id": "58a4fa0e24180825b05e14e9", "fullname": "Test User", "username": "testuser" "teamInfo": { "chal ...

Converting a JSON array from a JSON file into a Java ArrayList

I've come across this Json file: States.json [ { "cod": "Z100", "name": "ALBANIA", "statoSovrano": "", "Continent": "EUROPA" }, { "cod": "Z101", "name": "ANDORRA", "statoSovrano": "", "Continent": "EUROPA" ...

In Typescript, we can use a class to encapsulate another class and then return a generic result

Trying to wrap my head around the concept of generic classes, and now I need to dynamically create another class. However, I am uncertain about how to go about it. Class A {} Class B<T> { Return T } Const c = B(A); // which is T More context on w ...

When the button is clicked, Ajax fails to abort

Is there a way to cancel an ajax request when a button is clicked? I've tried some solutions I came across here, but none seem to work for me. <button type="button" id="toStop">Stop</button> Despite clicking the stop b ...

What is the best way to store jQuery selections in a cache?

I have a need to cache approximately 100 different selections for animating. Provided below is sample code. Is there an issue with the syntax in the second example? If this isn't the correct way to cache selections, it's definitely the most popul ...

Load a 3D object or model using three.js and then make modifications to its individual components

Seeking advice on displaying and manipulating a 3D model of a robot arm in a browser. How can I load the model into three.js to manipulate all the sub-parts of the robot arm? Using Inventor, I have an assembly of a rotary motor and a shaft exported as an ...