Jump to content

Sending commands to popup form


Recommended Posts

I need to input text and submit a form that popups.  Here is what I got so far but it is not working.

; Find Phone Popup
$pIE = WinGetTitle("[Active]")
$oForm = _IEFormGetObjByName($pIE,"phoneFindListForm")
$oSelect = _IEFormElementGetObjByName($oForm, "searchField0")
_IEAction($oSelect, "focus")
_IEFormElementOptionSelect($oSelect, "numplan.dnorpattern")

When this runs I get the following error.

IE.au3 T3.0-1 Warning from function _IEFormElementGetObjByName, $_IESTATUS_NoMatch

--> IE.au3 T3.0-1 Error from function _IEAction(focus), $_IESTATUS_InvalidDataType

--> IE.au3 T3.0-1 Error from function _IEFormElementOptionSelect, $_IESTATUS_InvalidDataType

--> IE.au3 T3.0-1 Error from function _IEFormGetObjByName, $_IESTATUS_InvalidDataType

--> IE.au3 T3.0-1 Error from function _IEFormElementGetObjByName, $_IESTATUS_InvalidDataType

--> IE.au3 T3.0-1 Error from function _IEAction(focus), $_IESTATUS_InvalidDataType

--> IE.au3 T3.0-1 Error from function _IEFormElementOptionSelect, $_IESTATUS_InvalidDataType

I am thinking my issue is getting the _IEFormGetObjByName() correct and the rest of the script will work.  Once the form is submitted the focus should go back to the original form.

Link to comment
Share on other sites

Any chance we can access this form, so that we may get a better idea of the situation?

Snips & Scripts


My Snips: graphCPUTemp ~ getENVvars
My Scripts: Short-Order Encrypter - message and file encryption V1.6.1 ~ AuPad - Notepad written entirely in AutoIt V1.9.4

Feel free to use any of my code for your own use.                                                                                                                                                           Forum FAQ

 

Link to comment
Share on other sites

Unfortunately not.  My company does not allow outside access to anything on the network.  I can, however, post the html.

<html lang="en" dir="ltr"> 

    <head>
        
        
            <link href="/ccmadmin/themes/VtgBlaf/vtgblaf_percent.css" type="text/css" rel="stylesheet" title="JLF - Preferred" > 
            <link href="/ccmadmin/themes/VtgBlaf/admin-menu.css" type="text/css" rel="stylesheet" title="JLF - Preferred" >

            <style type="text/css">
                .content { padding: 0px }
            </style>
            
            <script type="text/javascript" src="/ccmadmin/javascripts/common/style-menu.js"></script>
        

        <script type="text/javascript" src="/ccmadmin/javascripts/common/statusbox.js"></script>        

        <script type="text/javascript" src="/ccmadmin/javascripts/common/udm-control.js"></script>
        <script type="text/javascript" src="/ccmadmin/javascripts/common/menu.js"></script>
        <script type="text/javascript" src="/ccmadmin/javascripts/common/onlinehelp.js"></script>
        <script type="text/javascript" src="/ccmadmin/javascripts/common/collection-actions.js"></script>
        <script type="text/javascript" >
            // These are the messages used in the Standard.js Javascript functions. 

var msgNotUnique = '- must be unique. Please specify a unique value and try again.';
var msgIsRequired = '- is Required.  Please specify a value and try again.';
var msgNotNumeric = '- must be a number.';

var msgMACTooShort = '- must be exactly 12 characters long. ';
var msgMACCharacters = '- can contain only hexadecimal characters.';
var msgInvalidInstanceID='- may only contain 1-128 alphanumeric characters, dot(.), dashes (-), and underscores (_).';

