Hi,
In my application I have 2 select boxes one populated with chapter and
the other with topic of that chapter. The notes for this combination
are displayed in the div.
The code is
<?php echo form_remote_tag(array(
    'update'   => 'studymaterial',
    'url'      => 'studymaterial/notes',
        'complete' => remote_function(array(
        'update' => 'myPagination',
        'url' => "studymaterial/paging",
        'with'    => "'id=' + \$F('chapter')",
        'script' =>TRUE,
)),
'script' => TRUE,
  ))
?>
<table width="84%" border="0" cellspacing="0" cellpadding="3">
                        <tr>
                          <td><span class="style_form">
                            <?php echo select_tag('chapter',
objects_for_select(
           $chapters, 'getChapterId', 'getChapters'),
           array(
               'onchange' =>
                 remote_function(array(
                   'update' => 'item_topic',
                   'url' => 'studymaterial/topic',
                   'with' => "'id=' + this.options
[this.selectedIndex].value"
                 ))
           )
           ) ?>
                          </span></td>
                        </tr>
                        <tr>
                          <td><span class="style_form">
                            <div id="item_topic" class="style_form">
  <?php echo select_tag('topic', objects_for_select(
           $topic, 'getTopic', 'getTopic'
                 )) ?>
  </div>
                          </span></td>
                        </tr>
                        <tr>
                          <td><span style="margin-left:4px;">
                            <?php echo submit_tag('Get Notes') ?>
                          </span></td>
                        </tr>
                      </table>

</form>
<?php end_slot() ?>

<?php slot('studycontent') ?>
<div id="studymaterial">
</div>

<?php end_slot() ?>

<?php slot('pagination')?>
<div id="myPagination">

</div>
<?php end_slot()?>


In the pagination slot, i am displaying the number of pages for the
selected chapter..one for each topic.
My questions
1. How do I chnage the topic select box according to the page selected
by user? If page 3 is clicked then the notes for that topic should be
displayed and the topic select box should show topic 3.
2. If i have some link in the notes section like <a href> click for
more information</a> then on back button click I should display to
user the 2 select boxes with chosen values and the notes for that
combination.

How to achieve this?
Thanks for any help in advance.

Priya

--

You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@googlegroups.com.
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en.


Reply via email to