Quantcast
Channel: Active questions tagged javascript - Stack Overflow
Viewing all articles
Browse latest Browse all 140734

How to get one single QR CODE of multiple textarea with different IDs?

$
0
0

I am just learning how to code .I want to create a QR code generator that take text in first textarea and show it in the first line after scanning QR code and same with text in textarea number two to be shown in line 2 and And so on and so forth .I created this script jsfiddle that is based on this script on jsfiddle that is based on this library QRCode.js .And the problem I have that my script show text result of one textarea specifically the last edited textarea .SO how can I create single QR CODE of multiple textarea with different IDs ?

   var qrcode = new QRCode("qrcode");

$("#text, #text1, #text2, #text3, #text4").on("keyup", function () {
    qrcode.makeCode($(this).val());
}).keyup().focus(); 
#qrcode {
  width:160px;
  height:160px;
  margin-top:15px;
  margin-bottom:150px;
}
textarea {
  resize: none;
  overflow: hidden;
  font-family:"Times New Roman", Times, serif;  
  font-size: 12px;  
}
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.10.1/jquery.min.js"></script>
1<textarea id="text" rows="1" cols="30">
Name : </textarea><br>
2<textarea id="text1" rows="1" cols="30">
Age : </textarea><br>
3<textarea id="text2" rows="1" cols="30">
Country : </textarea><br>
4<textarea id="text3" rows="1" cols="30">
City : </textarea><br>
5<textarea id="text4" rows="1" cols="30">
Email : </textarea><div id="qrcode"></div>

Viewing all articles
Browse latest Browse all 140734

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>