var msgMultiDeviceResetNoDevices ="There are no associated devices to restart.";
var msgValidCharacters = "@ contains one or more invalid characters. Valid characters for @ are \n#";
var msgConjunction = "and  ";
var msgOtherValidChars = "the following character(s): \n\n";
var msgInvalidCharacters = "@ contains one or more invalid characters. Characters which are not valid for @ are \n#";
var jsErrInvalidDescription = '@ contains invalid characters. @ may not contain ampersand (&), double quotes ("), \nbrackets ([ ]), less than (<), greater than (>), nor the percent sign (%).';
var lblDescription = "Description";
var lblAnItem = "An item";
var lblNextSetOfItems = "--- Next group of items ---";
var lblPrevSetOfItems = "--- Previous group of items ---";
var jsErrDuplicate = "'#' is already in use. Please enter a unique value for @ to continue.";
var jsErrIsRequired = "@ is a required field. Please enter the value for @ to continue.";
var jsErrIsTooLong = "@ cannot contain more than # characters. Please correct the value for @ to continue.";
var jsErrOutOfRange = "@ must be a value from # to % (inclusive). Please correct the value for @ to continue.";
var jsMsgDNDependency = "The following Directory Numbers used by @ are in Pilot Hunt Groups: \n \n%list%\nYou must remove the Directory Number(s) above from the listed Pilot Hunt Group(s) before deleting this device.";
var jsMsgUsedin = "used in ";
var msgDeleteConfirm = "You are about to permanently delete this @. \nThis action cannot be undone.\n \nContinue?";
var jsErrDeleteInUse = "@ could not be deleted because it is in use. \nClick the Dependency Records link to view its dependencies.";
var jsErrDeleteInUse_List = "@ could not be deleted because it is in use. Click on @ \nand then click the Dependency Records link to view its dependencies.";
var jsErrSpecialIP = "Value for @ is a special IP Address which is not valid. Do you want to continue with this value?";
var jsErrDNSInvalidFirstChars = "The first character of a Host Name can only be a letter.\nPlease adjust your entry for @ to continue.";
var jsErrDNSInvalidLastChars = "The last character of Host Name can only be a letter or a number.\nPlease adjust your entry for @ to continue.";
var jsErrInvalidIP = "Value entered for @ is not a valid dotted-decimal IP address.\nIP Address should have four 8-bits numbers(Octets) separated by periods \n(Ex: 192.0.0.26). The value of each octet should be between 0 and 255.\nPlease adjust your entry to continue.";
var jsErrDNSInvalidChars = "Value entered for @ contain invalid characters.";
var jsErrCouldNotResolveDNS = "Value entered for @ could not be resolved to an IP Address from DNS. Do you want to continue?";
var msgScriptInjection = "Searching using JavaScript keywords are not allowed.";

        </script>
        <script type="text/javascript" src="/ccmadmin/javascripts/common/standard.js"></script>
        <script type="text/javascript" src="/ccmadmin/javascripts/common/newstandard.js"></script>
        <script type="text/javascript" src="/ccmadmin/javascripts/common/menubar.js"></script>


        <title>
            




    Find and List Phones    
    


        </title>
        
        
        <script>

            function nsOnResize()
            {
                try {
                    var windowHeight;
                    var windowWidth;

                    if (!(/MSIE/i.test(navigator.userAgent))) {
                        windowHeight = window.innerHeight;
                        windowWidth  = window.innerWidth;
                    }
                    else {
                        windowHeight = document.body.clientHeight;
                        windowWidth  = document.body.clientWidth;
                    }

                    var tnb = document.getElementById('topnavbar').offsetHeight;
                    document.getElementById("contentautoscroll").style.height = windowHeight - tnb - 2 + "px";  
                    document.getElementById("contentautoscroll").style.width = windowWidth - 2 + "px";
                    document.getElementById("topnavbar").style.width = windowWidth + "px";                    
                } 
                catch (e) {
                    window.status = e.message;
                }
            }    
        </script>

        </head>
        <body id='mainbody' class='layout' style= "overflow: hidden" dir="ltr" onresize='nsOnResize()'>
        <a href="#navskip" style='display:none'><img src="/ccmadmin/themes/VtgBlaf/s.gif" width="400" height="0" border="0" alt="skip to main content"></img></a>


        <div id="topnavbar" style="width:100%">

                    

                    <table class="menubar" width="100%" cellpadding="0" cellspacing="0" border="0" summary='Menu Bar Layout Layout'>
                        <tr>
                            <td class="menubar-title" nowrap>
                                
                            </td>
                        </tr>
                    </table>

                    <table class="titlebar" width="100%" cellpadding="0" cellspacing="0" border="0" summary='Title Bar Layout Layout'>
                        <tr>
                            <td class="titlebar-title">
                                




    Find and List Phones    
    


                            </td>
                            
                                <td class="titlebar-jumpmenu">
                            
                                



 



    <span class="label">Related Links:</span>
    <select  id='menu1' name='menu1'>
        <option  value='/gendeviceLoginFindList.do'>
            Actively Logged In Device Report
        </option >
        <option  value='/gendeviceRemoteLoginFindList.do'>
            Remotely Logged In Device
        </option >

    </select >
    <input name="goButton" value="Go" onclick="MM_jumpMenuGo('menu1','window','/ccmadmin', 1)" type='button'>

                            </td>
                        </tr>
                    </table>

                    



 



    
<!-- ******* TOOLBAR : Start of GENERATED HTML ******* -->

<div class="toolbar" style="height:4px">
    <table border="0" cellpadding="0" cellspacing="0" 
           summary='<bean:message key="table.summary.toolbar"/> Layout' >
        <tr><td>
        </td></tr>
    </table>
</div>

<!-- ******* TOOLBAR : End of GENERATED HTML ******* -->





                </div>

                <A name="navskip" id="navskip" ></A>
                <table class="content" width="100%" height="100%" cellpadding="1" cellspacing="0" border="0" summary="Content Main Layout">
                    <tr>
                        <td valign="top">
                            <div id="contentautoscroll" class="content-auto-scroll">
                                







 





  


    
   <form name="phoneFindListForm" method="post" action="/ccmadmin/phoneFindList.do"><div><input type="hidden" name="org.apache.struts.taglib.html.TOKEN" value="a9a2f471b79adfada5cdbda2ec34aba8"></div>
   
    
        
        

    
    

  


 
    
        <br>
<!-- ******* FINDLIST : Start of GENERATED HTML ******* -->

