Change iframe url through jquery.

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$("input[type='radio']").click(function(){
 var r=$(this).val();
 if(r==7)
 {
 $("#frame").attr('src', '7.html');
 $("#frame").width(950);
 $("#frame").height(1080);
 return false;
 }
 else if(r==14)
 {
 $("#frame").attr('src', '14.html');
 $("#frame").width(950);
 $("#frame").height(2160);
 }
 else if(r==45)
 {
 $("#frame").attr('src', '7.html');
 $("#frame").width(950);
 $("#frame").height(1080);

$("#frame1").attr('src', '1.html');
 $("#frame1").width(950);
 $("#frame1").height(200);
 }
 else if(r==90)
 {
 $("#frame").attr('src', '14.html');
 $("#frame").width(950);
 $("#frame").height(2160);

 $("#frame1").attr('src', '2.html');
 $("#frame1").width(950);
 $("#frame1").height(400);
 }
 });
});
</script>


<iframe id="frame" src="warn.html" ></iframe>
<iframe id="frame1" src="warn.html" ></iframe>

Popular posts from this blog

Simple Sign up design. Android.

Cart page design in android.

Set Date on jDateChooser and retrieve record from database.