for example i need to check DHL tracking number and i asking user to enter their tracking number to check it. here is input:
Name: <input type="text" id="myText" >
<button onclick="myFunction()">check tracking</button>
And DHL making it adding code tu url for example: https://nolp.dhl.de/nextt-online-public/en/search?piececode=
and plus tracking codehere. The demo url is this: https://nolp.dhl.de/nextt-online-public/en/search?piececode=48484848484848484
Here is Javascript:
function myFunction() {
var inputed_code = document.getElementById("myText").value ;
var dhlurl = "https://nolp.dhl.de/nextt-online-public/en/search?piececode="
var new_url = dhlurl + inputed_code ;
window.open("new_url", "_blank");
}
But it doesn't url as it is needed :(