<table id='t12' cellspacing='0' width='100%' class='cuesTableTitleBg' border='0' summary='Find List Table Title'><tr class='cuesTableTitleBg'><td align='left' class='cuesTableTitleButtonRow'><span style='vertical-align:middle' class='cuesTableTitle'>Phone</span><span style='vertical-align:middle' class='cuesTableTitleItem'></span></td><td></td></tr></table><div class='cuesTableFilterArea'><input name='rowsVisible' type='hidden' value='1'/><table id='cuesTableFilter' cellspacing='0' cellpadding='0' summary='Find List Table Search Criteria'><tr id='filterRow0' style='display:'><td class='cuesTableFilterAreaTd'>Find&nbsp;<input name='primaryTable' type='hidden' value='device'/><input name='dispCols' type='hidden' value='pkid#name#description#fkdevicepool#tkDeviceProtocol#fkcallingsearchspace#tkCertificateOperation#tkCertificateStatus#authenticationString#fksecurityprofile#tkProduct#mgcpid#fkcommondeviceconfig'/></td><td class='cuesTableFilterAreaTd'>Phone&nbsp;</td><td class='cuesTableFilterAreaTd'>where&nbsp;</td><td class='cuesTableFilterAreaTd'><select onchange='getUtilityListValues(this, "PhoneFindListForm", updateUtilityList)' size='1' id='searchField0' name='searchField0'>
<option value='device.name'>Device Name</option>
<option value='device.description'>Description</option>
<option value='numplan.dnorpattern'>Directory Number</option>
<option value='callingsearchspace.name'>Calling Search Space</option>
<option value='devicepool.name'>Device Pool</option>
<option value='TypeProduct.name'>Device Type</option>
<option value='pickupgroup.name'>Call Pickup Group</option>
<option value='TypeCertificateStatus.name'>LSC Status</option>
<option value='device.authenticationString'>Authentication String</option>
<option value='TypeDeviceProtocol.name'>Device Protocol</option>
<option value='securityprofile.name'>Security Profile</option>
<option value='commondeviceconfig.name'>Common Device Configuration</option>
</select></td><td class='cuesTableFilterAreaTd'><select id='searchLimit0' name='searchLimit0' size='1'>
<option value='beginsWith'>begins with</option>
<option value='contains'>contains</option>
<option value='endsWith'>ends with</option>
<option value='isExactly'>is exactly</option>
<option value='isEmpty'>is empty</option>
<option value='isNotEmpty'>is not empty</option>
</select></td><td class='cuesTableFilterAreaTd'><input id='searchString0' onkeypress='javascript:onEnterKey(event)' value='' name='searchString0' type='text'/></td><td class='cuesTableFilterAreaTd'><input value='Find' class='cuesButton' name='findButton' onclick='javascript:onPopupFind()' type='button'/></td><td class='cuesTableFilterAreaTd'><input value='Clear Filter' class='cuesButton' name='clearFilterButton' onclick='javascript:clearFilter()' type='button'/></td><td class='cuesTableFilterAreaTd'><button class='cuesButton' style='width:30px' onclick='javascript:addFilterRow()' type='button'><img alt='Add Search Parameter' src='images/Add16T.gif'/></button></td><td class='cuesTableFilterAreaTd'><button class='cuesButton' style='width:30px' onclick='javascript:removeFilterRow()' type='button'><img alt='Remove Search Parameter' src='images/Subtract16T.gif'/></button></td></tr><tr id='filterRow1' style='display:none'><td class='cuesTableFilterAreaTd'></td><td class='cuesTableFilterAreaTd'></td><td class='cuesTableFilterAreaTd'></td><td class='cuesTableFilterAreaTd'><select onchange='getUtilityListValues(this, "PhoneFindListForm", updateUtilityList)' size='1' id='searchField1' name='searchField1'>
<option value='device.name'>Device Name</option>
<option value='device.description'>Description</option>
<option value='numplan.dnorpattern'>Directory Number</option>
<option value='callingsearchspace.name'>Calling Search Space</option>
<option value='devicepool.name'>Device Pool</option>
<option value='TypeProduct.name'>Device Type</option>
<option value='pickupgroup.name'>Call Pickup Group</option>
<option value='TypeCertificateStatus.name'>LSC Status</option>
<option value='device.authenticationString'>Authentication String</option>
<option value='TypeDeviceProtocol.name'>Device Protocol</option>
<option value='securityprofile.name'>Security Profile</option>
<option value='commondeviceconfig.name'>Common Device Configuration</option>
</select></td><td class='cuesTableFilterAreaTd'><select id='searchLimit1' name='searchLimit1' size='1'>
<option value='beginsWith'>begins with</option>
<option value='contains'>contains</option>
<option value='endsWith'>ends with</option>
<option value='isExactly'>is exactly</option>
<option value='isEmpty'>is empty</option>
<option value='isNotEmpty'>is not empty</option>
</select></td><td class='cuesTableFilterAreaTd'><input id='searchString1' onkeypress='javascript:onEnterKey(event)' value='' name='searchString1' type='text'/></td><td class='cuesTableFilterAreaTd'></td><td class='cuesTableFilterAreaTd'></td><td class='cuesTableFilterAreaTd'></td><td class='cuesTableFilterAreaTd'></td><td class='cuesTableFilterAreaTd'></td></tr><tr id='filterRow2' style='display:none'><td class='cuesTableFilterAreaTd'></td><td class='cuesTableFilterAreaTd'></td><td class='cuesTableFilterAreaTd'></td><td class='cuesTableFilterAreaTd'><select onchange='getUtilityListValues(this, "PhoneFindListForm", updateUtilityList)' size='1' id='searchField2' name='searchField2'>
<option value='device.name'>Device Name</option>
<option value='device.description'>Description</option>
<option value='numplan.dnorpattern'>Directory Number</option>
<option value='callingsearchspace.name'>Calling Search Space</option>
<option value='devicepool.name'>Device Pool</option>
<option value='TypeProduct.name'>Device Type</option>
<option value='pickupgroup.name'>Call Pickup Group</option>
<option value='TypeCertificateStatus.name'>LSC Status</option>
<option value='device.authenticationString'>Authentication String</option>
<option value='TypeDeviceProtocol.name'>Device Protocol</option>
<option value='securityprofile.name'>Security Profile</option>
<option value='commondeviceconfig.name'>Common Device Configuration</option>
</select></td><td class='cuesTableFilterAreaTd'><select id='searchLimit2' name='searchLimit2' size='1'>
<option value='beginsWith'>begins with</option>
<option value='contains'>contains</option>
<option value='endsWith'>ends with</option>
<option value='isExactly'>is exactly</option>
<option value='isEmpty'>is empty</option>
<option value='isNotEmpty'>is not empty</option>
</select></td><td class='cuesTableFilterAreaTd'><input id='searchString2' onkeypress='javascript:onEnterKey(event)' value='' name='searchString2' type='text'/></td><td class='cuesTableFilterAreaTd'></td><td class='cuesTableFilterAreaTd'></td><td class='cuesTableFilterAreaTd'></td><td class='cuesTableFilterAreaTd'></td><td class='cuesTableFilterAreaTd'></td></tr><tr id='filterRow3' style='display:none'><td class='cuesTableFilterAreaTd'></td><td class='cuesTableFilterAreaTd'></td><td class='cuesTableFilterAreaTd'></td><td class='cuesTableFilterAreaTd'><select onchange='getUtilityListValues(this, "PhoneFindListForm", updateUtilityList)' size='1' id='searchField3' name='searchField3'>
<option value='device.name'>Device Name</option>
<option value='device.description'>Description</option>
<option value='numplan.dnorpattern'>Directory Number</option>
<option value='callingsearchspace.name'>Calling Search Space</option>
<option value='devicepool.name'>Device Pool</option>
<option value='TypeProduct.name'>Device Type</option>
<option value='pickupgroup.name'>Call Pickup Group</option>
<option value='TypeCertificateStatus.name'>LSC Status</option>
<option value='device.authenticationString'>Authentication String</option>
<option value='TypeDeviceProtocol.name'>Device Protocol</option>
<option value='securityprofile.name'>Security Profile</option>
<option value='commondeviceconfig.name'>Common Device Configuration</option>
</select></td><td class='cuesTableFilterAreaTd'><select id='searchLimit3' name='searchLimit3' size='1'>
<option value='beginsWith'>begins with</option>
<option value='contains'>contains</option>
<option value='endsWith'>ends with</option>
<option value='isExactly'>is exactly</option>
<option value='isEmpty'>is empty</option>
<option value='isNotEmpty'>is not empty</option>
</select></td><td class='cuesTableFilterAreaTd'><input id='searchString3' onkeypress='javascript:onEnterKey(event)' value='' name='searchString3' type='text'/></td><td class='cuesTableFilterAreaTd'></td><td class='cuesTableFilterAreaTd'></td><td class='cuesTableFilterAreaTd'></td><td class='cuesTableFilterAreaTd'></td><td class='cuesTableFilterAreaTd'></td></tr><tr id='filterRow4' style='display:none'><td class='cuesTableFilterAreaTd'></td><td class='cuesTableFilterAreaTd'></td><td class='cuesTableFilterAreaTd'></td><td class='cuesTableFilterAreaTd'><select onchange='getUtilityListValues(this, "PhoneFindListForm", updateUtilityList)' size='1' id='searchField4' name='searchField4'>
<option value='device.name'>Device Name</option>
<option value='device.description'>Description</option>
<option value='numplan.dnorpattern'>Directory Number</option>
<option value='callingsearchspace.name'>Calling Search Space</option>
<option value='devicepool.name'>Device Pool</option>
<option value='TypeProduct.name'>Device Type</option>
<option value='pickupgroup.name'>Call Pickup Group</option>
<option value='TypeCertificateStatus.name'>LSC Status</option>
<option value='device.authenticationString'>Authentication String</option>
<option value='TypeDeviceProtocol.name'>Device Protocol</option>
<option value='securityprofile.name'>Security Profile</option>
<option value='commondeviceconfig.name'>Common Device Configuration</option>
</select></td><td class='cuesTableFilterAreaTd'><select id='searchLimit4' name='searchLimit4' size='1'>
<option value='beginsWith'>begins with</option>
<option value='contains'>contains</option>
<option value='endsWith'>ends with</option>
<option value='isExactly'>is exactly</option>
<option value='isEmpty'>is empty</option>
<option value='isNotEmpty'>is not empty</option>
</select></td><td class='cuesTableFilterAreaTd'><input id='searchString4' onkeypress='javascript:onEnterKey(event)' value='' name='searchString4' type='text'/></td><td class='cuesTableFilterAreaTd'></td><td class='cuesTableFilterAreaTd'></td><td class='cuesTableFilterAreaTd'></td><td class='cuesTableFilterAreaTd'></td><td class='cuesTableFilterAreaTd'></td></tr><tr id='filterRow5' style='display:none'><td class='cuesTableFilterAreaTd'></td><td class='cuesTableFilterAreaTd'></td><td class='cuesTableFilterAreaTd'></td><td class='cuesTableFilterAreaTd'><select onchange='getUtilityListValues(this, "PhoneFindListForm", updateUtilityList)' size='1' id='searchField5' name='searchField5'>
<option value='device.name'>Device Name</option>
<option value='device.description'>Description</option>
<option value='numplan.dnorpattern'>Directory Number</option>
<option value='callingsearchspace.name'>Calling Search Space</option>
<option value='devicepool.name'>Device Pool</option>
<option value='TypeProduct.name'>Device Type</option>
<option value='pickupgroup.name'>Call Pickup Group</option>
<option value='TypeCertificateStatus.name'>LSC Status</option>
<option value='device.authenticationString'>Authentication String</option>
<option value='TypeDeviceProtocol.name'>Device Protocol</option>
<option value='securityprofile.name'>Security Profile</option>
<option value='commondeviceconfig.name'>Common Device Configuration</option>
</select></td><td class='cuesTableFilterAreaTd'><select id='searchLimit5' name='searchLimit5' size='1'>
<option value='beginsWith'>begins with</option>
<option value='contains'>contains</option>
<option value='endsWith'>ends with</option>
<option value='isExactly'>is exactly</option>
<option value='isEmpty'>is empty</option>
<option value='isNotEmpty'>is not empty</option>
</select></td><td class='cuesTableFilterAreaTd'><input id='searchString5' onkeypress='javascript:onEnterKey(event)' value='' name='searchString5' type='text'/></td><td class='cuesTableFilterAreaTd'></td><td class='cuesTableFilterAreaTd'></td><td class='cuesTableFilterAreaTd'></td><td class='cuesTableFilterAreaTd'></td><td class='cuesTableFilterAreaTd'></td></tr><tr id='filterRow6' style='display:none'><td class='cuesTableFilterAreaTd'></td><td class='cuesTableFilterAreaTd'></td><td class='cuesTableFilterAreaTd'></td><td class='cuesTableFilterAreaTd'><select onchange='getUtilityListValues(this, "PhoneFindListForm", updateUtilityList)' size='1' id='searchField6' name='searchField6'>
<option value='device.name'>Device Name</option>
<option value='device.description'>Description</option>
<option value='numplan.dnorpattern'>Directory Number</option>
<option value='callingsearchspace.name'>Calling Search Space</option>
<option value='devicepool.name'>Device Pool</option>
<option value='TypeProduct.name'>Device Type</option>
<option value='pickupgroup.name'>Call Pickup Group</option>
<option value='TypeCertificateStatus.name'>LSC Status</option>
<option value='device.authenticationString'>Authentication String</option>
<option value='TypeDeviceProtocol.name'>Device Protocol</option>
<option value='securityprofile.name'>Security Profile</option>
<option value='commondeviceconfig.name'>Common Device Configuration</option>
</select></td><td class='cuesTableFilterAreaTd'><select id='searchLimit6' name='searchLimit6' size='1'>
<option value='beginsWith'>begins with</option>
<option value='contains'>contains</option>
<option value='endsWith'>ends with</option>
<option value='isExactly'>is exactly</option>
<option value='isEmpty'>is empty</option>
<option value='isNotEmpty'>is not empty</option>
</select></td><td class='cuesTableFilterAreaTd'><input id='searchString6' onkeypress='javascript:onEnterKey(event)' value='' name='searchString6' type='text'/></td><td class='cuesTableFilterAreaTd'></td><td class='cuesTableFilterAreaTd'></td><td class='cuesTableFilterAreaTd'></td><td class='cuesTableFilterAreaTd'></td><td class='cuesTableFilterAreaTd'></td></tr><tr id='filterRow7' style='display:none'><td class='cuesTableFilterAreaTd'></td><td class='cuesTableFilterAreaTd'></td><td class='cuesTableFilterAreaTd'></td><td class='cuesTableFilterAreaTd'><select onchange='getUtilityListValues(this, "PhoneFindListForm", updateUtilityList)' size='1' id='searchField7' name='searchField7'>
<option value='device.name'>Device Name</option>
<option value='device.description'>Description</option>
<option value='numplan.dnorpattern'>Directory Number</option>
<option value='callingsearchspace.name'>Calling Search Space</option>
<option value='devicepool.name'>Device Pool</option>
<option value='TypeProduct.name'>Device Type</option>
<option value='pickupgroup.name'>Call Pickup Group</option>
<option value='TypeCertificateStatus.name'>LSC Status</option>
<option value='device.authenticationString'>Authentication String</option>
<option value='TypeDeviceProtocol.name'>Device Protocol</option>
<option value='securityprofile.name'>Security Profile</option>
<option value='commondeviceconfig.name'>Common Device Configuration</option>
</select></td><td class='cuesTableFilterAreaTd'><select id='searchLimit7' name='searchLimit7' size='1'>
<option value='beginsWith'>begins with</option>
<option value='contains'>contains</option>
<option value='endsWith'>ends with</option>
<option value='isExactly'>is exactly</option>
<option value='isEmpty'>is empty</option>
<option value='isNotEmpty'>is not empty</option>
</select></td><td class='cuesTableFilterAreaTd'><input id='searchString7' onkeypress='javascript:onEnterKey(event)' value='' name='searchString7' type='text'/></td><td class='cuesTableFilterAreaTd'></td><td class='cuesTableFilterAreaTd'></td><td class='cuesTableFilterAreaTd'></td><td class='cuesTableFilterAreaTd'></td><td class='cuesTableFilterAreaTd'></td></tr><tr id='filterRow8' style='display:none'><td class='cuesTableFilterAreaTd'></td><td class='cuesTableFilterAreaTd'></td><td class='cuesTableFilterAreaTd'></td><td class='cuesTableFilterAreaTd'><select onchange='getUtilityListValues(this, "PhoneFindListForm", updateUtilityList)' size='1' id='searchField8' name='searchField8'>
<option value='device.name'>Device Name</option>
<option value='device.description'>Description</option>
<option value='numplan.dnorpattern'>Directory Number</option>
<option value='callingsearchspace.name'>Calling Search Space</option>
<option value='devicepool.name'>Device Pool</option>
<option value='TypeProduct.name'>Device Type</option>
<option value='pickupgroup.name'>Call Pickup Group</option>
<option value='TypeCertificateStatus.name'>LSC Status</option>
<option value='device.authenticationString'>Authentication String</option>
<option value='TypeDeviceProtocol.name'>Device Protocol</option>
<option value='securityprofile.name'>Security Profile</option>
<option value='commondeviceconfig.name'>Common Device Configuration</option>
</select></td><td class='cuesTableFilterAreaTd'><select id='searchLimit8' name='searchLimit8' size='1'>
<option value='beginsWith'>begins with</option>
<option value='contains'>contains</option>
<option value='endsWith'>ends with</option>
<option value='isExactly'>is exactly</option>
<option value='isEmpty'>is empty</option>
<option value='isNotEmpty'>is not empty</option>
</select></td><td class='cuesTableFilterAreaTd'><input id='searchString8' onkeypress='javascript:onEnterKey(event)' value='' name='searchString8' type='text'/></td><td class='cuesTableFilterAreaTd'></td><td class='cuesTableFilterAreaTd'></td><td class='cuesTableFilterAreaTd'></td><td class='cuesTableFilterAreaTd'></td><td class='cuesTableFilterAreaTd'></td></tr><tr id='filterRow9' style='display:none'><td class='cuesTableFilterAreaTd'></td><td class='cuesTableFilterAreaTd'></td><td class='cuesTableFilterAreaTd'></td><td class='cuesTableFilterAreaTd'><select onchange='getUtilityListValues(this, "PhoneFindListForm", updateUtilityList)' size='1' id='searchField9' name='searchField9'>
<option value='device.name'>Device Name</option>
<option value='device.description'>Description</option>
<option value='numplan.dnorpattern'>Directory Number</option>
<option value='callingsearchspace.name'>Calling Search Space</option>
<option value='devicepool.name'>Device Pool</option>
<option value='TypeProduct.name'>Device Type</option>
<option value='pickupgroup.name'>Call Pickup Group</option>
<option value='TypeCertificateStatus.name'>LSC Status</option>
<option value='device.authenticationString'>Authentication String</option>
<option value='TypeDeviceProtocol.name'>Device Protocol</option>
<option value='securityprofile.name'>Security Profile</option>
<option value='commondeviceconfig.name'>Common Device Configuration</option>
</select></td><td class='cuesTableFilterAreaTd'><select id='searchLimit9' name='searchLimit9' size='1'>
<option value='beginsWith'>begins with</option>
<option value='contains'>contains</option>
<option value='endsWith'>ends with</option>
<option value='isExactly'>is exactly</option>
<option value='isEmpty'>is empty</option>
<option value='isNotEmpty'>is not empty</option>
</select></td><td class='cuesTableFilterAreaTd'><input id='searchString9' onkeypress='javascript:onEnterKey(event)' value='' name='searchString9' type='text'/></td><td class='cuesTableFilterAreaTd'></td><td class='cuesTableFilterAreaTd'></td><td class='cuesTableFilterAreaTd'></td><td class='cuesTableFilterAreaTd'></td><td class='cuesTableFilterAreaTd'></td></tr><tr id='utilityListRow'><td colspan='5'></td><td colspan='100%'><select onchange='updateSearchString()' name='utilityList' size='1'>
<option>Select item or enter search text</option>
</select></td></tr></table></div><table cellspacing='0' width='100%' class='cuesTableBg' border='0' summary='Find List Table Result'><tr class='cuesTableBg'><th id='message'>No active query.  Please enter your search criteria using the options above.</th></tr></table><!-- ******* BEGIN OF GENERATED JAVASCRIPTS (FindListSearch) ******* -->
<script language="JavaScript" type=text/javascript>
<!-- Begin 
function onPopupFind()
{
  var myaction = "phoneFindList.do?whereClause=device.tkClass=1&colCnt=13&recCnt=0&lookup=true&multiple=false";
  document.forms[0].action = myaction;
  document.forms[0].submit();
}

