Hi Carsten,
Sorry about the delay in my response.
I'm not an expert in Ajax and as such, this code I was using is copy &
pasted from the symfony forums. Independently, they work. It's when
I try and combine the two that I get nothing working with the remote
function. I'm getting the same error as you mentioned. I'm not sure
what your suggestion of using $F('city') instead means. Where would I
use that in the code?
The error message I receive is the same that you mentioned.
"this.selectedIndex has no properties", Line 1
I appreciate your assistance. Thank you.
Shannon
On Dec 13, 2:47 am, "Carsten Schumann"
<[EMAIL PROTECTED]> wrote:
> Hi Shannon,
>
> i have tried your code snippet. To me, both your autocompletion and onBlur
> are triggered fine but your parameter for the autocompleter throws a
> javascript error:
>
> this.options[this.selectedIndex].value
>
> As far as i know, the current value of a normal input field is not
> accessible this way. Have you tried to use $F('city') instead?
>
> If this suggestion is not working, could you please provide a more detailed
> problem report what is working and what not?
>
> Carsten
>
> On Dec 12, 2007 9:14 PM, shannon.patterson <[EMAIL PROTECTED]>
> wrote:
>
>
>
> > Hello All,
>
> > I have a form element where after the data has been filled in (with an
> > auto complete handler), I would like the next form element to be
> > filled in as well, with some corresponding data. This is essentially
> > a city/state combo. The code I have for this is:
>
> > <?php echo input_auto_complete_tag('city', '', "ispUser/autocomplete",
> > array ('autocomplete' => 'off',
> > 'frequency' => '0.5s',
> > 'onBlur' => remote_function( array('update' =>
> > 'StateSelection',
> > 'url' => 'ispUser/new',
> > 'with' => "'id=' + this.options[this.selectedIndex
> > ].value",
> > 'loading' => "Element.show('indicator')",
> > 'complete' => "Element.hide('indicator')"))),
> > array ('use_style' => true, )); ?>
>
> > If I have simply a remote_function in the field, it works fine, but
> > will not integrate into the auto_complete. Any suggestions for how I
> > can get this working?
>
> > Thanks,
> > Shannon
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"symfony users" 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/symfony-users?hl=en
-~----------~----~----~----~------~----~------~--~---