No test page, but I did manage to get it working. Turns out I had a
line at the start of my updateCity function which was setting the
state value back to the first option after the updateState had
finished doing its thing. So in fact, the function from my original
post works fine now that the stat
This usually works:
Colorado
Idaho
$('#field-state').val('idaho')
or
$('#field-state option[value=idaho]').attr('selected','selected')
or
var state = 'idaho';
$('#field-state').find('option[value='+state
+']').attr('selected','selected');
could you provide a test page exhibiting your
Thanks for the tip, ricardo.
I've decided to initialise the dropdowns with the existing form values
before triggering a click event, but I've run into another problem. I
can't seem to set the selected option.
I've tried the following with a hardcoded value for state without any
luck.
$('#field-
You can do $("#field-state").unbind('change'); when it starts being
edited and bind the function again when it's done, or you can put
everything in the function inside an IF statement which depends on the
edit mode.
- ricardo
On Oct 17, 12:41 pm, newkid85 <[EMAIL PROTECTED]> wrote:
> I have a fo
4 matches
Mail list logo