Help with Forms using Javascript

Discussion in 'JavaScript' started by karter9977, Nov 7, 2012.

  1. #1
    Hi everyone,

    I have a drop down menu form that uses javascript. The forms works great but I tried adding another exact same form on the same page and while the first one still works the new one does not. I tried changing the form name of the 2nd one but it still doesnt work.

    Any help would be great.

    Thanks,

    Steve
     
    karter9977, Nov 7, 2012 IP
  2. stephan2307

    stephan2307 Well-Known Member

    Messages:
    1,277
    Likes Received:
    33
    Best Answers:
    7
    Trophy Points:
    150
    #2
    you also need to make sure that each form element id is only once on the page. so if you have a field with the id name you can't have the same id in the second form. You would have to rename it to name1 or similar.
     
    stephan2307, Nov 9, 2012 IP
  3. arsalankhan

    arsalankhan Peon

    Messages:
    66
    Likes Received:
    0
    Best Answers:
    6
    Trophy Points:
    0
    #3
    Yes check the ids of elements and also make sure that you are calling your JavaScript dropdown function for the second form also.
     
    arsalankhan, Nov 11, 2012 IP