Subversion Repositories SmartDukaan

Rev

Blame | Last modification | View Log | RSS feed

<html lang="en">
<head>
<title>Promotion Viewer</title>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
<link rel="stylesheet" type="text/css" href="/Support/css/jquery.datepick.css"> 
<script type="text/javascript" src="/Support/js/jquery.plugin.js"></script> 
<script type="text/javascript" src="/Support/js/jquery.datepick.js"></script>
<script type="text/javascript">
  $(function(){ 
                sDate = $(startDate).datepick({dateFormat: 'yyyy-mm-dd'});
                eDate = $(endDate).datepick({dateFormat: 'yyyy-mm-dd'});
});
</script>
<script type="text/javascript">
  $(function(){ 
        $(".viewPromotionDetails").on('click', function() {
                sDate = $('#startDate').val();
                eDate = $('#endDate').val();
                viewReport(sDate,eDate);
    });
});
</script>
<script type="text/javascript">
function viewReport(sDate,eDate){
jQuery.ajax({
        type : "GET",
        url : "/Support/amazon-list!viewPromotionDetails?startDate="+sDate+"&endDate="+eDate,
                success: function (data) {
                        $('#' + 'promotion-data').html(data);
        },
                error : function() {
                        alert("OOPS!!!Unable to promotion details",'ERROR');
                 },
    });  
}
</script>
<style>
        h4{
        color:rgb(0, 75, 145);
        }
        p {
    font-family: sans-serif;
        }
        .is-datepick {
    margin-left: 30px;
        }
        a{
        color: royalblue;
    font-family: sans-serif;
    font-weight: normal;
    text-decoration: none;
        }
        a:hover{
        color: #e47911;
        text-decoration: underline;
        }
        option{
        color:black;
        }
</style>
</head>
<body>
<a href="/Support/amazon-list/options">Go To Options</a>
<h4>Amazon Promotion</h4>
<p>Promotion Start Date: <input type="text" id="startDate" /></p>
<p>Promotion End&nbsp; Date: <input type="text" id="endDate" /></p>
<input type="button" value="View Details" class="viewPromotionDetails" />
<div id="promotion-data">
</div>
</body>
</html>