Skip navigation

Currently Being Moderated

Logging into different Secure Zones according to ID number

Mar 26, 2012 4:22 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>
</select>

 

 

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:

 

secure-zone-id-admin.jpg

 

 

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 != ""){
               alert(why);
               return false;
    }

    var sel = document.getElementById("selectZone");
    theForm.action = '/ZoneProcess.aspx?ZoneID='+sel.options[sel.selectedIndex].value+'&OID={module_oid}&OTYPE={module_otype}';
    theForm.submit();
    return false;
}

</script>
 
Comments (5)