Logging into different Secure Zones according to ID number

Updated on 20-October-2016 at 10:16 AM

Business Catalyst End of life announcement - find out more details.

This document will show you how you can create a dropdown menu on sites with multiple secure zones which will allow visitors to choose the secure zone they wish to log into, by manipulating the form's action URL according 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 = &#39;/ZoneProcess.aspx?ZoneID=&#39;+sel.options[sel.selectedIndex].value+&#39;&OID={module_oid}&OTYPE={module_otype}&#39;;  
    return false;