0

Blockquote

Hi i have this problem: My HTML page is working fine without form, but when i put the form, than i can't select on the 1/2 finle and in finle.

See my code. How can i solve this probleem?

Blockquote

<html>
<body bgcolor=#0B4C5F>

<head>
<script type="text/javascript">
     function groupA(val) {  
        var x = document.getElementById("groupAB");
        x.options[1].value = val;
        x.options[1].text = val;
    } 
         function groupAB(val) {  
        var x = document.getElementById("groupABCD");
        x.options[1].value = val;
        x.options[1].text = val;
    }

        function groupABCD(val) {  
        var x = document.getElementById("groupABCDEFGH");
        x.options[1].value = val;
        x.options[1].text = val;
    }   
   </script>
</head>

<!--=========================================================-->
<form action="insert.php" method="post">
<!-------------------------------------------------------------------------->

<select name="Achtstelfinale1" onchange="groupA(this.value)">
<option value="Select">1e GROUP A</option>
<option value="Brazil">Brazil</option>
<option value="Mexico">Mexico</option>
<option value="Croatia">Croatia</option>
<option value="Cameroon">Cameroon</option>
</select>
<p></p>

<select name="1/4 Finale 1" id="groupAB" onchange="groupAB(this.value)">
<option value="Select">1/4 Finale 1</option>
<option value="">?</option>
    <option value="">?</option>
</select>
<p></p>

<select name="1/2 Finale" id="groupABCD" onchange="groupABCD(this.value)">
<option value="Select">1/2 FINALE 1</option>
<option value="">?</option>
<option value="">?</option>
</select> 

<p></p>

<select name="Finale" id="groupABCDEFGH" onchange="groupABCDEFGH(this.value)">
<option value="Select">FINALE 1</option>
<option value="">?</option>
<option value="">?</option>
</select> 

<!----------------->
</form>
<!----------------->
</body>
</html>
8
  • 3
    Your HTML is malformed. Open the body tag after closing the head: </head><body>. You're opening the body on line 2 now, not good. Commented Jun 1, 2014 at 12:55
  • you have no values in your option field. moreover your <body> is not proper, you might want to check that....... Commented Jun 1, 2014 at 12:56
  • I have tried after head the body </head><body> but its stil not working. Commented Jun 1, 2014 at 13:03
  • what exactly are you trying to achieve. Apart from the malformed html, you are trying to save the value selected from each droplist back to itself. This makes no sense at all. Commented Jun 1, 2014 at 13:08
  • @user3326912 - Use validator.w3.org to check your HTML Commented Jun 1, 2014 at 13:12

1 Answer 1

2

you can try and change the html tags. it should look like this:

<html>
  <head>`
     #Here goes the Head section(title,links, meta tags and all that stuff)
  </head>

  <body>
     #Here goes the body section
  </body>

</html>

Hope it was helpfull... if you have more questions just ask and the stack community will be glad to help you out

Sign up to request clarification or add additional context in comments.

4 Comments

its not working if you add <form>......</form> than its not working i need de form to send de inputs.
<body> <form> </form> </body> this is not working <body> </body> this works fine
where do you want to send the inputs?
i want to send input to here: <form action="insert.php" method="post">

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.