Logging into different Secure Zones according to ID number

Updated on 30-September-2015 at 3:58 PM

This document will show you how you can create a dropdown menu on sites with multiple secure zone which will allow visitors to choose the secure zone they wish to log into, y manipulating the form's action URL acording to their selection.

You can add a menu with options that enable you to select the corresponding ID number, using some basic HTML code:


<select id="selectZone">  
     <option value="154">Customer</option>  
     <option value="150">Staff Intranet</option>  
     <option value="152">Kanfa Aragon</option>  
     <option value="168">Technip</option>  
     <option value="347">Heron</option>  

The IDs for the above dropdown will need to be obtained from the admin. To do this you hover the mouse over the list of secure zones in Admin and look at the status bar in your browser:


You then need to alter the validation JavaScript within the form tags and add the code that will grab the selection from the dropdown and alter the form action:


<script language="javascript">  
function checkWholeForm43650(theForm){  
    var why = "";  
    if (theForm.Username) why += isEmpty(theForm.Username.value, "Username");  
    if (theForm.Password) why += isEmpty(theForm.Password.value, "Password");  
    if (why != ""){  
               return false;  
    var sel = document.getElementById("selectZone");  
    theForm.action = '/ZoneProcess.aspx?ZoneID='+sel.options[sel.selectedIndex].value+'&OID={module_oid}&OTYPE={module_otype}';  
    return false;