jQuery4PHP Current Release: v1.7.0 - Stable

jQuery version: v1.8.2

jQueryUI version: Stable (1.8.24: jQuery 1.3.2+)

jQuery4php API

Multiselect

Hide navigator Hide source code

Enable Disable

<button id="btnOpenDialog">Show Demo</button>
<?php echo YsUIDialog::initWidget('dialogId',
                                  'style="display:none"
                                   title="Demo"')?>

<select id="optMultiselect" title="Basic example" multiple="multiple" name="example-basic" size="5">
  <option value="option1">Option 1</option>
  <option value="option2">Option 2</option>
  <option value="option3">Option 3</option>
  <option value="option4">Option 4</option>
  <option value="option5">Option 5</option>
</select>
<br/><br/>
<div id="myButtons"> 
  <input id="btnDisable" type="button" value="Disable" />
  <input id="btnEnable" type="button" value="Enable" />
</div>


<?php echo YsUIDialog::endWidget() ?>

<?php
echo
YsJQuery::newInstance()
  ->onClick()
  ->in('#btnOpenDialog')
  ->execute(
    YsUIDialog::build('#dialogId')
      ->_modal(true)
      ->_height(400)
      ->_buttons(array(
          'Ok' => new YsJsFunction('alert("Hello world")'),
          'Close' =>  new YsJsFunction(YsUIDialog::close('this')))
       ),
    YsUIButton::build()->in('#myButtons > input'),
    YsUIMultiSelect::build()->in('#optMultiselect')
  );

echo
YsJQuery::newInstance()->onClick()->in('#btnDisable')
  ->execute(
    YsUIMultiSelect::disable('#optMultiselect')      
  );

echo
YsJQuery::newInstance()->onClick()->in('#btnEnable')
  ->execute(
    YsUIMultiSelect::enable('#optMultiselect')           
  );
?>

Comments

  • Support requests, bug reports, and off-topic comments will be deleted without warning.

blog comments powered by Disqus

About

Demos

jQueryUI

Plugins Support - New!

Components - New!

Project Developed by The YepSua Team
SourceForge.net