Skip to content
Advertisement

Tag: jquery

setTimeout Polling crashed for intermittent internet connection

Hi I have a polling in javascript: But when a user got suddenly lost or has intermittent internet connection. The polling crashed. Any workaround to solve this issue? Answer What you’re doing isn’t really polling (as in periodically checking for updates and only performing an action if there was something to do). It’s just periodic refreshing of the page, by

How can i reduce to a more concise form my JS array

There is the following piece of code that I would like to reduce to a more concise form. I think I did not make the best decision at all. Simultaneously getting rid of the bug, which consists in limiting the operation of the program from arrays prescribed in advance in the code. Please tell me how it can be done.

Javascript Bootstrap Multiselect – Show search dropdown if no options available

I’m using bootstrap-multiselect (https://github.com/davidstutz/bootstrap-multiselect) and want to dynamically load the data similar to bootstrap multiselect search get value from database, but on initial start there are no option values available, then by default the search dropdown is not showing. How can I still open/show the search dropdown if no options are available? Here is a fiddle: https://jsfiddle.net/mwd4ag3h/ html: js: Answer

How to draw writable rectangles on images using JS

Liveworksheets is a website for students and teachers where teachers can upload files with questions then after uploading the file the teacher answers these questions and then send this file to students -without answers of course- to answer it. There are many ways that can teacher use to solve these questions but the way that matters to me is the

how to remove the appended elements in jquery

By right-clicking on each picture, the picture will be removed, and a new item will be created by clicking on the + button. But the problem is that the new items that are created (appended) could not be removed. Why is this the case? Answer Because those aren’t targeted by the event handler. It doesn’t automatically update the elements which

Ajax GET Request inside ajax post request?

Is it possible to make an ajax request inside another ajax request? because I need some data from first ajax request to make the next ajax request. I tried to make a script, but i see that instead of GET, my request is POST and i dont know where is the problem.. Answer My code works perfectly, the real problem

Advertisement