function onClose()
{
   window.close();
}

//End -->
</script>
<!-- ******* END  OF GENERATED JAVASCRIPTS (FindListSearch) ******* -->
<!-- ******* BEGIN OF GENERATED JAVASCRIPTS (FindListSearch) ******* -->
<script language="JavaScript" type=text/javascript>
<!-- Begin 
function selectNamedRowsCheckbox(myCheck)
{
   if (myCheck.checked == true) {
      onSelectAll(true);
   } else {
      onSelectAll(false);
   }
}

function selectAll(form, regex, state) {

 for (var i = 0; i < form.length; i++) {
   if ( (form.elements[i].name != null) && (form.elements[i].name.match(regex)) ) {
    form.elements[i].checked = state;
   }
 }
}

function onSelectAll(state) {
 var regex = /^result\[(.*)\].chked/;
 selectAll(document.forms[0], regex, state );
}

function onColumnFindSubmit(sortColumn, sortAscend) {

  var pageNumber = document.getElementById("pageNumber");
  if( pageNumber != null )
  {
    pageNumber.value = 1;
  }
 if (document.forms[0].action.indexOf("?") > 0) {
  document.forms[0].action += "&sortColumn=" + sortColumn + "&sortAscend=" + sortAscend;
 } else {
  document.forms[0].action += "?sortColumn=" + sortColumn + "&sortAscend=" + sortAscend;
 }
  document.forms[0].action = "phoneFindList.do?whereClause=device.tkClass=1&colCnt=13&recCnt=0&lookup=true&multiple=false&sortColumn=" + sortColumn + "&sortAscend=" + sortAscend;
  document.forms[0].submit();
}

