خرید بک لینک

Vote count: 0

I Have Put all my code here. I take a div TextBoxContainer.When i am clicking on textbox name = DynamicTextBox i get the search value which are from database bt i cant select it and cant get it on textbox.

<html>
    <head>
    <script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js" type="text/javascript"></script>

      <script>
    function showResult(str) {

      if (str.length==0) { 
        document.getElementById("livesearch").ierHTML="";
        document.getElementById("livesearch").style.border="0px";
        retu;
      }
      if (window.XMLHttpRequest) {
        // code for IE7+, Firefox, Chrome, Opera, Safari
        xmlhttp=new XMLHttpRequest();
      } else {  // code for IE6, IE5
        xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
      }
      xmlhttp.onreadystatechange=function() {
        if (xmlhttp.readyState==4 && xmlhttp.status==200) {
          document.getElementById("livesearch").ierHTML=xmlhttp.responseText;
          document.getElementById("livesearch").style.border="1px solid #A5ACB2";
        }
      }
      xmlhttp.open("GET","search1.php?q="+str,true);
      xmlhttp.send();
    }
    </script>



    <script>
    $(function() {
      $("#btnAdd").bind("click", function() {
        var div = $("<div />");
        div.html(GetDynamicTextBox(""));
        $("#TextBoxContainer").append(div);

      });


      $("#btnGet").bind("click", function() {
        var values = 
          $.map($("input[name=DynamicTextBox]"), function(el) {
            retu el.value
          }).join(",n");
        $("#anotherTextbox").val(values);
      });
      $("#btnGet").bind("click", function() {
        var values = 
          $.map($("input[name=DynamicTextBox1]"), function(el) {
            retu el.value
          }).join(",n");
        $("#anotherTextbox1").val(values);
      });
      $("body").on("click", ".remove", function() {
        $(this).closest("div").remove();
      });

    });

    function GetDynamicTextBox(value) {
      retu '<input name = "DynamicTextBox" style="width:280px;margin-left:10px;" id="skills" onkeyup="showResult(this.value)" type="text" value = "' + value + '" />&nbsp;' + '<input style="width:280px;" name = "DynamicTextBox1" type="text" value = "' + value + '" />&nbsp;' +
        '<span type="button"  class="remove glyphicon glyphicon-remove"></span><div id="livesearch" style="width:280px;margin-left:10px;"></div>'
    }
    </script>





    </head>

    <body>

    <form  id="smart-form-register" class="smart-form client-form" method="post" enctype="multipart/form-data">


  <fieldset>

  <label class="input"> <i class="icon-append fa fa-user"></i>
   <input type="text" required  name="product_name" placeholder="product Name" style="margin-bottom:25px;">
    <b class="tooltip tooltip-bottom-right">Needed to enter product Name</b> </label>

 <lable style="margin-left:60px;"><b>Material Name</b></label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
 <lable><b>Material Quantity</b></label>

 <div id="TextBoxContainer"></div>                

 <input id="btnAdd" type="button"  value="Add" style="margin-top:20px;margin-left:450px;width:40px;" />
 <input id="btnGet" type="button" value="DONE"  />

 </br></br></br>
 <input id="anotherTextbox" type="hidden" name="last" />
 <input id="anotherTextbox1" type="hidden"  name="first"/>


</fieldset>                     

 <input type="submit" name="submit" value="Register" class="btn btn-primary">


 </form>
    </body>
    </html>

asked 2 mins ago

برچسب: نویسنده: استخدام کار تاريخ: شنبه 22 اسفند 1394 ساعت: 17:45

صفحه بندی