Advertisement
Java_Volume1 Miscellaneous #99142

Password protect a page

How can I password protect a page? The simplist and most effective password protection using just clientside JavaScripting, relies on the user not knowing the target filename. Found on the web at:http://www.irt.org

AI

KI-Zusammenfassung: This codebase represents a historical implementation of the logic described in the metadata. Our preservation engine analyzes the structure to provide context for modern developers.

Quellcode
original-source
<SCRIPT LANGUAGE="JavaScript"><!--
function go() {
  window.location.href = "http://www.somewhere.com/" +
    document.formName.passwordName.value + '.html';
  return false;
}
//--></SCRIPT>
<FORM NAME="formName" onSubmit="return go()">
Enter Password: <INPUT TYPE="password" NAME="passwordName" VALUE="" SIZE=8>
</FORM>
 




Ok it's pretty simple if you want to make a DLL that has a form or even more then one form on it then do this.
first open a new windowforms project
name it and hit ok
ok now on the project name in the solution builder listing the files right click and hit properties.
Go to the output type dropdown and select class libaray and boom you are done now comple it and then bring it in as a reference into your exe project and you can now use the forms in the dll
dim hi as new testdll.form1
hi.show()
boom your done.
now for debuging your forms in the dll you can build a windowsforms app exe that uses the dll and then in the DLL project going to the same right click and properites of the project you will find configuatjion properties and under debuging you can set it to run an external application just set that on your test.exe that uses the dll and boom you are ready to debug.
FYI if you make a change in the dll you will need to recompile the test.exe before going into debug again.
Hope this helps
Originalkommentare (3)
Wiederhergestellt von der Wayback Machine