<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="sendresume.aspx.cs" Inherits="YCHR.Web.person.sendresume" %>
  <script type="text/javascript">
      function YZCode(obj, codeurl) {
          $(obj).attr("src", codeurl + "?time=" + Math.random());
      }
      //验证
      $(document).ready(function () {
          $("#form_sendresume").validate({
              success: function (label) {
                  label.text(" ").addClass("success")
              },
              rules: {
                  txtcompanyname: { required: true },
                  txtemail: { required: true },
                  txtjobname: { required: true },
                  txtcode: { required: true },
                  val_dropresume: { required: true }

              },
              messages: {
                  txtcompanyname: { required: "企业名称不能为空" },
                  txtemail: { required: "企业邮箱不能为空" },
                  txtjobname: { required: "应聘职位不能为空" },
                  txtcode: { required: "验证码不能为空" },
                  val_dropresume: { required: "请选择您的简历" }
              }, 
              onkeyup: true,
              errorElement: "span",
              errorPlacement: function (error, element) {
                  if (element.is(":radio")) error.appendTo(element.parent().next().next());
                  else if (element.is(":checkbox")) error.appendTo(element.next());
                  else error.appendTo(element.parent())
              }
          })
      });
   

    </script>
    <form id="form_sendresume" runat="server" onsubmit="return post_sendresume()">
    <div>
        <table width="100%" cellspacing="1" cellpadding="4" border="0" class="padding3">
            <tbody>
                <tr>
                    <td width="15%" align="right">
                        <font color="#ff3300">*</font>公司名称：
                    </td>
                    <td width="85%">
                        <asp:TextBox ID="txtcompanyname" runat="server" CssClass="input"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td width="15%" align="right">
                        <font color="#ff3300">*</font>电子邮件：
                    </td>
                    <td width="85%">
                        <asp:TextBox ID="txtemail" runat="server" CssClass="input"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td width="15%" align="right">
                        <font color="#ff3300">*</font>职位名称：
                    </td>
                    <td width="85%">
                        <asp:TextBox ID="txtjobname" runat="server" CssClass="input"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td width="15%" align="right">
                        <font color="#ff3300">*</font>我的简历：
                    </td>
                    <td width="85%">
                        <asp:DropDownList ID="dropresume" runat="server" CssClass="select666">
                        </asp:DropDownList>
                        <input type="hidden" value="" id="val_dropresume" name="val_dropresume" runat="server">
                    </td>
                </tr>
                <tr>
                    <td width="15%" align="right">
                        求职信：
                    </td>
                    <td width="85%">
                        <asp:DropDownList ID="dropletter" runat="server"    CssClass="select666">
                        </asp:DropDownList>
                        <input type="hidden" value="" id="val_dropletter"   name="val_dropletter" runat="server">
                    </td>
                </tr>
                <tr>
                    <td width="15%">
                        &nbsp;
                    </td>
                    <td width="85%">
                        <asp:TextBox ID="TxtDesc" runat="server" Height="190px" TextMode="MultiLine" Width="500px"
                            CssClass="input250"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td width="15%" align="right">
                        <font color="#ff3300">*</font>验证码：
                    </td>
                    <td width="85%">
                        <asp:TextBox ID="txtcode" runat="server" CssClass="input"></asp:TextBox>
                        <img id="piccode" src="/ajax/verify_code.ashx" width="70" height="22" alt="点击切换验证码"
                            title="点击切换验证码" style="margin-top: 2px; vertical-align: top; cursor: pointer;"
                            onclick="YZCode(this, '/ajax/verify_code.ashx');return false;" />
                        <a onclick="YZCode('#piccode', '/ajax/verify_code.ashx');return false;" href="javascript:void()"
                            class="a_blue"><u>看不清，换一个</u></a>
                    </td>
                </tr>
                <tr>
                    <td width="15%">
                        &nbsp;
                    </td>
                    <td width="85%">
                      <input type="submit" class="btn_set" id="btnsend" value="确定发送" name="btnsend">&nbsp;
                    </td>
                </tr>
            </tbody>
        </table>
    </div>
    <script type="text/javascript" src="<%=config.templatetheme%>/js/jquery.scrollablecombo.js"></script>
    <script type="text/javascript">
        $(function () {
           $('#dropletter').scrollablecombo();
            $('#dropresume').scrollablecombo();

        });

        function choosedropletter(obj) {
            var letterid = obj;
            var url = "/ajax/Jobhandler.ashx?a=readletter&letterid=" + letterid; 
            App.get(url, function (res) {
              
                if (res.error == 1)
                {
                    alert(res.message);
                }
                else
                {
                    $("#TxtDesc").val(res.content);
                }
            });
        }
    </script>
    </form>
 