var req;
function initRequest() {
     if (window.XMLHttpRequest) {
          req = new XMLHttpRequest();
     } else if (window.ActiveXObject) {
          req = new ActiveXObject("Microsoft.XMLHTTP");
     }
}

function updateSearchString() {
     f = document.forms[0];
     var currentRow = (f.rowsVisible.value - 1); 
     var currentLimitValue = getValue(eval("f.searchLimit"+currentRow)); 
     if (currentLimitValue == "isEmpty"||currentLimitValue == "isNotEmpty") {
          eval("f.searchString" + currentRow).value = "";
     }
     else if (f.utilityList.selectedIndex != 0) {
            if (getValue(f.utilityList) != "") {
               var el = eval("f.searchString" + currentRow);
               el.value = f.utilityList[f.utilityList.selectedIndex].text;
          }
     }
}

function getUtilityListValues(element, classname, cbfunction) {
  var lookup = getValue(element);
  var url = "/ccmadmin/populateUtilityListAction.do?classname=" + classname + "&lookup=" + lookup;
  initRequest();
  // set the callback for the request execution
  req.onreadystatechange = cbfunction;
  req.open("GET", url, true);
  req.send(null);
}

function updateUtilityList() {
     var f = document.forms[0];
     // clear the list/n     f.utilityList.selectedIndex = 0;
     f.utilityList.length = 1;     updateSearchString();
     if (req.readyState == 4) {
          if (req.status == 200) {
               f.utilityList.options[0] = new Option("Select item or enter search text", '');
               if (req.responseXML.getElementsByTagName("result")[0].childNodes.length > 0) {
                   var result = req.responseXML.getElementsByTagName("result")[0].childNodes[0].nodeValue;
                   var list = result.split(",")
                   for (i = 0; i < list.length; i++) {
                        f.utilityList.options[i+1] = new Option(list[i], list[i]);
                   }
               }
          }
     }
}

