function ajax_example_advanced_commands_restripe_num_rows

Callback for 'restripe'.

Rebuilds the table with the selected number of rows.

1 string reference to 'ajax_example_advanced_commands_restripe_num_rows'
ajax_example_advanced_commands in ajax_example/ajax_example_advanced.inc
Form to display the AJAX Commands.

File

ajax_example/ajax_example_advanced.inc, line 380

Code

function ajax_example_advanced_commands_restripe_num_rows($form, $form_state) {
    $num_rows = $form_state['values']['restripe_num_rows'];
    $output = "<table id='restripe_table' style='border: 1px solid black'>";
    for ($i = 1; $i <= $num_rows; $i++) {
        $output .= "<tr><td>Row {$i}</td></tr>";
    }
    $output .= "</table>";
    return $output;
}