I Love PHPMaker

... because it gets even more powerful and flexible!!

  • About
  • Terms and Conditions
  • Membership Options
  • Sitemap
  • Downloads
    • PHPMaker Extensions Download
    • PHPMaker Projects Download
    • PHP Report Maker Extensions Download
I Love PHPMaker » Customize Template » How to Add jQuery slideDown and slideUp Effects into the Search Panel in Websites that Created with PHPMaker 9.0.1
How to Add Our New Style into Theme of PHPMaker 9.0.1
How to Disable/Enable the Registration Page in Websites that Created with PHPMaker 9.0.1

May 24, 2012

How to Add jQuery slideDown and slideUp Effects into the Search Panel in Websites that Created with PHPMaker 9.0.1

The following customization will add jQuery slideDown and slideUp effects into your Search Panel of web application that generated with PHPMaker 9. Please note that you have to implement the related modification I made first before doing the following modification. Warning: You cannot implement the modification below before implementing the modification I mentioned earlier. So, please be kind!

As we know, up to PHPMaker version 9, by default, it has added the ability to collapse or expand the Search Panel that located above the main table, by clicking the “minus” (-) or “plus” (+) button (toggle button) next to the “Search” text, but without using the slideDown and slideUp effects.

After implementing this modification, you will know how to implement the jQuery in websites that created with PHPMaker easily and quickly, especially adding the slideDown and slideUp effects. Your website will look more professional and the user will be happier to see this effect.

All we have to do is customizing the PHPMaker template files and adjusting some settings in PHPMaker. In other words, we do not modify any generated script files.

Updated on May 30, 2012: This customization has been implemented in PHPMaker version 9.0.2, it matches to each other, and as a result, it works properly.

Updated on July 21, 2012: This customization has been implemented in PHPMaker version 9.0.3, it matches to each other, and as a result, it works properly.

Updated on September 5, 2012: This customization has been implemented in PHPMaker version 9.0.4, it matches to each other, and as a result, it works properly.

Updated on November 28, 2012: This customization has been implemented in PHPMaker version 9.1.0, it matches to each other, and as a result, it works properly.

Updated on February 9, 2013: This customization has been implemented in PHPMaker version 9.2.0, it matches to each other, and as a result, it works properly.

Updated on June 17, 2013: This customization below has been handled by using MasinoSearchPanel extension. You don’t need to implement the customization below if you use my extensions together with the original PHPMaker Template and Extension files.

