JSFiddle - React, Tailwind, and code Playground

by Meir Gabay

HTML

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.2/jquery.min.js"></script>

<div>
<label for="myInput">Object ID:</label>
<input id="myInput" type="text" placeholder="Long weird text..."/>

<input type="button" value="Generate" onclick="genFunc(document.getElementById('myInput').value)"/>
</div>

<div id="bpDiv" style="margin-top:15px">
<p> Business Partner links</p>
<p class="myP" style="display:inline;"><u>BP Link - ExtraNICE</u></p>
<p class="myP"><u>BP Link - ExtraNICE</u></p>
  <p id="bpLink" class="myLink" style="margin:0px">Link will appear here</p>
  <button  onclick="copyToClipboard('bpLink')" class="copyButton">Copy BP</button>
</div>

<p>NICE Employees links - NICEWeb</p>
<div id="intDiv" style="margin-top:15px">

<div>
  <p class="myP" style="display:inline;"><u>Register and Launch</u></p>
  <p id="intLink" class="myLink" style="margin:0px">Link will appear here</p>
  <button  onclick="copyToClipboard('intLink')" class="copyButton">Copy Int</button>
</div>


<div>
<p class="myP" style="display:inline;"><u>Learning Object Details</u></p>
  <p id="intLink" class="myLink" style="margin:0px">Link will appear here</p>
  <button  onclick="copyToClipboard('intLink')" class="copyButton">Copy Int</button>
</div>

</div>


<script>
function genFunc(myVal){
var intInit = "http://niceweb.nice.com/_layouts/15/dotnet/CSLogIn/Default.aspx?link=%252fDeepLink%252fProcessRedirect.aspx%253fmodule%253dloRegisterAndLaunch%2526lo%253d";

var bpInit = "http://www.extranice.com/_layouts/lms/default.aspx?link=%252fDeepLink%252fProcessRedirect.aspx%253fmodule%253dloRegisterAndLaunch%2526lo%253d"

var BPLinkTxt = intInit + myVal;
var IntLinkTxt = bpInit + myVal;


var parent = document.getElementById("bpDiv");
var child = document.getElementById("bpLink");
var node = document.createTextNode(BPLinkTxt);
var para = document.createElement("p");
para.setAttribute("id", "bpLink");
para.setAttribute("class",...