Skip to content

Author: admin@master

how to get highlighted text positions using jquery

I am trying to create a text highlighter. below is the example of the html structure. If I select the word “Lorem” from the second div, I should be able to capture the starting character position and ending character position, and add a span tag around it with a class. this will highlight the back…

Get battery level JavaScript

/! THE USE OF window.navigator.battery IS STRONGLY DISCOURAGED AND THIS ISSUE IS NOW NOT WORTH CHECKING THANK YOU /! I want to get the battery level of the current system. Here is the output I intend to get: If desktop (no battery) Battery level : 100% If laptop Battery level : XXX% (depending the level) So I…

Reset Password Using Html and javascript

I Have a requirement where i have 3 input fields namely 1.old password 2.new password 3.confirm password. For which i need to apply rules as follows. 1.Old and new passwords should not match. 2.No field should be empty. 3.New password and confirm password inputs should be same. If all these validations passes…

How to change iframe source

the issue is that I’m trying to develop a web site and I’m using Google Web Design. So far so good. I’ve inserted an iFrame and I want to change it’s source when I’m pressing a button. Every search that I’ve googled speaks about “src” but my iFrame has “so…

Close Bootstrap modal on form submit

I have a Bootstrap modal dialog which contains a form. The modal dialog contains a submit and a cancel button. Now on submit button click the form is submitted successfully but the modal dialog isn’t getting closed. Here is my HTML: Anybody knows how to do this? Answer Use that Code