1 Reply Latest reply on Jun 7, 2011 7:14 PM by George_Johnson

    DW renames checkboxes without obvious permission

    johnbirt

      Hi all.

       

      Not used DW (CS5) for some time so very rusty. Just used it to edit a form for selecting holiday apartments for booking and providing estimated cost,

       

      It has a number of checkboxes with ID="Apt_1" and name="Apartment", ID="Apt_2" and name="Apartment" etc. etc. The Javascript I used worked perfectly fine to process the form.

       

      To improve layout and start to develop the proposed site, I opened it in DW. Added a table to organise layout better and DW decided it would alter the checkbox names to the ID's so name="Apt_1" etc. rather than name="Apartment". This appeared to happen when I dragged the boxes into table cells.

       

      Any ideas as to why it does this? Any way of avoiding it? Should I use Apartment[] as name instead. The code uses fragments like

      frm.elements("Apartment" + j).checked

      to access the checkboxes which have several associated text inputs "Adults_1", "Children_1" etc etc.

       

      I would prefer to leave code as it is if possible as it works untill DW mangles it and I'm not the most prolific Javascript coder. Access to other elements follow the frm.elements("eltname" + j).value pattern.

       

      Thanks.

       

      John B