On Jan 25, 2007, at 10:41 AM, salimk786 wrote:

>
> Thanks John for that.
> However, I'd like the form to be submitted when they choose something
> from the drop down and based on that selection, my hidden field  
> appears
> with the data based on their selection.
>
> For example. I have a list of countries. I want it so that when they
> choose their country, the states appear for that country. and when  
> they
> choose their state, the cities appear for that state.
>
>
> That is what i am trying to do... I just don't know how to submit the
> form onclick/onchange of their selection choice.

<form name="sendMe" action="/path/to/post/to" method="post">
<!-- stuff... -->
<select onchange="go()">
<!-- more stuff -->
</form>

<script type="text/javascript">
function go()
{
        document.forms.sendMe.submit();
}
</script>

-- John

>
> thanks.
>
>
> On Jan 16, 2:49 pm, "John David Anderson (_psychic_)"
> <[EMAIL PROTECTED]> wrote:
>> On Jan 16, 2007, at 2:17 PM, salimk786 wrote:
>>
>>
>>
>>> Hello,
>>
>>> I was hoping someone can piont me in the right direction.
>>> I want to have a select tag where they choose their country and once
>>> they choose a country, anotherselectTagappears asking them to choose
>>> their state and once they choose their state, they type in a message
>>> and hit submit...how can i do this?
>>
>>> So far i have this
>>> $this->set('list_countries',$this->Country->generateList(null, 'code
>>> ASC', null, '{n}.Country.code', '{n}.Country.name');
>>
>>> I dont' know how to write the view to do the stuff... please  
>>> advise.This really isn't a Cake question, so you'll have to look  
>>> in some
>> other places. If you're using prototype/scriptaculous, you could tie
>> the onChange event on one of your select elements to a Effect.Appear
>> effect described here:
>>
>> http://wiki.script.aculo.us/scriptaculous/show/Effect.Appear
>>
>> -- John
>
>
> >


--~--~---------~--~----~------------~-------~--~----~
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