function onEnterKey(e) {
 var keycode;
 if (window.event) {
     keycode = window.event.keyCode;
 } else if (e) { 
     keycode = e.which;
 } else {
    return true;
 }
 if (keycode == 13) {
    onPopupFind();
   return false;
 } else {
   return true;
 }
}

//End -->
</script>
<!-- ******* END  OF GENERATED JAVASCRIPTS (FindListSearch) ******* -->
<!-- ******* BEGIN OF GENERATED JAVASCRIPTS (Search within Search DHTML) ******* -->
<script language="JavaScript" type=text/javascript>
<!-- Begin 
// Global variable for keeping track of visible rows.
var rowsVisible = document.forms[0].rowsVisible; // this comes from form

// Global variable for max rows to show.
var maxRows = 10;

//Grab text in td elements that are to the right of the pattern text box and save for later.
var firstRow = document.getElementById('cuesTableFilter').rows[0].cells;
var startTdIndex = 6;

// save off td data for later
var savedTdData = new Array();
for (var i=startTdIndex; i < firstRow.length; i++) {
     savedTdData[savedTdData.length] = firstRow[i].innerHTML;
}

// show buttons for last row if more than one row
if (rowsVisible.value > 1) {
     removeButtonTds(0);
     addButtonTds(rowsVisible.value - 1);
}

