The nsIPromptService promptUsernameAndPassword is not working
I have run the username/password code in php, and it doesn't run the code! Am I missing something here?
I've tried put the code into the php file, or imported it... please help :(
所有回覆 (5)
Are you creating an add-on?? That method is for use in add-ons, not websites.
https://developer.mozilla.org/docs/Mozilla/Tech/XPCOM/Reference/Interface/nsIPromptService (note the reference to privileged code)
Is there a way I can put a Username/Password box in website (without a server)?
How do you display your website without a server, is it a set of files on your own computer?
Yes, it is.
I don't know how to secure local files from being opened using file:/// URLs. You can add a form to any page, but I don't think it will be operable. You could search around on the web for a solution, or try one of these sites: Where to go for developer support.