I'm trying to make a JavaScript Variables using and answer from a Radio Button element. The code that I'm use is
"var radio1= document.getElementByName("radio1")". This is not working. could you please advised me on what I'm doing wrong.
JavaScript Variables - Post ID 246701
Paste this into an html element.
<script src="common/libs_js/jquery-1.4.4.min.js" type="text/javascript"></script> <script type="text/javascript">$(document).ready(function(){
$("input[type='radio']").click(function(){
var radioValue = $("input[name='radio1']:checked").val();
if(radioValue){
alert("Your are a - " + radioValue);
}
});
});</script>
$("input[type='radio']").click(function(){
var radioValue = $("input[name='radio1']:checked").val();
if(radioValue){
alert("Your are a - " + radioValue);
}
});
});</script>
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.
This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
It's easy to overlook something you're not looking for.
This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.