Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/77.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/87.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
重复行中的jQuery日期选择器不工作_Jquery_Html_Asp Classic - Fatal编程技术网

重复行中的jQuery日期选择器不工作

重复行中的jQuery日期选择器不工作,jquery,html,asp-classic,Jquery,Html,Asp Classic,我有以下代码,其中包括一个出现在重复行中的jQuery日期选择器 <%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%> <!--#include file="../Connections/PSCRM.asp" --> <% Dim rs_AddProduct Dim rs_AddProduct_cmd Dim rs_AddProduct_numRows Set rs_AddProduct_cmd = Server.CreateObje

我有以下代码,其中包括一个出现在重复行中的jQuery日期选择器

<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<!--#include file="../Connections/PSCRM.asp" -->
<%
Dim rs_AddProduct
Dim rs_AddProduct_cmd
Dim rs_AddProduct_numRows

Set rs_AddProduct_cmd = Server.CreateObject ("ADODB.Command")
rs_AddProduct_cmd.ActiveConnection = MM_PSCRM_STRING
rs_AddProduct_cmd.CommandText = "select t1.cn_ref, t3.proddesc, t1.qty, t1.price from dba.quotelne as t1 LEFT JOIN dba.document as t2 ON t1.quoteno = t2.quoteno LEFT JOIN dba.proditem as t3 ON t1.cn_ref = t3.prodref LEFT JOIN dba.proditem_xtra as t4 ON t1.cn_ref = t4.prodref where t2.documentno = 448353 and t1.statusflag = 'A' and t3.obsolete = 0 and t4.rber_mi_source is null" 
rs_AddProduct_cmd.Prepared = true

Set rs_AddProduct = rs_AddProduct_cmd.Execute
rs_AddProduct_numRows = 0
%>
<%
Dim Repeat1__numRows
Dim Repeat1__index

Repeat1__numRows = -1
Repeat1__index = 0
rs_AddProduct_numRows = rs_AddProduct_numRows + Repeat1__numRows
%>
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Untitled Document</title>
<link href="../css/style.css" rel="stylesheet" type="text/css">

<link rel="stylesheet" href="//code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css">
  <script src="//code.jquery.com/jquery-1.10.2.js"></script>
  <script src="//code.jquery.com/ui/1.11.4/jquery-ui.js"></script>
  <link rel="stylesheet" href="/resources/demos/style.css">
  <script>
  $(function() {
    $( ".datepicker" ).datepicker();
  });
  </script>

<script type="text/javascript">
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
</script>
</head>

<body>
    <div id="dashboard">
        <h1>Technical Requests</h1>
        <h2>Document No. <%=Request.QueryString("docno")%></h2>
        <p>This document was created on <%= Date()%> for </p>
    </div>
    <div id="dashboard">
        <h3>There are no items available for coding</h3>
        <p><a href="quote-lines.asp?docno=<%Request.QueryString("docno")%>">Click here to view the full quote</a></p>
    </div>
    <div id="dashboard">
        <h3>Available items (<a href="quote-lines.asp?docno=<%Request.QueryString("docno")%>">View full quote</a>)</h3>
        <table width="100%" border="0" cellspacing="2" cellpadding="2">
  <tr>
    <th scope="col">Part Number</th>
    <th scope="col">Description</th>
    <th scope="col">Qty</th>
    <th scope="col">Unit Price</th>
    <th scope="col">Line Value</th>
    <th scope="col">Internal Req Date</th>
    <th scope="col">Drawing</th>
    <th scope="col">Coding</th>
    <th scope="col">&nbsp;</th>
  </tr>
      <% 
