<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebResearVote.aspx.cs"
    Inherits="Web.WebResearVote" %>

<!DOCTYPE html>
<!--[if lt IE 9]><html class="lte-ie8"><![endif]-->
<!--[if gt IE 8]><!-->
<html>
<!--<![endif]-->
<head runat="server">
    <title>投票结果</title>
</head>
<body>
    <form id="form1" runat="server">
    <asp:Label ID="VoteInfo" runat="server"></asp:Label>
    <asp:Panel ID="verify" runat="server" Visible="false">
        <div>
            验证码：<asp:TextBox ID="code" runat="server"></asp:TextBox><img src="../user/verifyimg.aspx"
                title="单击可换图" alt="" onclick="this.src='../user/verifyImg.aspx?v='+Math.random()" /></div>
        <asp:Button ID="Button1" runat="server" Text="确定" OnClick="Save1_Click" />
    </asp:Panel>
    <div style="display: none">
        <asp:TextBox ID="Data" runat="server"></asp:TextBox>
        <asp:Button ID="Save1" runat="server" Text="确定" OnClick="Save1_Click" />
    </div>
    </form>
</body>
</html>

<script type="text/javascript" language="javascript">
    function aa()
    {
        var Data = document.getElementById("Data");
        var Datas="";
        var webResear = window.opener.document.getElementById("<%=WebResearClientID%>");  
        var dataList = webResear.getElementsByTagName("input"); 
        for(var i=0; i< dataList.length; i++)
        {
            var datas = dataList[i];
            if (datas.getAttribute("t")=="data") 
            {
                Datas += datas.value;
            }
        }
        Data.value = Datas;
        var s = document.getElementById("Save1");
        s.click();
    }

    window.onload = function()
    {
       if (!window.opener.document.isSubmited)
       {
          aa();
          window.opener.document.isSubmited = true;
       }
    }
</script>

