jQuery4PHP Current Release: v1.7.0 - Stable

jQuery version: v1.8.2

jQueryUI version: Stable (1.8.24: jQuery 1.3.2+)

jQuery4php API

RelatedSelects

Hide navigator Hide source code

Disable if empty


<?php YsJQuery::usePlugin(YsJQueryConstant::PLUGIN_RELATED_SELECTS); ?>

<button id="btnOpenDialog">Show Demo</button>
<?php echo YsUIDialog::initWidget('dialogId','style="display:none" title="Basic dialog"') ?>
  <form id="example-1">
    <div id="lblLoading"></div>
    <table>
      <tr>
        <td><label for="optUndefined">Leagues:</label></td>
        <td>
          <select name="optUndefined">
            <option value="es">Liga Española de fútbol</option>
            <option value="de">Bundesliga</option>
            <option value="ve">Liga Venezolana de fútbol</option>
          </select>
        </td>
      </tr>
      <tr>
        <td><label for="optTeams">Teams:</label></td>
        <td>
        <select name="optTeams" id="optTeams">
        </select>
        </td>
      </tr>
      <tr>
        <td><label for="optPlayers">Players:</label></td>
        <td>
        <select name="optPlayers">
        </select>
        </td>
      </tr>
    </table>
  </form>
<?php echo YsUIDialog::endWidget() ?>


<?php
echo
YsJQuery::newInstance()
  ->onClick()
  ->in('#btnOpenDialog')
  ->execute(
    YsUIDialog::build('#dialogId')
      ->_modal(true)
      ->_width(670)
      ->_height('auto')
      ->_buttons(array(
        'Ok' => new YsJsFunction('alert("Hello world")'),
        'Close' =>  new YsJsFunction(YsUIDialog::close('this')))
       ),
   YsRelatedSelects::relate()->in('#example-1')
    ->_selects(array('optUndefined','optTeams','optPlayers'))
    ->_dataType('html')
    ->_disableIfEmpty(true)
    ->_onChangeLoad('examples/response/relatedSelectResponse.php')
  )
?>

About

Demos

jQueryUI

Plugins Support - New!

Components - New!

Project Developed by The YepSua Team
SourceForge.net