function addFilterRow() {
     if (rowsVisible.value < 10) {
          var style = document.getElementById('filterRow' + rowsVisible.value).style;
          style.display = '';
          removeButtonTds(rowsVisible.value - 1);
          addButtonTds(rowsVisible.value);
          rowsVisible.value++;
          if (window.getUtilityListValues) {
              getUtilityListValues(document.getElementById('searchField' + (rowsVisible.value - 1)), "PhoneFindListForm", updateUtilityList);
          }
     }
}

function removeFilterRow() {
     if (rowsVisible.value > 1) {
          var style = document.getElementById('filterRow' + (rowsVisible.value - 1)).style;
          style.display = 'none';
          rowsVisible.value--;
          removeButtonTds(rowsVisible.value);
          addButtonTds(rowsVisible.value - 1);
          if (window.getUtilityListValues) {
              getUtilityListValues(document.getElementById('searchField' + (rowsVisible.value - 1)), "PhoneFindListForm", updateUtilityList);
          }
     }
}

function clearFilter() {
     while (rowsVisible.value > 1) {
          var style = document.getElementById('filterRow' + (rowsVisible.value - 1)).style;
          style.display = 'none';
          rowsVisible.value--;
          removeButtonTds(rowsVisible.value);
     }
     addButtonTds(rowsVisible.value - 1); // should be row 0
}

function removeButtonTds(rowIndex) {
     var index = startTdIndex;
     var currentRow = document.getElementById('cuesTableFilter').rows[rowIndex].cells;
     for (var i=0; i < savedTdData.length; i++) {
          // show td contents on current row
          currentRow[index].innerHTML = '';
          index++;
     }
}

function addButtonTds(rowIndex) {
     var index = startTdIndex;
     var index = startTdIndex;
     var currentRow = document.getElementById('cuesTableFilter').rows[rowIndex].cells;
     for (var i=0; i < savedTdData.length; i++) {
          // show td contents on current row
          currentRow[index].innerHTML = savedTdData[i];
          index++;
     }
}


//End -->
</script>
<!-- ******* END  OF GENERATED JAVASCRIPTS (Search within Search DHTML) ******* -->