While ((Repeat1__numRows <> 0) AND (NOT rs_AddProduct.EOF)) 
%>
  <form>
  <tr>
  <td><%=(rs_AddProduct.Fields.Item("cn_ref").Value)%></td>
      <td><a href="#" onClick="MM_openBrWindow('../Shared/extended-description.asp?prodref=<%=(rs_AddProduct.Fields.Item("cn_ref").Value)%>','ExtendedDescription','scrollbars=yes,resizable=yes,width=400,height=600')"><%=(rs_AddProduct.Fields.Item("proddesc").Value)%></a></td>
      <td><%=(rs_AddProduct.Fields.Item("qty").Value)/100%></td>
      <td><%=FormatCurrency((rs_AddProduct.Fields.Item("price").Value)/100.00, 2, -2, -2, -2)%></td>
      <td><%=FormatCurrency(((rs_AddProduct.Fields.Item("qty").Value)/100)*(rs_AddProduct.Fields.Item("price").Value)/100.00, 2, -2, -2, -2)%></td>
      <td><input type="text" id="datepicker" class="datepicker"></td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>

  </tr>
  </form>
        <% 
  Repeat1__index=Repeat1__index+1
  Repeat1__numRows=Repeat1__numRows-1
  rs_AddProduct.MoveNext()
Wend
%>
</table>
<hr>
    </div>
        <div id="dashboard">
        <h3>Items with Drawings not yet coded</h3>
                <table width="100%" border="0" cellspacing="2" cellpadding="2">
  <tr>
    <th scope="col">Part Number</th>
    <th scope="col">Description</th>
    <th scope="col">Qty</th>
    <th scope="col">Unit Price</th>
    <th scope="col">Line Value</th>
    <th scope="col">Internal Req Date</th>
    <th scope="col">Drawing</th>
    <th scope="col">Coding</th>
    <th scope="col">&nbsp;</th>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
</table>
<hr>
    </div>
        <div id="dashboard">
        <h3>Coded Items with no Drawings</h3>
                <table width="100%" border="0" cellspacing="2" cellpadding="2">
  <tr>
    <th scope="col">Part Number</th>
    <th scope="col">Description</th>
    <th scope="col">Qty</th>
    <th scope="col">Unit Price</th>
    <th scope="col">Line Value</th>
    <th scope="col">Internal Req Date</th>
    <th scope="col">Drawing</th>
    <th scope="col">Coding</th>
    <th scope="col">&nbsp;</th>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
</table>
<hr>
    </div>
            <div id="dashboard">
        <h3>Items added</h3>
                <table width="100%" border="0" cellspacing="2" cellpadding="2">
  <tr>
    <th scope="col">Part Number</th>
    <th scope="col">Description</th>
    <th scope="col">Qty</th>
    <th scope="col">Unit Price</th>
    <th scope="col">Line Value</th>
    <th scope="col">Internal Req Date</th>
    <th scope="col">Drawing</th>
    <th scope="col">Coding</th>
    <th scope="col">&nbsp;</th>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
</table>
<hr>
    </div>
</body>
</html>
<%
rs_AddProduct.Close()
Set rs_AddProduct = Nothing
%>

无标题文件
$(函数(){
$(“.datepicker”).datepicker();
});
函数MM_openBrWindow(URL、winName、features){//v2.0
打开(URL、winName、功能);
}
技术要求
文件编号。
此文档是为创建的

没有可用于编码的项目

可用项目() 零件号 描述 数量 单价 行值 内部申请日期 绘画 编码
图纸尚未编码的项目 零件号 描述 数量 单价 行值 内部申请日期 绘画 编码
无图纸的编码项目 零件号 描述 数量 单价 行值 内部申请日期 绘画 编码
添加的项目 零件号 描述 数量 单价 行值 内部申请日期 绘画 编码
我已经设法让显示选择器显示在每个出现的文本框上,但是在任何文本框中选择的日期都会改变第一个文本框中的日期


我怎样才能绕过这个问题呢?

你必须像那样更改脚本部分

$(function() {
     $( ".datepicker" ).each(function () {
       $(this).datepicker();
     });
  });

它工作正常

您所有的日期选择器都有相同的ID(这不是一个好做法)。可能是Datepicker使用了元素。如果是这样,则只修改第一个Datepicker.*使用元素ID。所以问题都是一样的:所有Datepicker都应该有唯一的ID以避免出现问题。