I have a page which have few images. checking images will add to score. it works fine with below code and score is displayed on page. Now i want a button "My score" to open a new window and display score there. Currently it gives a blank page. Please provide code for result.html and if my current code need some changes.
<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="content-type">
<title></title>
<script type="text/javascript" src="http://code.jquery.com/jquery-1.7.2.js" ></script>
<!--*****************************************************script to count checked items Actor/Actress begin**************************************-->
<script type='text/javascript'>//<![CDATA[
$(window).load(function(){
var actor=0;
$(document).ready(function() {
$('#perk1').html(actor);
$("#img100").click(function() {
if($('#img100').is(':checked'))
actor=actor+1;
else if(actor>0)
actor=actor-1;
$('#perk1').html(actor);
});
$("#img95").click(function() {
if($('#img95').is(':checked'))
actor=actor+1;
else if(actor>0)
actor=actor-1;
$('#perk1').html(actor);
});
});
});//]]>
</script>
<!--******************************script to count checked items actor ends***************************************************************-->
<!--******************************script to save count actor begins***************************************************************-->
<script>
function myFunction()
{
window.open("result.html","","width=700,height=150,top=300,left=300");
}
</script>
<!--******************************script to save count actor ends***************************************************************-->
</head>
<!--************************************************************************body begins*************************************************************-->
<body Body Params>
<!--*******************value of actor checked clicked here begins***************************************************-->
movies you have watched: <span id="perk1"></span></br>
<!--*******************value of actor checked clicked here ends***************************************************-->
<!--**********************************************Code to share result begins*************************************************************-->
<button onclick="myFunction()">My score</button>
<!--**********************************************Code to share result begins*************************************************************-->
</br>
Please check the movies you have watched
<!--********************************************actor movies begin************************************************************************-->
<div class="imgs">
<div class="thumb">
<label for="img100"><img src="priyanka_chopra\gunday.jpg" height="200" width="275"/></label>
<input type="checkbox" class="chk " id="img100" name="img100" value="0" />
<label for="img95"><img src="priyanka_chopra\krrish3.jpg" height="200" width="275"/></label>
<input type="checkbox" class="chk " id="img95" name="img95" value="0" />
</div>
</div>
<!--********************************************actor movies end************************************************************************-->
</div>
<!--******************************************actor code ends***************************************************************************-->
</body>
<!--************************************************************************body ends*************************************************************-->
</html>