I'm using smarty in conjunction with cakephp. I am able to successfully
observe my select field and pass the desired value to the controller.
The problem I am having is that the observeField function submits the
value as soon as the mouse is moved over the new value, and before the
user actually clicks on it. Here is the code that I am using:

<td>
<form id="numrepairform" name="numrepairform" method="post"
action="/jobs/repairsRequested" class="noattrib">
        <select id="Co_timeperiod" name="Co_timeperiod">
                <option value="">Select Period</option>
                <option value="YTD">Year To Date</option>
                <option value="MTD">Month To Date</option>
                <option value="YST">Yesterday</option>
                <option value="TDY">Today</option>
                <option value="LSY">Last Year</option>
        </select>
{assign_assoc var="ajaxattrib" value="url=>/jobs/repairsRequested,
with=>document.numrepairform.Co_timeperiod.options[element.selectedIndex],
update=>Co_staticrepairnum"}
{$ajax->observeField('Co_timeperiod', $ajaxattrib)}
</form>
</td>
<td><span id="Co_staticrepairnum">[YTD #]</span></td>

Any ideas as to how I can prevent it from submitting the value until
the user actually clicks on it?

Thanks for your help.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to