當前位置: 首頁>>代碼示例>>PHP>>正文


PHP ViewList::processSearchForm方法代碼示例

本文整理匯總了PHP中ViewList::processSearchForm方法的典型用法代碼示例。如果您正苦於以下問題:PHP ViewList::processSearchForm方法的具體用法?PHP ViewList::processSearchForm怎麽用?PHP ViewList::processSearchForm使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在ViewList的用法示例。


在下文中一共展示了ViewList::processSearchForm方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: processSearchForm

    function processSearchForm()
    {
        parent::processSearchForm();
        if (isset($_REQUEST['search_from_view']) and $_REQUEST['search_form_view'] == 'advanced_search') {
            $field_p = 'province_c_advanced[]';
            $field_c = 'city_c_advanced[]';
        } else {
            $field_p = 'province_c_basic[]';
            $field_c = 'city_c_basic[]';
        }
        echo '<script language="javascript">
            var c_obj = document.getElementsByName("' . $field_c . '");  

            var p_obj = document.getElementsByName("' . $field_p . '");

            p_obj[0].onchange = function() { 
                var c_value = c_obj[0].value;
                var success = function (data) {
                    if (data) {
                        c_obj[0].options.length = 0;
                        c_obj[0].innerHTML = data.responseText;
                        c_obj[0].value = c_value;
                        }
                    }

                var path = "index.php?module=JrMis_Departments&action=getCityDropDownOptions&sugar_body_only=1&id="+this.value; 
                var cObj = YAHOO.util.Connect.asyncRequest("GET", path, {success: success, failure: success});
                
            }
            p_obj[0].onchange();
        </script>';
    }
開發者ID:jeffcao,項目名稱:fzglsys_v5,代碼行數:32,代碼來源:view.list.php

示例2: testprocessSearchForm

 public function testprocessSearchForm()
 {
     //test without use_old_search. it should return html.
     $view = new ViewList();
     $view->prepareSearchForm();
     ob_start();
     $view->processSearchForm();
     $renderedContent = ob_get_contents();
     ob_end_clean();
     $this->assertGreaterThan(0, strlen($renderedContent));
     //test with use_old_search = true. there is a $view variable which is never set so it doesn't returns anything.
     $view = new ViewList();
     $view->prepareSearchForm();
     $view->use_old_search = true;
     ob_start();
     $view->processSearchForm();
     $renderedContent = ob_get_contents();
     ob_end_clean();
     $this->assertEquals(0, strlen($renderedContent));
 }
開發者ID:sacredwebsite,項目名稱:SuiteCRM,代碼行數:20,代碼來源:view.listTest.php


注:本文中的ViewList::processSearchForm方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。