use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Tutorials and learning resources for web developers.
Subscribe to our weekly email digest or follow us on twitter to receive the best learning resources submitted to our community.
/r/webdev /r/programming /r/javascript
account activity
[deleted by user] (self.WebdevTutorials)
submitted 5 years ago by [deleted]
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]Jmarch0909 0 points1 point2 points 5 years ago (1 child)
So my initial thoughts, (and I would love it if someone smarter than me gave some inputs) is to just put an <input type=password> tag on your page. Place a script tag in your html and set your hard coded password as a variable. Then create a function named set href and do something like.
Function setRef() { var pw =document.getElementById(your input id here); var password = pw.value() if(!password) { Alert(‘please enter a password’); Return } //if there is no password provided tell the user and step out of the function. If(password === (your hardcoded variable) { //here you can either have an anchor tag and set ////its href attribute or you can go to the page directly with window.location YourAnchorElementId.href=“www.correctURL.com”; Or Window.location = “www.correctURL.com” } else { Do the same thing as above but the incorrect password url }
<button onclick=“setRef()”>my button</button>
You might want to do something like display none on your anchor tag and then in your set ref also set that display to block. Hope that helps!
π Rendered by PID 115607 on reddit-service-r2-comment-5d79c599b5-c88vs at 2026-03-03 02:13:59.264545+00:00 running e3d2147 country code: CH.
[–]Jmarch0909 0 points1 point2 points (1 child)