PLEASE GIVE ME JAVA SCRIPT TO ADD LOGIN BOX IN WEBSITE?

Question by Pranav J:
Please give me java script to add login box in website?
I want a java script through which a box prompts to enter user name and password if the userrname and password is correct then it views the body part of that same html web page. I do not want the java script which redirect to other web page?
——————————————
Answer by Kevin Ohashi
You are aware a javascript only i in no way secure and viewing the source code would reveal your password.
——————————————
Give your own answer to this question below!









about 1 year ago
You couldn’t… Windows doesn’t work that way, you’d have to cannibalize the source code to firefox and write your own lightweight version specifically for updating…
about 1 year ago
You can script in Windows using VBScript (http://en.wikipedia.org/wiki/VBScript) and Windows Script Host (http://en.wikipedia.org/wiki/Windows_Script_Host). You can also use the newer Windows PowerShell (http://en.wikipedia.org/wiki/Windows_PowerShell).
Documentation/Guide for VBScript and WSH can be found at: http://www.microsoft.com/downloads/details.aspx?familyid=01592c48-207d-4be1-8a76-1c4099d7bbb9&displaylang=en
PowerShell Documentation Pack can be found at: http://blogs.msdn.com/b/powershell/archive/2006/11/30/powershell-documentation-pack.aspx
In your example of updating Firefox, it would be much easier if there was a way to update Firefox from the command line like you can in Linux. Using VBS, you could open Firefox and send keys to get to the Help->Check for Updates … But you would run into problems reading the results. You’d probably be better off using VBS to get the current version of Firefox (it has commands for this), then compare that with the latest version available on the net. If the one on the net is newer, download and then do a silent install.
about 2 months ago
there is no somthing like that in java script.
there is somthing called PHP & MySQL
MySQL : is A data base wich stores the password / user .
And PHP wich is the programe.
about 2 months ago
This can’t be done in javascript because it resides “browser side”. What you CAN do is just “hide” a chunk of a web page.
This isn’t too difficult, but it’s more involved than I can write here. Basically, you hide an element with CSS and then use javascript along with DOM to retrieve the element and change it’s class property to a class that is visible. It is NOT SECURE!! it only hides a portion of a web page!
If you want actual login protection, this needs to happen server-side, there are a few ways to do this.
For Apache sites with only a few accounts:
http://httpd.apache.org/docs/2.2/howto/auth.html
(this one is easiest but it falls apart if you have more complex requirements)
Here are a couple PHP solutions:
http://www.amember.com/
(I’ve never tried it)
http://www.geniegate.com/listings/dolphin/
(Full disclosure, I own GenieGate)
These packages will give you a lot of flexibility, they are server-side solutions.
I can’t speak for amember, but geniegate can password protect PORTIONS of a web page, making it possible to have one version of the same exact page for people who are logged in and another version of the page for people who are not logged in.