1767 2
How to generate random string using javascript?

Hi, I would like to generate the random string using javascript? How can I achieve it?

Any length of string would work but if possible I would like to have a random string of 6 characters.

...
Type
Question
1760 2
How to get difference between two dates in javascript?

I would like to get Difference between two dates using javascript or jQuery in simple way.

How can I do that, for example

...
Type
Question
1747 2
what's the difference between javascript substr and substring?

What's the difference between the javascript substr and substring, which is better to use and when?

...
Type
Question
1734 1
Detect if an element is hidden or visible in jQuery-javascript?

I am trying to check if Ads are visible or not(blocked) when user loads my web-application page, if not show a message, which is already hidden by default,so how can I detect if an element is visible in the current page after loading it, and if is not-visible make it visible(some other div to show user's a message to load ads on my website and support us) using jQuery or javascript?

Also is it possible to toggle the visibility of an element, using the function toggle() or any other function?

Thanks

...
Type
Question
1632 1
how to open new tab and insert content in it using javascript?

How can I open a new tab using javascript or jquery and insert new dynamic content in it? Bypassing the pop-up issue also, as I need to show a .pdf file in new window, but you can show me the code of opening and showing HTML in it, I will handle the pdf part.

Thanks

...
Type
Question

1626 0
Implementing Javascript Drag and Drop using HTML5
In this article, I have explained how you can create drag and drop functionality in HTML 5 page using Javascript.
Type
Article
1543 0
Read or Generate QR Code using Javascript
In this article, I will provide you sample JavaScript code to read or generate qr code, basically how to generate qr code using Javascript.
Type
Article
1516 1
Console error "Syntax error Unexpected token 'export' popper.min.js"

I am using below scripts in my page and have included popper.min.js using CDN but getting an error, "Syntax error Unexpected token 'export' popper.min.js"

    <script src="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.5/js/select2.full.min.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.15.0/popper.min.js"></script>

Here is the error image, take a look

...

Type
Question
1515 2
how to loop on JSON result & show it to user using jquery?

I am getting JSON result from my C# MVC controller into front end using Ajax call

...
Type
Question
1506 2
not able to access iframe contents using jquery or javascript

I was trying to manipulate HTML inside iframe using jquery-javascript, I am trying something like this

...
Type
Question

Page 6 of 9