how get value of javascript dynamically added text field -
i wrote following code create required fields. can not send fields value.
named fields within javascript code do. want send through php, can not.
<script> function myfunction() { var side = document.glass.side.value; var angle = document.glass.side.value - 1; var x=""; (var i=0;i<side;i++) { x=x + 'طول ضلع '+(i+1)+' : <input type="text" name="sl'+(i+1)+'" class="textfield" style="text-align:center; margin-bottom:4px; padding-right:0px; height:18px; width:77px; font-size:12px;" size="32"/>' + ' <span class="style3">سانتی متر</span><br>'; } document.getelementbyid("sideview").innerhtml=x; var y=""; (var i=0;i<angle;i++) { y=y + 'اندازه زاویه '+(i+1)+' : <input type="text" name="angle'+(i+1)+'" class="textfield" style="text-align:center; margin-bottom:4px; padding-right:0px; height:18px; width:77px; font-size:12px;" size="32"/>' + ' <span class="style3">درجه</span><br>'; } document.getelementbyid("angleview").innerhtml=y; } </script>
to send through php have send form user clicking button submit form. form needs sent get
or post
. page refresh , can query link variables php.
Comments
Post a Comment