Reputation: 1387
I create dropdown fields to show the data from a MySQL database. Everytime when I key in new data, it must refresh to read the new data. I know Ajax can do it as well. But any other idea to solve this problem without refreshing to get the new data? Just when new data key in, it will auto renew without pressing F5 or refresh.
This is my code:
<th style="width:25%"><font><div align="left">Select Product :</div></font>
<?php echo $form->input('Product',array(
'label' => 'Select Products',
'options' => $products,
'id' => 'product',
'style' => 'width:250px;height:100px',
'selected' => $html->value('Product.Product'),
'onchange' => 'List();')); ?>
</th>
<th >
Upvotes: 0
Views: 787
Reputation: 8586
I think at that point your only option is to get a magical update fairy which performs updates without performing updates.
Seriously though, Ajax isn't that hard for something this simple.
Upvotes: 1