How To Generate a Random Password Using JavaScript | Password Generator JavaScript Project

  Рет қаралды 145,696

GreatStack

GreatStack

Күн бұрын

Пікірлер: 194
@agataerkaeva4226
@agataerkaeva4226 9 ай бұрын
I have just completed the 4th Your lesson - your lessons are amazing. Everything is clear and understandable. Thank you very much for your work!!!! Great job!
@lizayurchenko786
@lizayurchenko786 Жыл бұрын
To copy password: function copyPassword() { passwordBox.select(); navigator.clipboard.writeText(passwordBox.value); }
@mrmirzaa
@mrmirzaa Жыл бұрын
Thanks, it works for me
@tahashahid4186
@tahashahid4186 Жыл бұрын
Thanks sis
@asrnhalic3802
@asrnhalic3802 11 ай бұрын
thank you
@SachinShrivastav-ix6gb
@SachinShrivastav-ix6gb 7 ай бұрын
Thank you Ma'am for this code
@NO_N500
@NO_N500 5 ай бұрын
thnx liza❤
@babarshabbir2554
@babarshabbir2554 6 ай бұрын
"Excellent password generator tutorial! Clear, concise, and easy-to-follow. Great job!"
@RahulKumar-lv3el
@RahulKumar-lv3el 11 ай бұрын
function copypassword(){ passwordbox.select(); navigator.clipboard.writeText(passwordbox.value); }
@Godkabir88890
@Godkabir88890 6 ай бұрын
this is the easiest project , easy to understand for those whole starting making project after learning javascript
@chizomauzoma69
@chizomauzoma69 Ай бұрын
Thank you Sir If you want to remove the highlight once the select() is triggered use .display input{ Background: transparent; Color: inherit; }
@charonissimo7683
@charonissimo7683 5 ай бұрын
Many thanks for all of your Videos! I love them! Here I want to point to two things: 1) the lines from 32-35 in script.js are no more necessary 2) meanwhile the replacement for "document.execCommand("copy")" could be the Clipboard API of navigator. I am a newbe and please correct me, if I'm wrong. Thanks anyway cheers
@KardanKaaal
@KardanKaaal 3 ай бұрын
Completed this quiz app. Learning ++; Motivation ++; Worries --; Easy for beginners like me ❤
@K3llyrichard
@K3llyrichard Жыл бұрын
thank you very much for this beginner-friendly video. I really learned a lot, thank you very much👏
@alexsortovlog
@alexsortovlog Жыл бұрын
For the execCommand() function being deprecated I found that by replacing it with contentEditable works but it only selects the text it doesn't copy it. So it will be like this: function copyPassword(){ passwordBox.select(); document.contentEditable("copy"); } try it out if you don't have a problem with copying the password manually. Hope that helps!
@yashnarwar5774
@yashnarwar5774 Жыл бұрын
but the whole point was to having a function in the web app to copy the generated password ...... isn't it?
@ed_badilla
@ed_badilla Жыл бұрын
Here is another way to do it. I added an Id in the img tag and stored in the copyBtn variable. copyBtn.addEventListener("click", () => { navigator.clipboard.writeText(passwordBox.value); });
@hiitsme739
@hiitsme739 Жыл бұрын
Thanks for showing us another way of doing it. I hope it will be helpful for us in another project because document.execCommand("copy") is working on my project.
@ed_badilla
@ed_badilla Жыл бұрын
@@hiitsme739 yes it works but it is deprecated, I’m just sharing an alternative solution
@Shubham_Sinn
@Shubham_Sinn 10 ай бұрын
@@ed_badilla yes, this is the one i used...
@KrishanYtM
@KrishanYtM 5 ай бұрын
Best Teacher Clear Explanation 💝
@jamilrahmanmowahid7220
@jamilrahmanmowahid7220 5 ай бұрын
Thank you for this video. However, I have a quick question. why did you leave the four lines of code above the while loop which select only four letters. You could simply use only the while loop and it works just fine since we are combining all the uppercase, lowercase, symbols, and numbers with allChars variables.
@gustavofernandes5275
@gustavofernandes5275 Жыл бұрын
This solves the problem with the execCommand() function copyPassword() { passwordBox.select(); //This is just to make a visual effect navigator.clipboard.writeText(passwordBox.value); //This is the real deal }
@olawale11954
@olawale11954 Жыл бұрын
Great job I really love all your videos. God bless you.
@balogunadenike2680
@balogunadenike2680 2 ай бұрын
Thank you! Second project done successfully
@ashishkumar-jo7cj
@ashishkumar-jo7cj 9 ай бұрын
Why did you think of keeping the pattern of the password the same? It means that the upper letter will come first and then the lower letter. These too should have been random.
8 ай бұрын
Do you have this code in a document as well? Sometimes it's hard to follow along and see what's in the video even when I change the quality of the video
@Smed_pro_cam
@Smed_pro_cam Жыл бұрын
Thank you for your efforts. I want to make a website like KZbin using html, css and php
@developing01
@developing01 8 ай бұрын
I'm doing all your projects. Just one question...you could have done the responsiveness part, for when the user accesses via smaller devices, such as a cell phone.
@reninmohan2303
@reninmohan2303 7 ай бұрын
Use media query or clamp function in css
@sonamohialdin3376
@sonamohialdin3376 Жыл бұрын
Very useful tutorial thank you
@Mahin_katariya
@Mahin_katariya 9 ай бұрын
The code could run without calculating random of lowecase uppercase numbers and special symbols just use the while loop it will work 💪
@Soulcode-k
@Soulcode-k 2 ай бұрын
What a delight learning This ❤❤❤
@CanselHermes
@CanselHermes 2 ай бұрын
I did everything but I can't have random number , I cotrolled 2 times but who know where is the my mistake copy function worked but random fuction dont ..... (undefined)
@iamuzzalhossen
@iamuzzalhossen 6 ай бұрын
Very Easy! Thanks a lot!
@vishalgangde702
@vishalgangde702 Жыл бұрын
execCommand() function is deprecated so used this 👇👇 inputBox.select(); inputBox.setSelectionRange(0, 99999); navigator.clipboard.writeText(inputBox.value);
@am1rn
@am1rn 6 ай бұрын
I have a question and it is related to the 2 last videos which is the to-do list app. You mention in the javascript that you can save the data after refreshing and reopening the website. So I usually like to try what I learned from your videos to save the data in the input box which is the password but I failed. So can u explain to me how after clicking the generate password the password in the input box is there even after refreshing and reopening the website. It means a lot if you the creator of this video or any other people reading this helping me. Thanks :)
@dadi_vlogs3254
@dadi_vlogs3254 4 ай бұрын
1 - when you click on the generator input you should call this function to store the data in the local storage. function saveData() { localStorage.setItem("password", input.value); } 2 - after storing this password in the local storage you should call the function that brings this data from the local storage and put id down in the input. function showData() { input.value = localStorage.getItem("password"); } I hope you get it
@am1rn
@am1rn 4 ай бұрын
@@dadi_vlogs3254 it work thanks alot 👍😉
@priyapajjuri3517
@priyapajjuri3517 4 ай бұрын
Its amazing it works completely
@reyaguddin3786
@reyaguddin3786 11 ай бұрын
Hello sir, I've created this project by following your tutorial & it's working fine. But I want to this app work perfect in any device (for example: desktop, tablet, mobile, mini-device or other) with responsible. How it Possible? or how can fix this issue?
@51anmolvishwakarma73
@51anmolvishwakarma73 3 ай бұрын
you can use media querrry for ths kind of functionality
@Curse_King359
@Curse_King359 Жыл бұрын
Somebody explain to me cause my create password method not executing,whenever i click on the generate password it is not generating.
@LetsStudyWithW_A-tx6qi
@LetsStudyWithW_A-tx6qi Жыл бұрын
Thank You so much for this tutorial
@kingharji9170
@kingharji9170 3 ай бұрын
Amazing content buddy, Keep it up 🦾👍
@GreatStackDev
@GreatStackDev 3 ай бұрын
Glad you liked it. 😊
@Manishaisha-qd3gl
@Manishaisha-qd3gl 6 ай бұрын
very nice explanation
@NanoTroller2
@NanoTroller2 Жыл бұрын
Omg now i have something to show to my teacher
@medimed-su3ir
@medimed-su3ir 3 ай бұрын
You are good bro, honestly 💢👌👌
@Ajjaymahto
@Ajjaymahto 5 ай бұрын
this is very helpfull for me
@GreatStackDev
@GreatStackDev 5 ай бұрын
Glad you liked it. Thanks for your comment. 😊
@sandamalgamage1242
@sandamalgamage1242 Жыл бұрын
Thank you for this great tutorial❤❤
@dating_decodedd
@dating_decodedd 4 ай бұрын
loved it! perfect for beginners. Thank you so much!
@romerouelle
@romerouelle 4 ай бұрын
fourth project! lets gooooooo
@Modrex.Dev0
@Modrex.Dev0 Жыл бұрын
Good Job Man
@khorshedalam1732
@khorshedalam1732 Жыл бұрын
Hello sir, I've created this project by following your tutorial & it's working fine. Only one confusion that, execCommand() function is working fine but showing deprecated. Is it a problem & how I can solve it?
@Tamanna4140
@Tamanna4140 Жыл бұрын
I am having the same issue. can anyone help with this.
@vedantzanjad
@vedantzanjad Жыл бұрын
function copyPassword() { const copy = passwordBox.value; navigator.clipboard.writeText(copy); } @@Tamanna4140
@vedantzanjad
@vedantzanjad Жыл бұрын
function copyPassword() { const copy = passwordBox.value; navigator.clipboard.writeText(copy); }
@ayushpawar3871
@ayushpawar3871 Жыл бұрын
​@@vedantzanjadthanks bro
@HinataShiro-l7q
@HinataShiro-l7q 9 ай бұрын
he wrote const lenght = 12:(why he is not getting error ?and my onclick generate password code is not running but my onclick copy code is running plz help me
@PrathamChaurasia-o8z
@PrathamChaurasia-o8z 7 күн бұрын
the length should be greater than or equal to 12 @16:12
@coding_with_sipai_313
@coding_with_sipai_313 3 ай бұрын
My program is successful ❤
@tech.and.coding
@tech.and.coding Жыл бұрын
Thank s a lot sir 😊
@TajjCreative
@TajjCreative 8 ай бұрын
You are doing great
@xseenozx3856
@xseenozx3856 Жыл бұрын
can we use their java for password creating code or not and if we creat then how to do with java code
@umakumarirajput9857
@umakumarirajput9857 Жыл бұрын
UndefinedUndefinedUndefinedUndefined problem, how to fix it?
@bananainacup
@bananainacup Жыл бұрын
Yes me too
@aimanshaikh4368
@aimanshaikh4368 6 ай бұрын
Same problem i am also facing..what to do.."create password is not defined"
@thepralad1484
@thepralad1484 5 ай бұрын
You probably called Math.random() without brackets.
@ManishKumar-jx4tq
@ManishKumar-jx4tq 5 ай бұрын
Lenght convert length 😂😂
@NO_N500
@NO_N500 5 ай бұрын
give code 😂😂
@antcannon
@antcannon Жыл бұрын
Very nice video. It would be helpful to slow down alittle bit, although know we can pause and replay.
@readyok8230
@readyok8230 10 ай бұрын
There is also an option to slow down the video playback speed to lower than 1x.
@orangeapple681
@orangeapple681 9 ай бұрын
So I made a typo (line 12) that kept this from working. Make sure password for the input type id is lowercase so that it can be triggered by the functions, while the placeholder="Password" capitalization doesn't really matter since its just literally telling the HTML the word 'Password' needs to be in the white box. Also there's a typo in line 37 (lenght instead of length). Not sure why that didn't cause issues when he was running the code. The typo is also saved in the tutorial document. while(length > password.length){
@bubairoy5815
@bubairoy5815 Жыл бұрын
Pls. create a tutorial video about Facebook, Instagram video downloader website
@fabihasheikh1305
@fabihasheikh1305 8 ай бұрын
Great tutorial
@bananainacup
@bananainacup Жыл бұрын
So the different characters don’t need to be an array?
@kshmrkshmr8364
@kshmrkshmr8364 Жыл бұрын
Sir what is your code editor tell me please.
@prabhatraidas2511
@prabhatraidas2511 Жыл бұрын
Vs code bro
@christopherkibunyi5774
@christopherkibunyi5774 9 ай бұрын
what's the shortcut for writing all symbols and letters?
@alfredkonneh2963
@alfredkonneh2963 Жыл бұрын
Sir how you learned all this html, css and Javascript
@fede018
@fede018 Жыл бұрын
Why are you doing the java part on the html file? that's not what scrimba teaches. You're not using the characters provided either.
@srivigneshcreations.9204
@srivigneshcreations.9204 Жыл бұрын
Tq sir.
@melwinsanthosh8135
@melwinsanthosh8135 Жыл бұрын
Bro can you please make a vehicle service system project with database and repair help
@gomeztorricellygomez7808
@gomeztorricellygomez7808 10 ай бұрын
works like charm....
@learnwithnagma
@learnwithnagma 8 ай бұрын
Thank you 😊.
@jansenval
@jansenval 11 ай бұрын
why does the password generated only four when i did it?
@mohi7109
@mohi7109 Жыл бұрын
how we can show a messaged "copied" when click the copy button?
@JackedHariom
@JackedHariom Жыл бұрын
You have to add alert than it will as a alert
@FullSTACKDev16
@FullSTACKDev16 Жыл бұрын
Very Cool Bro
@Spychu1993
@Spychu1993 11 ай бұрын
1:24 - why the font 'Poppins' in in quotes but sans-serif is not?
@srushtipm227
@srushtipm227 11 ай бұрын
beacause sans-serif is inbuilt in vscode and poppings we usually import
@Spychu1993
@Spychu1993 11 ай бұрын
@@srushtipm227 oh ok, thanks!
@shubhamrathod9249
@shubhamrathod9249 6 ай бұрын
Thank you!
@ZanderKodehode
@ZanderKodehode Жыл бұрын
Thanks so much🙂
@Sporty1877
@Sporty1877 11 ай бұрын
Generate password is not working. The error code displayed from the console is that "Math is not defined " 😢 Someone should help me please 🙏
@BohemianOnTheRoad
@BohemianOnTheRoad Жыл бұрын
bro you should keep the name easy tutorial.
@nattu_kun
@nattu_kun Ай бұрын
Moj 😊
@sdfsfsfd437
@sdfsfsfd437 Жыл бұрын
Great video! 💯💛
@FlyhighBigwings
@FlyhighBigwings Жыл бұрын
execCommand in the function "copyPassword" doesn't work, is there any other way to go about this cause when I try to paste I don't get what I copied
@FarmanAli-y4x4q
@FarmanAli-y4x4q 11 ай бұрын
function copyPassword() { const copy = passwordBox.value; navigator.clipboard.writeText(copy); }
@voiid888
@voiid888 Жыл бұрын
i think the JS code lines from 32 to 35 are useless, it works without it
@FarmanAli-y4x4q
@FarmanAli-y4x4q 11 ай бұрын
you are right, I also didn't use these lines and its working properly
@dedicatedrishi
@dedicatedrishi 11 ай бұрын
Are you fool ? That is the function which generating random things in js
@SILENTKILLER84838
@SILENTKILLER84838 Жыл бұрын
Hi sir AAP muje coding ki file deskte ho kay he vali
@mek059
@mek059 7 ай бұрын
Why is the input type for the password is text instead of password?
@sumitraina24
@sumitraina24 6 ай бұрын
Because you want to generate the password here and hence the password should be visible to us . if you place type as password instead of text then the password will be encrypted .
@abdulbasith1536
@abdulbasith1536 Жыл бұрын
thank you dude
@vedantzanjad
@vedantzanjad Жыл бұрын
Thank You
@FlavorsofLifeVlogs
@FlavorsofLifeVlogs 11 ай бұрын
how Can I Display message "Message copied" on clicking in copy icon . Can any one help me with this Please
@PhurailatpamGirishSharma27
@PhurailatpamGirishSharma27 4 ай бұрын
execCommand is not working in my VS code, it's not allowing me to write it
@Pedr0Henriqu3
@Pedr0Henriqu3 3 ай бұрын
The same is happening with me. There is a line through it and it doesn't work.
@utinthein7274
@utinthein7274 Жыл бұрын
In my vscode (execCommand) is line-through, Why? Sir.
@yashnarwar5774
@yashnarwar5774 Жыл бұрын
Same here please let me know if you find the reason or the solution
@SAMRAT_SNGH
@SAMRAT_SNGH Жыл бұрын
❤❤❤❤❤❤love you bro
@cpl2116
@cpl2116 8 ай бұрын
How do i get the font poppins?
@kazutoravfx
@kazutoravfx 4 ай бұрын
the lines of code from line 32 to 35 are practically useles...
@Haat02
@Haat02 4 ай бұрын
Why 😮😮😮😮
@mahesheditz
@mahesheditz Жыл бұрын
thankyou sir
@vishalbhardwaj4999
@vishalbhardwaj4999 6 ай бұрын
Can anybody explain me the javascript part... What is the alternative to document.getelementbyId
@yihffjjg
@yihffjjg 5 ай бұрын
It is used when you have something in "id="
@rajnikantjoshi6697
@rajnikantjoshi6697 Жыл бұрын
i have to restart my browser to refresh the page, how can i set it to Auto refresh
@rounakyadav17
@rounakyadav17 Жыл бұрын
Same
@yashnarwar5774
@yashnarwar5774 Жыл бұрын
dowload the live server extention in vs code and then right click in the html file you will find the option for the live server somewhere in the bottom ........ walllhaaa propblem solved
@mahimkhan9561
@mahimkhan9561 7 ай бұрын
mine is not working
@vrzshortcreator8478
@vrzshortcreator8478 Жыл бұрын
I have written all code exactly in what manner you did but ,it is not working 😢
@purpleshinee7700
@purpleshinee7700 9 ай бұрын
I am facing the same issue
@rajesh__singh
@rajesh__singh 9 ай бұрын
Just take the idea bro don't copy exect 😂
@KiranKumar-zt9mn
@KiranKumar-zt9mn 8 ай бұрын
​@@rajesh__singh bro thanks for this suggestion thank you very much great
@aymenbachiri-yh2hd
@aymenbachiri-yh2hd Жыл бұрын
awesome
@asrnhalic3802
@asrnhalic3802 11 ай бұрын
doesn't work copy for me please help
@majestic775
@majestic775 2 ай бұрын
Which theme is this?
@Islamic_content92
@Islamic_content92 Жыл бұрын
Source code plzz😢
@adxxsh735
@adxxsh735 8 ай бұрын
I want to reset the password into a blank again as soon as I click on copy? Any suggestion anyone?!
@reninmohan2303
@reninmohan2303 7 ай бұрын
Try Create a button for on click the button and set input element inner text to empty string.
@anujchaudhary4724
@anujchaudhary4724 3 ай бұрын
Add event listener of that copy clipboard icon when you clicked it just remove that password eg password.innerText =''
@shamrankatalemwa7005
@shamrankatalemwa7005 6 ай бұрын
Mine is not working how to fix
@subegsingh5658
@subegsingh5658 11 ай бұрын
if i want the user to give me number of characters for the password, how do i do it. I'm trying (" Number of characters: var userInput = document.getElementById("char_input").value; var length= userInput; "). can anyone please help me out
@FarmanAli-y4x4q
@FarmanAli-y4x4q 11 ай бұрын
you are doing correct but just put that code" var userInput = document.getElementById("char_input").value; " inside function
@sage-wale
@sage-wale 4 ай бұрын
thanks guru :)
@sougatalegend6601
@sougatalegend6601 Ай бұрын
I used api to do this
@musabpatel8621
@musabpatel8621 Жыл бұрын
Font Theme?
@niranjanvanka376
@niranjanvanka376 Жыл бұрын
Please create animation forms
@AreeshaFatima-m6k
@AreeshaFatima-m6k Жыл бұрын
generate button is not working
@Mohammed_c212
@Mohammed_c212 11 ай бұрын
I tried to make projects from great stack they never work these indian scammers so dumb
@captaindragoyt777
@captaindragoyt777 Жыл бұрын
Nic3
How To Build Notes App Using HTML CSS and JavaScript
25:21
GreatStack
Рет қаралды 145 М.
How To Create Image Search Engine Using HTML CSS and JavaScript
34:37
Из какого города смотришь? 😃
00:34
МЯТНАЯ ФАНТА
Рет қаралды 2,5 МЛН
If people acted like cats 🙀😹 LeoNata family #shorts
00:22
LeoNata Family
Рет қаралды 15 МЛН
How is this Website so fast!?
13:39
Wes Bos
Рет қаралды 1 МЛН
Build a JavaScript random password generator 🔑
12:05
Bro Code
Рет қаралды 20 М.
Password Generator in HTML, CSS & JavaScript
28:22
Tyler Potts
Рет қаралды 4,5 М.
Build this JS calculator in 15 minutes! 🖩
15:20
Bro Code
Рет қаралды 663 М.
10 JavaScript Projects in 10 Hours - Coding Challenge 🔥
9:17:09
Florin Pop
Рет қаралды 2,8 МЛН
JavaScript Project | Image Search App With JavaScript API
48:19
Tech2 etc
Рет қаралды 232 М.
Из какого города смотришь? 😃
00:34
МЯТНАЯ ФАНТА
Рет қаралды 2,5 МЛН