Skip to content
Advertisement

Multi select html and javascript value send from POST , GET

And enter Html select in another select but the second select does not send information either by GET or by POST. I don’t know where I will add the id = “” and name = “” in JavaScript, to make it work.

JavaScript

With type it works, but it receives only the information of the first select

It is included in form. And the source code is this: http://jsfiddle.net/YPsqQ/

Advertisement

Answer

By “it works” I assume you mean these elements are part of a <form> which is being submitted at some later point? The first <select> sends its value in that form because it has a name:

JavaScript

The second <select> is missing its name, so a <form> has no way to include it. Simply give it a name:

JavaScript
User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement