The loading of the Bootstrap tagsinput has encountered an error

I am facing an issue with my Django application where tags are not loading properly in an input field using jquery. It seems like the application is unable to locate the bootstrap-tagsinput.css and bootstrap-tagsinput.js files. Can anyone provide guidance on where these files should be placed for proper detection?

Error

[28/Feb/2018 12:14:23]  "GET /scripts/bootstrap-tagsinput.css HTTP/1.1" 404 2191
Not Found: /scripts/bootstrap-tagsinput.js
[28/Feb/2018 12:14:23] "GET /scripts/bootstrap-tagsinput.js HTTP/1.1" 404 2188
Not Found: /scripts/bootstrap-tagsinput.js
[28/Feb/2018 12:14:23] "GET /scripts/bootstrap-tagsinput.js HTTP/1.1" 404 2188

Project Directory Structure

<project_name>
|--<app_name>
|     |--templates
|            |--index.html
|--<project_name>
|--scripts
|     |--bootstrap-tagsinput.css
|     |--bootstrap-tagsinput.js
|--manage.py

Code

<!DOCTYPE html>
<html lang="en">
<head>

    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/2.3.2/css/bootstrap.min.css">

    <link rel="stylesheet" href="../scripts/bootstrap-tagsinput.css">

    <title>Sample</title>

</head>

<body>

    <input type="text" id="tagbar" />

    <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>

    <script src="../scripts/bootstrap-tagsinput.js"></script>

    <script type = "text/javascript" language = "javascript">
         $(document).ready(function() {
            $('#tagbar').tagsinput('add', { "value": 1 ,"text": "Amsterdam"  ,"continent": "Europe"    });
            $('#tagbar').tagsinput('add', { "value": 2 ,"text": "Washington" ,"continent": "America"   });
            $('#tagbar').tagsinput('add', { "value": 3 ,"text": "Sydney"     ,"continent": "Australia" });
            $('#tagbar').tagsinput('add', { "value": 4 ,"text": "Beijing"    ,"continent": "Asia"      });
            $('#tagbar').tagsinput('add', { "value": 5 ,"text": "Cairo"      ,"continent": "Africa"    });
         });
      </script>
</body>
</html>

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

Tips on stopping tags from being deleted in select2

Is there a way to customize a select2 widget with tags:true so that tags can only be removed by clicking the "x" button in the tag instead of simply clicking on the selected item in the drop-down menu? ...

Display only alphabetic characters in the text field

I have a jQuery function that I am working on: $('#contact_name').on('input', function() { var input=$(this); var re =/^[A-Za-z]+$/; var is_email=re.test(input.val()); if(is_email) { } else { } }); This function is targeted at the fol ...

Syntax for chained arrow functions

const retrieveData = link => dispatcher => { // ... } export const fetchInfo = searchTerm => (dispatcher) => { return dispatcher(retrieveData(searchTerm)); }; What role does dispatcher play in the retrieveData function? Is link the only p ...

Double submission with JQuery .post

I am struggling to prevent this JQuery POST call from being submitted twice. I have attempted various versions of unbind but do not fully comprehend how it works. While I have come across similar queries, they only mention using unbind without delving int ...

What is the best way to incorporate a @types module into a TypeScript file that is not already a module?

Setting the Stage: In the process of shifting a hefty ~3,000 line inline <script> from a web-page to a TypeScript file (PageScripts.ts) to be utilized by the page through <script src="PageScripts.js" defer></script>. This script entails ...

jQuery behaving erratically following deployment to the testing server

I am encountering an issue with jQuery in a user control that utilizes a Telerik RadGrid: <script src="http://ajax.aspnetcdn.com/ajax/jQuery/jquery-2.1.4.js"></script> <script type="text/javascript"> ...

Waiting for a React ref to become available after being rendered in a separate container: A guide

Revised: clearer explanation The scenario: A plain HTML code is received from a third-party server, with the intention to embed in a React application make modifications to it The traditional JavaScript approach The string can be modified using reg ...

Can you explain the distinction between these two forms of functional components in ReactJs?

What sets apart these two code usages? In the FirstExample, focus is lost with every input change (It appears that each change triggers a rerender).. The SecondExample maintains focus and functions as intended. example import React, { useState } from &quo ...

Background image that covers the entire page

I am using background-size:cover to ensure that the entire background positioning area is covered by the background image. However, I've noticed that setting it to "cover" sometimes cuts off parts of my background image. Is there another way to achiev ...

Investigate the presence of a vertical scrollbar using JQuery or JavaScript

Within an HTML report, I have applied the style "overflow:auto" to allow for dynamic data filling. I am now facing the challenge of detecting whether a vertical scrollbar exists within the report. After scouring various forums for solutions, I came across ...

What is a global variable used for in JavaScript?

Here is the code snippet that I am currently working on: $(".link").each(function() { group += 1; text += 1; var links = []; links[group] = []; links[group][text] = $(this).val(); } ...

Removing all HTML elements within the div container

My HTML code includes the following: <div class="row" id="conditional-one"> <div class="large-12 columns"> <h3><?php echo $arrayStage_rule_one_title?></h3> <p> <?php echo $arrayS ...

To send an array of input data to JQuery

I have a requirement where students need to answer questions (retrieved from a database) using a foreach loop. Once all answers are filled, I need to pass them to jQuery and then to the controller to save in the database. <div> <tbody> ...

Disabling the camera feed in a React application

Attempting to turn off the webcam using javaScript in React has been a bit challenging. Whenever I shift to a new component or when a component is destroyed, my react component immediately moves to the next page, but the webcam light remains on in the new ...

How to properly handle string escaping within a JSON object

When I send this object as JSON response, it includes double backslashes in the URL. {"__type":"http:\/\/example.com\/contracts\/documents\/rendering\/instructions\/1\/0"} My desired response is: {"__type":"http:& ...

Implementing an active class to an element based on the current URL using Jquery in Django

Is there a way to dynamically add an "active" class to an element based on the href? This is what my template in Django looks like: <div class="panel side-panel-1 category"> <h4 class="title1">Sections</h4> <ul class="clear-list"> ...

Attempting to use jQuery AJAX to submit data without navigating away from the current webpage

Trying to implement the solution provided in this post where I am trying to send data to a PHP page and trigger an action, but unfortunately, it seems to just refresh the page without any visible outcome. Even after checking the network tab in the element ...

Tips for returning JSON data using AJAX

When working with native JS, I am familiar with using AJAX to display the output from PHP/mySql that is not Json Encoded in the element "some_id" like this: <script> function addItem(value) { xmlhttp = new XMLHttpRequest(); xmlhttp.onrea ...

Utilize AJAX JQuery to Transmit POST Data

I am facing an issue with sending the selected item from a Bootstrap dropdown to my controller using the POST method. Unfortunately, I am encountering difficulties in getting it to work. Within the dropdown, I am fetching records from the database and dis ...

Iterate endlessly over CSS styles in Angular 4

I'm looking to create a website background 'screensaver' by looping through an array of background URLs with a delay between switches. Currently, I have the array stored in my .ts file and I am using the NgFor directive in my HTML. However, ...