I spent a lot of time to understand how to get async data from web-services and to set it to vars in React
I need to try to change 'fetch' to 'axios'
(read more...)I spent a lot of time to understand how to get async data from web-services and to set it to vars in React
I need to try to change 'fetch' to 'axios'
(read more...)There are 5 buttons on a page. If you click 1, 3 or 4 there must be one action, for 2 and 4 another one. You don’t have to write the same action for each control, like this:
(read more...)Recently I started to learn ReactJS. I could manually install the environment in NodeJS for ReactJS – WebPack, ReactJS, Babel and others. But to make solutions easier, I decided to use Create-react-app. Unfortunately, I got the error "create react app npm ERR! Maximum call stack size exceeded".
(read more...)The task is to make clickable div tags. There are several div blocks in a page, each div contains a hyperlink with URL. You need to make so, that if you click on div element, you open a hyperlink.
(read more...)Javascript never had good ways to use multiline strings before ES6 had appeared. In ES6 you can use template literals – strings delimited by backticks instead of quotes, single or double. But what to do if you can not use ES6 possibilities?
(read more...)In SharePoint queries you should use date in the format 'yyyy-mm-ddTHH:MM:SSZ', for example, 2019-09-30T09:00:00Z. But the input form of the SharePoint datetime controls returns the value as 'dd.mm.yyyyy', the time value you will recieve in another way.
(read more...)I made a simple HTML page with JQuery UI tabs. But the customer asked to give URLs for each tab. I was a bit surprised with it, because I remember only how to make default tab on page load. You can do it with the syntax like this:
$("#tabs").tabs( { selected: x });
where 'x' is integer index of tab. So, the task was to determine which tab is requested.
(read more...)Snippet for AngularJS for working with checkbox controls. The task is to verify if checkbox is checked or not with AngularJS.
The syntax of jQuery code how to retrieve radio button items in cycle. For example, you have radio buttons with names, first you need to get them to array. For this case I will do it manually.
There's a control <select> on your page and you want to use it's value as selected and don't want to allow user to change it. Unfortunately, there's no attribute "readonly" for select as for <input> ones. You can use only attribute "disabled", but in this case its value will not be sent. But there's a trick how to do it.