0
Guys it’s a stupid thing I know, but I’m racking my brain, I need help who can thank you. . I am making a simple form, I need to have a rating question, if the person choose the option a link changes example pro google.com, if the person chooses option b the link changes example for yahoo.com.br and if the person chooses option c the link changes example for terra.com.br . I got to it, but it doesn’t work:
jQuery(function($){
$('#male, #female, #other').change(function(){
var volume = $('#male').val();
var volume = $('#female').val();
var volume = $('#other').val();
if (other == "other") {
$('.LinkBotao').attr('href', 'http://www.google.com');
}
else if (male == "male") {
$('.Linkbotao').attr('href', 'http://www.uol.com.br');
}
else if (female == "female") {
$('.Linkbotao').attr('href', 'http://www.yahoo.com.br');
}
});
});
// JavaScript Document
<script src="https://code.jquery.com/jquery-3.2.1.min.js"></script>
<form action="">
<br>
<input type="radio" name="gender" value="male"> Male<br>
<input type="radio" name="gender" value="female"> Female<br>
<input type="radio" name="gender" value="other"> Other<br>
<br>
<a href="#" class="LinkBotao" target="_blank">
<input type="button" name="aderir" id="aderir" value="aderir">
</a>
</form>
puts bro didn’t work out for what I need to add
– Vinicius Santos
what exactly you would need?
– Tales Peres
I asked another question to try to explain, I need in fact is a form of name, email and these radio, that to each radio he sent for a programming in php, to fire an email and return to another page...I thought that only with this doubt could solve, but I couldn’t get rsrsrsrs
– Vinicius Santos
https://answall.com/questions/368192/alterar-o-link-de-um-bot%C3%A3o-radio-in-a-formulary
– Vinicius Santos