[hidepost]

  1. Open your \Script\ew_addon.js file, and find this code (PHPMaker version <= 9.0.2): [code lang="php"]

    // Init search panel as collapsed
    .InitSearchPanel = true;

    // Init search panel as expanded
    .InitSearchPanel = false;


    [/code]

    or if you are using PHPMaker version >= 9.0.3, then find this code:

    <!--## if ((bBasicSearch || bExtendedBasicSearch || bAdvancedSearch) && sId == "list") { ##-->
    <?php if (MS_SEARCH_PANEL_COLLAPSED) { ?>
    // Init search panel as collapsed
    if (<!--##=sFormNameSearch##-->) <!--##=sFormNameSearch##-->.InitSearchPanel = true;
    <?php } else { ?>
    // Init search panel as expanded
    if (<!--##=sFormNameSearch##-->) <!--##=sFormNameSearch##-->.InitSearchPanel = false;
    <?php } ?>
    <?php // End of modification Customizing Search Panel, by Masino Sinaga, May 1, 2012 ?>
    <!--## } ##-->
    

    then replace it with the following code (PHPMaker version <= 9.0.2): [code lang="php"]

    // Init search panel as collapsed
    .InitSearchPanel = true;
    // Begin of modification SlideUp and SlideDown, by Masino Sinaga, May 14, 2012
    $(document).ready(function() {
    $("a#searchPanelAnchor").html('');
    $('div#_SearchPanel').hide();
    });
    // End of modification SlideUp and SlideDown, by Masino Sinaga, May 14, 2012

    // Init search panel as expanded
    .InitSearchPanel = false;
    // Begin of modification SlideUp and SlideDown, by Masino Sinaga, May 14, 2012
    $(document).ready(function() {
    $("a#searchPanelAnchor").html('');
    $('div#_SearchPanel').show();
    });
    // End of modification SlideUp and SlideDown, by Masino Sinaga, May 14, 2012



    [/code]

    or if you are using PHPMaker version >= 9.0.3, then replace with the following code:

    <!--## if ((bBasicSearch || bExtendedBasicSearch || bAdvancedSearch) && sId == "list") { ##-->
    <?php if (MS_SEARCH_PANEL_COLLAPSED) { ?>
    // Init search panel as collapsed
    if (<!--##=sFormNameSearch##-->) <!--##=sFormNameSearch##-->.InitSearchPanel = true;
    // Begin of modification SlideUp and SlideDown, by Masino Sinaga, May 14, 2012
    $(document).ready(function() {
      $("a#searchPanelAnchor").html('<img src="phpimages/expand.gif" alt="" width="9" height="9" border="0">');
      $('div#<!--##=sFormNameSearch##-->_SearchPanel').hide();
    });
    // End of modification SlideUp and SlideDown, by Masino Sinaga, May 14, 2012
    
    <?php } else { ?>
    // Init search panel as expanded
    if (<!--##=sFormNameSearch##-->) <!--##=sFormNameSearch##-->.InitSearchPanel = false;
    // Begin of modification SlideUp and SlideDown, by Masino Sinaga, May 14, 2012
    $(document).ready(function() {
      $("a#searchPanelAnchor").html('<img src="phpimages/collapse.gif" alt="" width="9" height="9" border="0">');
      $('div#<!--##=sFormNameSearch##-->_SearchPanel').show();
    });
    // End of modification SlideUp and SlideDown, by Masino Sinaga, May 14, 2012
    <?php } ?>
    <?php // End of modification Customizing Search Panel, by Masino Sinaga, May 1, 2012 ?>
    <!--## } ##-->
    
  2. Open your \Script\list-script.php file, and find this code:

    <!--##=sFormName##-->.Init();
    </script>
    

    after the last line of that code, please insert the following code:

    <script type="text/javascript">
    // Begin of modification jQuery for slideDown and slideUp effect in search panel, by Masino Sinaga, May 14, 2012
    $(document).ready(function() {
      // trigger the function when clicking on an assigned element
      $('a#searchPanelAnchor').click(function ()
      {
       if ($('div#<!--##=sFormNameSearch##-->_SearchPanel').is(':hidden')) {
        $('div#<!--##=sFormNameSearch##-->_SearchPanel').slideDown(300, function () {
        $("a#searchPanelAnchor").html('<img src="phpimages/collapse.gif" alt="" width="9" height="9" border="0">') });
       } else {
        $('div#<!--##=sFormNameSearch##-->_SearchPanel').slideUp(300, function () {
        $("a#searchPanelAnchor").html('<img src="phpimages/expand.gif" alt="" width="9" height="9" border="0">') });
       }  
      });
    });
    // End of modification jQuery for slideDown and slideUp effect in search panel, by Masino Sinaga, May 14, 2012
    </script>
    
  3. Open your \Script\list-script-search.php file, and find this code:

    <a href="javascript:<!--##=sFormNameSearch##-->.ToggleSearchPanel();" style="text-decoration: none;">
    

    then replace it with the following code:

    <a href="javascript:<!--##=sFormNameSearch##-->.ToggleSearchPanel();" id="searchPanelAnchor" style="text-decoration: none;">
    
  4. Open your .pmp (PHPMaker project) file, and go to Tools -> Advanced Settings, and make sure you have already given checkmark to the following item:
    - Use jQuery (only exists in PHPMaker version < 9.1.0) - Local YUI/jQuery files (PHPMaker version >= 9.1.0)
    afterwards, click on OK button.
  5. Re-generate your script files using PHPMaker as always, and enjoy the result!

[/hidepost]

Article by Masino Sinaga / Customize Template / jQuery, PHPMaker 9.0.1, PHPMaker 9.0.2, PHPMaker 9.0.3, PHPMaker 9.0.4, PHPMaker 9.1.0, PHPMaker 9.2.0, Search Panel, slideDown, slideUp 14 Comments

How to Add Our New Style into Theme of PHPMaker 9.0.1
How to Disable/Enable the Registration Page in Websites that Created with PHPMaker 9.0.1

Comments

  1. Andrew Pietrzyk says

    September 21, 2012 at 11:13 pm

    Hi,

    I’m not seeing some of the files you reference here. Are there some advanced settings features that must be enabled in order to generate these files? ew_addon.js and the list-script-*.php files aren’t present in my project.

    Thanks!

    Log in to Reply
    • Masino Sinaga says

      September 21, 2012 at 11:23 pm

      For the reference files, see step 4. Since we are using jQuery, then make sure you have enabled its setting from Tools -> Advanced Settings in PHPMaker.

      Regarding the ew_addon.js and list-script-*.php files, they are located in your template file. Usually in C:\Documents and Settings\{YourUserName}\My Documents\PHPMaker\Templates\phpv90.zip\Script\ folder.

      Log in to Reply
      • Andrew Pietrzyk says

        November 20, 2012 at 11:13 pm

        Masino,

        Is there a way that the search panel can be collapsed (+) by default rather than expanded?

        Log in to Reply
        • Masino Sinaga says

          November 20, 2012 at 11:29 pm

          Yes. Simply go to Tools -> Advanced Settings of your PHPMaker, then make sure you have given the checked mark at the Initiate search panel as collapsed, and click on OK button, then re-generate your script files.

          Log in to Reply
          • Andrew Pietrzyk says

            November 21, 2012 at 10:27 am

            Yeah, tried that but doesn’t work. All grids still open with search expanded. Any other ideas?

            Log in to Reply
            • keithh0427 says

              December 6, 2012 at 9:50 am

              Same here.

              Log in to Reply
              • Masino Sinaga says

                December 6, 2012 at 11:35 am

                The customization is related to this article: How to Customize Search Panel Style in Websites that Created With PHPMaker 9.0.1. If you have implemented the customization in that article, then you should find the constant in your ewcfg9.php file as following by default:

                // Begin of modification Customizing Search Panel, by Masino Sinaga, for customize search panel, May 1, 2012
                define("MS_SEARCH_PANEL_COLLAPSED", FALSE, TRUE); // Whether to collaps or expand the search panel
                // End of modification Customizing Search Panel, by Masino Sinaga, for customize search panel, May 1, 2012
                

                then change it become the following in order to make your Search Panel collapsed by default:

                // Begin of modification Customizing Search Panel, by Masino Sinaga, for customize search panel, May 1, 2012
                define(“MS_SEARCH_PANEL_COLLAPSED”, TRUE, TRUE); // <-- collapse as default // End of modification Customizing Search Panel, by Masino Sinaga, for customize search panel, May 1, 2012 [/code]

                Log in to Reply
              • keithh0427 says

                December 6, 2012 at 9:23 pm

                I tried that. And, yes, it is collapsed. However, it stays collapsed and won’t open.

                Log in to Reply
              • Masino Sinaga says

                December 7, 2012 at 8:36 am

                Keith, if you want to expand the Search panel when users has entered the search keyword in it, then please implement the customization in the article: How to Make Search Panel Expanded If Search Criteria Has Been Defined by Users in Websites that Generated by PHPMaker 9.0.4. Does it make sense for you?

                Log in to Reply
  2. keithh0427 says

    December 7, 2012 at 9:50 am

    Masino,

    yes it makes sense. however, the problem still exists. The Search panel is always open or is always closed. the icon to open/close it is not functioning.

    Log in to Reply
    • Masino Sinaga says

      December 7, 2012 at 9:56 am

      Double check your customized code based on this article. Make sure you have followed the instruction carefully, also let me know, what version are you using?

      Log in to Reply
      • keithh0427 says

        December 7, 2012 at 10:16 pm

        I’ve double checked it twice, but will do so again. I’m using 9.1.0

        Log in to Reply
        • Masino Sinaga says

          December 7, 2012 at 10:41 pm

          I’ve just re-implemented the customization from the following articles (the older one first) into the fresh original template:

          – How to Customize Search Panel Style in Websites that Created With PHPMaker 9.0.1
          – How to Add jQuery slideDown and slideUp Effects into the Search Panel in Websites that Created with PHPMaker 9.0.1

          and it works properly.

          Just wanted to remind you, there are some different code between version 9.1.0 and the older than 9.1.0. Please read and do it carefully again. Good luck.

          Log in to Reply

Trackbacks

  1. How to Make Search Panel Expanded If Search Criteria Has Been Defined by Users in Websites that Generated by PHPMaker 9.0.4 — I Love PHPMaker says:
    November 5, 2012 at 8:58 pm

    […] articles: – How to Customize Search Panel Style in Websites that Created With PHPMaker 9.0.1 – How to Add jQuery slideDown and slideUp Effects into the Search Panel in Websites that Created with … then you have to implement the customizations in those two articles above before implementing the […]

    Log in to Reply

Leave a Reply Cancel reply

You must be logged in to post a comment.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Recent Posts

  • A New PHPMaker 2025 Project File Is Released
  • PHPMaker 2025 Demo Project File Is Released
  • Masino Extensions for PHPMaker 2025 Is Released!
  • A New PHPMaker 2024 Project File Is Released
  • PHPMaker 2024 Demo Project File Is Released
  • Masino Extensions for PHPMaker 2024 Is Released!
  • PHPMakerProjects.com, For Those Who Need PHPMaker Project Sample
  • A New PHPMaker 2023 Project File Is Released
  • PHPMaker 2023 Demo Project File Is Released
  • Masino Extensions for PHPMaker 2023 Is Released!

Search

Recent Comments

  • Masino Sinaga on Masino Extensions for PHPMaker 2024 Is Released!
  • Masino Sinaga on A New PHPMaker 2024 Project File Is Released
  • Masino Sinaga on PHPMaker 2023 Demo Project File Is Released
  • Edward Babatunde on PHPMaker 2023 Demo Project File Is Released
  • Edward Babatunde on Masino Extensions for PHPMaker 2024 Is Released!

Demo Website

  • Demo of I Love PHPMaker 2025 (MasinoExtensions).
  • Stock Inventory Management for PHPMaker 2025.

Another Demo

The following template are not available in this site (must be purchased separately)

  • PHPMaker v2018 Horizontal Vertical Template.
  • PHPMaker v2017 Horizontal Vertical Template.

Demo Explanation

Stock Inventory Management is the good project for your reference, since it uses the real example in the real world. Many useful features you can use from this project, such as how to add the Thousand and Decimal separator character, and also how to calculate multiple row in Grid-Add when End-Users are entering data into the Grid-Add mode.

Categories

  • Customize Template (103)
  • General (4)
  • PHP Report Maker (17)
  • PHP Report Maker Extensions (2)
  • PHPMaker Extensions (84)
  • PHPMaker Projects (7)
  • Tips and Trick (72)

Articles based on version

  • PHPMaker 2025
  • PHPMaker 2024
  • PHPMaker 2023
  • PHPMaker 2022
  • PHPMaker 2021
  • PHPMaker 2020
  • PHPMaker 2019
  • PHPMaker 2018
  • PHPMaker 2017.0.7
  • PHPMaker 12.0.7
  • PHPMaker 11.0.6
  • PHPMaker 10.0.5
  • PHPMaker 9.2.0
  • PHPMaker 8.0.3
  • PHP Report Maker 12

(c) I Love PHPMaker 2010 - 2025 by Masino Sinaga | WordPress | Log in | Back to top