<!-- ******* FINDLIST : End of GENERATED HTML ******* -->



    

    
    
    

 
    

    
    
    

    
    

    
    
    

    
    

    
    
    

    
    
    
    

            
    

    
    
    
    
    
    
</form>


<form name="resetForm" method="post" action="/ccmadmin/reset.do?devices=formPost" target="newTarget"><div><input type="hidden" name="org.apache.struts.taglib.html.TOKEN" value="a9a2f471b79adfada5cdbda2ec34aba8"></div>
    <input type="hidden" name="pkid" value="">
    <input type="hidden" name="supportedResetType" value="">
</form>

<form name="resetForm" method="post" action="/ccmadmin/resetApplyConfig.do?devices=formPost" target="newTarget"><div><input type="hidden" name="org.apache.struts.taglib.html.TOKEN" value="a9a2f471b79adfada5cdbda2ec34aba8"></div>
    <input type="hidden" name="pkid" value="">
</form>




    <!-- ******* BEGIN OF GENERATED JAVASCRIPTS (BUTTONS) ******* -->
<script language="JavaScript" type=text/javascript>
<!-- Begin 


  window.onload = initPage;

  function initPage() {
     document.forms[0].action += "?recCnt=" + 0 + "&colCnt=8" ;
}

  function onAddNew(){
    window.location ="/ccmadmin/phoneEdit.do";
}

function onDeleteSelected() {
   var count = getSelectedCount(document.forms[0]);
     if (count == 0) {
        alert('There are no Phone currently selected. Click one or more checkboxes to select Phone and try again.');
     }
    else if (confirm('You are about to permanently delete one or more Phones.  This action cannot be undone.  Continue?')) {
        document.forms[0].action = "phoneFLDeleteSelected.do?recCnt=" + 0 + "&colCnt=8" ;
        document.forms[0].submit();
    }
}

function onRefresh() {

}

function onAddSelected()
{
    var els = document.forms[0].elements;
    var txt = null;
    var val = null;
    var multiple = null
    var numCheckboxes = -1;

    // scan checkboxes for selected rows
    for (var i = 0; i < els.length; i++)
    {
        if ( (els[i].type == "checkbox") && (els[i].name.slice(0,6) == "result") )
        {
            if (els[i].name.indexOf("result") == 0)
            {
                numCheckboxes++;
                
                if (els[i].checked)
                {
                    // extract the hidden values for this row from form
                    var elName = "result[" + numCheckboxes + "].col[1].stringVal";
                var elValue = "result[" + numCheckboxes + "].col[0].stringVal";
                    
                    val = els[elValue].value;
                    txt = els[elName].value;
                    
                    // set value in caller
                    if (window.opener)
                    {
                        if (txt != null && val != null)
                        {
                            window.opener.addCurrentSearchItem(txt, val);
                        }
                    }
                    
                    if (multiple == false)
                    {
                        break;
                    }
                }
            }
        }
    }
        
    if (txt == null & val == null)
    {
        return;
    }
        
    closeWin();
}

function onResetSelected() {

resetSelected(0,1,'There are no Phone currently selected. Click one or more checkboxes to select Phone and try again.');

}
function onApplyConfigSelected() {

applyConfigSelected(0,'There are no Phone currently selected. Click one or more checkboxes to select Phone and try again.');

}
//End -->
</script>
<!-- ******* END  OF GENERATED JAVASCRIPTS (BUTTONS) ******* -->
 



<script language="JavaScript" type="text/javascript">


window.onload = initPage;
    
function initPage() {
    document.forms[0].action += "?lookup=true&multiple=false&whereClause=device.tkClass=1" + "&recCnt=" + 0 + "&colCnt=17";
        getUtilityListValues( document.getElementById('searchField' + (rowsVisible.value - 1)),"PhoneFindListForm", updateUtilityList);
}
    

function onResetSelected() {
    resetSelected(0,0,'There are no phones currently selected.  Click one or more checkboxes to select phones and try again.');
}

// Reload the form
function doRefresh()
{
  var val = document.forms[0].searchField.value;
  document.forms[0].action = "phoneFindList.do?updateCookie=true&lookup=true&multiple=false&whereClause=device.tkClass=1";
  document.forms[0].submit();
}

// Reload the form
function doSearchUpdate()
{
  var val = getValue(document.forms[0].additionalsearch);
  document.forms[0].searchString.value = val;
}

</script> 
 
                            </div>
                        </td>
                    </tr>
                </table>

            <script>

            try {
                var objStatus = document.getElementsByTagName("LEGEND")[0];
                if ("Status" == objStatus.innerText) {
                    objStatus.parentNode.focus();
                }
            } catch(e) {
                //alert(e.message);
            }

            // Set the timeout to a variable, so we can cancel by calling the clearSecurityTimeout function defined below.
            // This can be used  by ajax to cancel the timeout function
            // need to convert SESSION_TIMEOUT value from minutes to milliseconds
            var timeout = 30*1000*60;
            var SECURITY_TIMEOUT = setTimeout('logout()', timeout);

            function clearSecurityTimeout() {
                if (SECURITY_TIMEOUT) {
                    clearTimeout(SECURITY_TIMEOUT);
                }
            }


            function logout()
            {
                if ( window.opener != null) {
                   alert('Your session has timed out.  Select OK to close this window.');
                   window.close();
                }
                else{
                      window.top.location = "/ccmadmin/logoff.do";
                    }
            }

        </script>
        <script>nsOnResize();</script>

    </body>
</html>

Bare in mind that I have no control over this HTML so it cannot be changed.  All HTML output is via a network device.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...