Skip to main content

Posts

@googlemaps/js-api-loader is a bare specifier

I am trying to pragmatically load the google maps using the Maps Javascript API. Though the initial version of appending the key to the script tag of the html page is working, I am trying to hide the API key in the javascript file. This is the code according to google docs: import { Loader } from "@googlemaps/js-api-loader"; let map; const additionalOptions = {}; // [START maps_programmatic_load_promise] const loader = new Loader({ apiKey: "YOUR_API_KEY", version: "weekly", ...additionalOptions, }); loader.load().then(async () => { const { Map } = await google.maps.importLibrary("maps"); map = new Map(document.getElementById("map"), { center: { lat: -34.397, lng: 150.644 }, zoom: 8, }); }); I inserted the correct API key and I got this error: Uncaught TypeError: The specifier “@googlemaps/js-api-loader” was a bare specifier, but was not remapped to anything. Relative module specifiers must start with “./”, “...

Web Sitemi Smart Tv Kumandası ile nasıl kontrol edebilirim [closed]

Birden fazla film dizi ve fragman içeren Wordpress web sitemi akıllı tv de yer alan herhangi bir tarayıcıdan Smart Tv kumandası sile nasıl kontrol edebilirim bunun için gerekli kodlar nelerdir ve halihazırda wordpreste eklenti mevcut mudur yardımız için şimdiden teşekkürler. bunu web siteme nasıl entegre edebilirim yardımız için şimdiden teşekkürler Via Active questions tagged javascript - Stack Overflow https://ift.tt/qvrRoY7

Azure Active Directory Authentication within Streamlit

I am trying to test an Azure Directory Authentication within a streamlit app, when I do this on my http://localhost:8501 it works perfectly as expected. Hitting the login button prompts me to login on the Microsoft authentication page and returns the token values in a dictionary. however, when I have other users on my network test this by accessing the app on my network url, when they hit login the Microsoft authentication popup on Chrome opens up on my machine instead of theirs. I cant seem to understand whats causing this and would appreciate any insight. import streamlit as st import msal import webbrowser import requests from selenium.webdriver.support.ui import WebDriverWait from selenium import webdriver from selenium.webdriver.support import expected_conditions as EC import urllib client_id = "xxxx" tenant_id = "xxxx" client_secret = "xxxx" redirect_uri = "http://localhost:8501/" scopes = ["https://graph.microsoft.com/.default...

Captcha and session problem in Ajax Form?

The form works fine without captcha, but it only works 1 time when I add captcha. and captcha numbers always stay the same. In ajax form, I want the captcha to be refreshed after every submission, that's why I added it but it's not working either. img = document.getElementById("capt"); img.src = "captcha.php" Thank you in advance for your help on how to solve this problem. index.php <!DOCTYPE html> <head> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.0/jquery.min.js"></script> </head> <body> <form name="checkaddress" id="checkaddress" method="post"> <input type="text" id="v" value="" name="v"><br> <img src="captcha.php" id="capt"> <input type="text" size="10" name="deger" id="deger"> <butto...

filepond library and plugins not being detected

I am learing Node.JS by webdevsimplified and i am developing a book library website and i am facing an issue. I have imported a filepond library and some plugins. They are working perfectly fine when i try to add a new book but when i try to edit an existing book the filepond library does not appear to be working then if i try to edit image then it throws an error an automatically filepond start to work i have debugged everything and i can not understand why is this happening. this is what comes up and everything works without error except the cover updation. if i try to update cover it throws an error and then shows the page that is originally intended to show Some Code related to edit routes books.js router.get('/:id/edit', async (req,res)=>{ try { const book = await Book.findById(req.params.id) renderEditPage(res, book) } catch { res.redirect('/') } }) // Update book route router...

Javascript check radio clicked [closed]

Image code(send-checkbox I have two radio input, one has email label and another one phone label, have created a container, so in that container I what when some click on email radio email container shows and when click on phone radio, phone container shows I what when I click on email radio the email container shows and when I click on phone radio the phone container displays Via Active questions tagged javascript - Stack Overflow https://ift.tt/F860hCZ

addEventListener multiple times in a click event

I have a problem trying to catch a event in a javascript file. I need to handle some buttons when these are clicked. They have differente behaviour, for example, some add some elements, other can multiple add elements, or delete them. I have 4 buttons in a panel (search, add, add+ and delete). To be precise, I'll explain the problem with the search button. I have a function "search" that takes the button from de document, and link to a eventListener btn_search = document.getElementById('searchBtn'); btn_search.addEventListener("click", search); Then, after click over btn_search, a modal display with some inputs and a submit button. When I click over the button, the modal closes with the data that I need. In this situation the system works well, but when I want to operate with another functions (add, delete, or the same search), this last tasks execute but all the other previous operations executes too. It's as if repeat all the secuence together ...