﻿$(document).ready(function() {
    $("#voteYes").click(
            function() {
                var voteidvar = $("#voteid").val();
                $.post("vote.aspx", {
                        vote: "yes", ajax: "true", voteid: voteidvar
                    },
                    function() {
                        alert("Thankyou your 'yes' vote has been registered with the website");
                    }
                );

                /*
                $.post("vote.aspx", { name: "John", time: "2pm" },
                function(data) {
                alert("Data Loaded: " + data);
                });
                */
                return false;
            }

    );
    $("#voteNo").click(
            function() {
                var voteidvar = $("#voteid").val();
                $.post("vote.aspx", {
                    vote: "no", ajax: "true", voteid: voteidvar
                }
                function() {
                    alert("Thankyou your 'no' vote has been registered with the website");
                }
                     );

            return false;
        }
    );

    }
);

