|
Embedding a login page in your web site |
Top Previous Next |
|
All user logins are performed through a browser login page. This login page is usually accessed from your existing web site.
You can choose to use a predefined login page or customize your own login page (advanced).
To use the predefined login page: Add the following link to the relevant page/s in your existing web site:
<A HREF="http://127.0.0.1:4961">Click to login</A>
Note: You should edit this link to reflect your IP/URL address and Port. (127.0.0.1 to your IP/URL and 4961 to the port in use)
TIP: Your name and logo may also be displayed on the login page. See the Tips & Tricks section
Customize your own login page (advanced):
If you prefer that a login area will be embedded in one of your web site pages (i.e. the actual login
Embed the following HTML/script code in one of your web pages. The <SCRIPT> code should be added beween the HTML <HEADER> and </HEADER>. The <FORM> code should be added in the HTML <BODY> area; You need to update the default
Please embed the following HTML code.
Copy and paste this section to your HTML <HEADER> section:
Note: Copying from here may contain some illegal characters (depending on the web browser). If you are encountering any problems embedding this code, please try copying the HTML part from the Tips&Tricks section inside the readme file at: <Installation_DIR>\Commit\WebInterface\Readme.txt file instead.
<SCRIPT language="JavaScript"> <!-- function CmtCheckInput () { if (document.CmtForm.CmtUsrNamePrm.value == "" ) { alert('Please enter your user name'); document.CmtForm.CmtUsrNamePrm.focus() ; return false ; } else if (document.CmtForm.CmtUsrPWPrm.value == "" ) { alert('Please enter your password'); document.CmtForm.CmtUsrPWPrm.focus(); return false ; } else { aWinSize = ",width="+screen.width+",Height="+(screen.Height-100)+",Top=0,Left=0"; aNewWin = window.open("","CmtNewWindow","toolbar=0,menubar=0,scrollbars=1,resizable=1,status=1,directories=0,location=0"+aWinSize); aNewWin.name = "CmtNewWindow "; return true ; } } function cmtLogin() { if (CmtCheckInput()) { document.CmtForm.submit(); document.CmtForm.CmtUsrPWPrm.value = ""; } } //--> </SCRIPT>
Copy the following HTML code, paste it in the HTML <BODY> area and modify the IP and Port as described above:
<FORM name="CmtForm" target="CmtNewWindow" method="post" action="http://127.0.0.1:4961" onSubmit="return CmtCheckInput ()"> <table> <tr> <td>User Name: </td< <td><input name="CmtUsrNamePrm" type="text" id="CmtUsrNamePrm"></td> </tr> <tr> <td>Password:</td> <td><input name="CmtUsrPWPrm" type="password" id="CmtUsrPWPrm"></td> </tr> <tr> <td> </td< <td><input type="button" onClick=cmtLogin() value="Login"></td> </tr> </table> </FORM> |