Results 1 to 2 of 2

Thread: Problems with state/city ajax search

  1. #1
    Join Date
    Feb 2008
    Posts
    27

    Default Problems with state/city ajax search

    Hi.

    I have the addon installed and it works great except that it is reffering to the form element using arrays:

    <select spry:repeatchildren="dsStates" name="state" onchange="document.forms[0].city.disabled = true; dsStates.setCurrentRow(this.selectedIndex);">

    Because of document.forms[0].city.disabled the form that contains the ajax script has to allways be the first one on the page.
    If for instance the number of forms in the template is changing dinamicaly, the ajax addon will not be the first and so it will not work.
    I tryed to call the field using the form name:

    I.E: document.search_form.city.disabled = true but if I do that I get a js error like: document.search_form.city has no properties.

    Please help!

  2. #2
    Join Date
    Feb 2008
    Posts
    27

    Default Re: Problems with state/city ajax search

    I solved the problem.
    I should have used document.forms.search_form.city...

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •