I have a code, that gets values from checkboxes to textarea in order to build a link. For example:
<script>
$("input[name=wear]").change(function() {
AllChecked();
});
$("input[name=type]").change(function() {
AllChecked();
});
function AllChecked() {
$('#searchform').text('');
$("input[name=wear],input[name=type]").each(function() {
if (this.checked) {
let old_text = $('#searchform').text() ? $('#searchform').text() + '': '';
$('#searchform').text(old_text + $(this).val());
}
})
}
</script>
How to create a button, that will make a link from this text area and follow it on click? Or, maybe, u know the way to avoid textarea and get values from checkboxes to buffer and after click on button user will follow this link? Thank you!
Aucun commentaire:
Enregistrer un commentaire