- This topic is empty.
-
AuthorPosts
-
February 11, 2015 at 5:18 am #195576JamesBarnsleyParticipant
submit needs to be onsubmit. I re-corrected my post a couple of seconds after I posted the original.
<form onsubmit=”pasuser(this)” name=”login”>
February 11, 2015 at 5:21 am #195577Historical Forums UserParticipantNearly! It works on an incorrect password (invalid password dialog box) but on a correct password it puts the password into the address bar again. Also the button does not work when the password is correct.
February 11, 2015 at 5:22 am #195578JamesBarnsleyParticipantCan you paste the whole script into CodePen again?
February 11, 2015 at 5:23 am #195579February 11, 2015 at 5:32 am #195580JamesBarnsleyParticipantOk, do you onsubmit like this …
onsubmit=”return pasuser(this);”
And put the following …
return false;
Just before the closing last } of your pasuser function.
February 11, 2015 at 5:36 am #195582Historical Forums UserParticipantYou sir, are a legend. Thankyou for your time.
February 11, 2015 at 5:36 am #195583JamesBarnsleyParticipantIt is working now I take it?
Glad I could be of service.
February 11, 2015 at 5:37 am #195584Historical Forums UserParticipantYes it works perfectly.
February 11, 2015 at 5:37 am #195585JamesBarnsleyParticipantOk good.
February 11, 2015 at 8:45 pm #195733Historical Forums UserParticipantHi,
Yeah it’s not a big deal. Open to suggestions on how to make it more secure. I originally had a javascript “gatekeeper” script that would go to the page that you type in (eg jasper.html) but for some reason I can’t remember, that didn’t work.
I eventually want to work out how to set up accounts for people and have them type in a unique password for RSVPing online but I’m a way off that at the moment with my knowledge of all this.
Thanks.
February 12, 2015 at 1:18 am #195739Historical Forums UserParticipantIf someone with the password wants to share the page it links to then they could just as easily give out the password.
It’s a little bit to stop people from stumbling across it and being given all the details of our wedding. It’s unlikely given the domain name I am looking at using for it but still possible. If someone comes across it looking for something else it’s just another level of security. Yes it’s a weak level but I can’t imagine anyone wanting to get through so bad they would look at the source code. It’s only slightly better than an “enter” button without any sort of password but I’m happy with that.
It’s also because it’s the only way I know how to do it. If I knew an easier way of password protecting the site I’d use that, the more secure the better but it serves its purpose.
February 12, 2015 at 4:37 am #195746JamesBarnsleyParticipantHi,
Yes quite a bit of knowledge will be needed to implement a proper log in system.
Have you thought about password protecting the directory through .htaccess?
Normally CPanel has the option to password protect directories using .htaccess through a GUI user interface. Provided you have CPanel or similar on your host should be OK.
Alternatively you could code it into the .htaccess file manually.
However there is probably no need to do this, by the sounds of it, the JS password protection will be suitable for your purpose anyway.
James.
-
AuthorPosts
- The forum ‘Back End’ is closed to new topics and replies.