Search Support

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

Wannan tattunawa ta zama daɗaɗɗiya. Yi sabuwar tambaya idan ka na bukatar taimako.

The nsIPromptService promptUsernameAndPassword is not working

more options

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 :(

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 :(

All Replies (5)

more options

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)

more options

Is there a way I can put a Username/Password box in website (without a server)?

more options

How do you display your website without a server, is it a set of files on your own computer?

more options

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.