Hi,

In my code I want to process my list box content to back end via POST method

here I can Add the input to my select list , Now only the one data is being processed . I want to process all the content of list box.

I don't no, am correct or not in adding select tag there.(It may list box or text-area)

Please help me below in my code
Code:
  Add an URL: <input type="text" name="optval" id="optval" value="http://" /><br /><br/>
  <input type="button" id="addopt" name="addopt" value="Add" onclick="adOption.addOption('sel_list', 'optval');" /> &nbsp;
  <input type="button" id="del_opt" name="del_opt" value="Delete" onclick="adOption.delOption('sel_list', 'optval');" />
<form action="http://localhost:8080/cgi-bin/signup.pl" method="POST">
  Select URL's:<br/>
<select multiple name="sel_list" id="sel_list" value="URL'S" size="2" onchange="adOption.selOpt(this.value, 'optval')">
</select><br><br>
<input type="submit" value="Submit">
</form>
<script type="text/javascript">
var adOption = new Object();
  adOption.checkList = function(list, optval) {
    var re = 0;      
    var opts = document.getElementById(list).getElementsByTagName('option');
    for(var i=0; i<opts.length; i++) {
      if(opts[i].value == document.getElementById(optval).value) {
        re = 1;
        break;
      }
    }
    return re;     
   };
  adOption.addOption = function(list, optval) {
    var opt_val = document.getElementById(optval).value;
    if(opt_val.length > 0) {
      if(this.checkList(list, optval) == 0) {
        var myoption = document.createElement('option');
        myoption.value = opt_val;
        myoption.innerHTML = opt_val;
        document.getElementById(list).insertBefore(myoption, document.getElementById(list).firstChild);

        document.getElementById(optval).value = '';  
      }
      else alert('The value "'+opt_val+'" already added');
    }
    else alert('Add a Blacklist URL for option');
  };
  adOption.delOption = function(list, optval) {
    var opt_val = document.getElementById(optval).value;
    if(this.checkList(list, optval) == 1) {
      var opts = document.getElementById(list).getElementsByTagName('option');
      for(var i=0; i<opts.length; i++) {
        if(opts[i].value == opt_val) {
          document.getElementById(list).removeChild(opts[i]);
          break;
        }
      }
    }
    else alert('The value "'+opt_val+'" not exist');
  }
  adOption.selOpt = function(opt, txtbox) { document.getElementById(txtbox).value = opt; }
</script>