I have a main-page with several separate iFrames including radio-buttons. I want to validate the choices and because of that need the values of specific radio-button choices.
<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="UTF-8">
<title>...</title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7/jquery.min.js"></script>
<script type="text/javascript">
$('#validate').click(function() {
alert('Value ' + $('#legitimation').contents().find('input[name="group_1"]').val());
});
</script>
</head>
<body>
<iframe id="legitimation" name="legitimation" src="Legitimation.html" width="300" height="800">
<p>Your browser does not support iframes.</p>
</iframe>
<input type="button" id='validate' name='validate' value='VALIDATE' />
</body>
</html>
inside my Legitimation.html i have several radio buttons (grouped up):
<form action="#" id="unique_id" class="productFilter">
<fieldset id="step1" class="step1 option0">
<legend>Legitimation</legend>
<p>
<input id="question_1" name="group_1" type="radio" value="1"/>
<label for="question_1">Unidentifiziert</label>
</p>
<p>
<input id="question_2" name="group_1" type="radio" value="2"/>
<label for="question_2">Unlegitimiert</label>
</p>
<p>
<input id="question_3" name="group_1" type="radio" value="3"/>
<label for="question_3">Legitimiert</label>
</p>
</fieldset> [...]
I want to get feedback on which of the radio buttons was clicked, but i just can't seem to find a way on how to do that... Any help would be appreciated.