javascript

How do I clear form fields using jQuery?

There is a page in which there are a number of different elements. It is necessary to return them to their original state (as ... age). It's not nice to do that: $('#name').val(''); For each form? Do you have any options on how to make it more beautiful?

Combine two functions into one

There are two functions that are called when you click on the buttons, these functions work as they should. You need to make ... t have en - it no longer works here. How can these two functions be made one and the same? hang on the input{[1] event]}

Add new chat messages in title

Good day to all, please help us solve this problem. There is a chat, and I want to do such a thing, when a person is sitting ... can update it constantly, without necessarily finding a person on this tab? The analog can be seen in the Vkontakte dialogs.

How to send a POST via axios to telegra.ph API?

I send a post to the telegraph API using axios. post () in nodejs. in response, I get that the token is invalid. although, if ... og(data.data) } }).catch(err => console.error(err)) Here is the API documentation https://telegra.ph/api

chrome extension how to open ' popup` using javascript

I ran into a problem. I try to open the extension window using javascript, but it doesn't work like that. chrome.pageAction.show(tabID); It is necessary that, under a specific condition, the window automatically opens.

changing the image when hovering over the div

Good time of day I have a div with the test class and when you hover over the div you need to change the image I tried to wri ... stand where the error is if ($(".test") hover(handlerInOut(eventObject))){ $(".test").attr("src", "img/Vector4.png"); }

How to selectively disable JS in Chrome?

That is, the question is not what to disable JS in the browser settings, but what to do when you are brought to visit a hacke ... the browser in the most prominent place.. however, I didn't even find it in the console. Or not there I was looking for it..

the user establishes a link between objects on the konva canvas.js using lines

An application on "Webix", which should graphically display the connections between incoming data (input) that pass through s ... s"></script> <script type="text/javascript" src="script.js"></script> </body> </html>

jQuery DOM-add, remove nodes

There is no way to implement such a task: when you click on $("div.block") , a new element <div></div> should app ... 't figure out how to add an element; more precisely, I can't figure out how to get to the element from which it can be added.

How to style input type = "password"?

I need to style input like this http://prntscr.com/r46e70 How can I do this WITHOUT replacing the input type with text? Thanks!!!

Why is the click event triggered automatically? JS

Faced with such a problem: When you assign an event click to an element when you open a web page, this same click is triggere ... will be triggered anywhere on the screen and call the corresponding function. What is the problem, and how can it be solved?

Data transfer client-server Express, nodejs

I'm trying to transfer data from the client to the server, but I don't understand. HTML: <!DOCTYPE html> <html lan ... I'll try to pass the value from input. Tell me why console. log(name) is not output, I do not understand what is happening!!

Jquery drag and drop adding to input file

Good evening. Can you tell me some examples of adding using drag and drop the path to the file in input=file?

Opening a link in a new tab using JS

Good afternoon, everyone. There is the following code that is triggered on the click event: var idzakaz = $(this).next('.iden ... it opens not in a new tab, but in a new window. Can you tell me how to get rid of this and make both links open in new tabs?

Replacing the backdoor-filter

You only need to blur the background of the block. I know there is a backdrop-filter property for this, but it is poorly supp ... : white } <div class="block">adadwd</div> How can I blur only the background of the block in this example?

Pop-up feedback form when you hover over the image

How do I make it so that when you hover over the image, a modal window opens with a feedback form?

Sorting a table by html+php columns

Please tell me if it is possible to somehow sort the data in the table by columns using js rather than sql queries. My data i ... '.table_sort thead').forEach(tableTH => tableTH.addEventListener('click', () => getSort(event))); }); </script>

Fancybox-passing parameters

Good day, hello everyone. That's what day I'm messing with fancybox and I can't figure out how to pass the values from the mo ... rameters from a modal window to a page /index.php Thank you in advance for your answer. I will be very grateful for any help.

WebSocket in Django

I started working with websockets for the first time in my life and this error occurred. I have already used the tips to inst ... l" async def websocket_view(socket): await socket.accept() await socket.send_text('hello') await socket.close()

Get the value from the Redux Store

There is a movie reducer const initialState = { movies: [], movie: {} }; const moviesReducer = (state = initialState ... e reason in the child component, I get a new version of the repository that no longer filled with movies. What is the reason?