بتاريخ: 9 يوليو 200619 سنة comment_74069 يا شباب لقد عملت تحقق لحقل عن طريق الجافا سكربت ، ولكن يظهر لي خطأ عجزت ان احلهمع ملاحظة اني استعمل الـADF مع صفحات الـ JSP ، والخطأ هو : javax.servlet.jsp.JspException: Must specify type attribute if name is specified أما صفحة الـ JSP هي : <%@ taglib uri="http://java.sun.com/jstl/core" prefix="c"%> <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html"%> <%@ page contentType="text/html;charset=windows-1256"%> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=windows-1256"> <title>untitled</title> -- هذه هي الـجافا سكربت للتحقق [color=red]<script type="text/javascript"> function check_form4(){ if (document.f4.T4.value >= 9){ alert("يجب أن لا يتعدى 9 طرق"); document.f4.T4.focus(); document.f4.T4.value=""; return false; } </script>[/color]</head> <body> <html:errors/> --هنا الخطأ حيث يطلب مني كما فهمت من الرسالة بلابد من وجود type للفورم [color=red] <html:form name="f4" action="dataPage1.do" scope="page">[/color] <input type="hidden" name="<c:out value='${bindings.statetokenid}'/>" value="<c:out value='${bindings.statetoken}'/>"/> <table border="0" width="100%" cellpadding="2" cellspacing="0"> <tr> <td> <c:out value="${bindings['Id'].label}"/> </td> <td> <html:text property="Id"/> </td> </tr> <tr> <td> <c:out value="${bindings['Name'].label}"/> </td> <td> <html:text property="Name"/> </td> </tr> <tr> <td> <c:out value="${bindings['road1'].label}"/> </td> <td> <html:text property="road1"/> </td> </tr> <tr> <td> <c:out value="${bindings['road2'].label}"/> </td> <td> <html:text property="road2"/> </td> </tr> <tr> <td> <c:out value="${bindings['road3'].label}"/> </td> <td>[color=red] -- على هذا الحقل يتم التحقق من الشرط <html:text property="road3" name="T4" onchange="return check_form4()" />[/color] </td> </tr> </table> <br/> <c:out value="${bindings.editingMode}"/> <br/> <br/> <input type="submit" name="event_Create" value="Create" <c:out value="${bindings.Create.enabledString}" />/> <input type="submit" name="event_Commit" value="Commit" /> </html:form> </body> </html> تقديم بلاغ
انضم إلى المناقشة
يمكنك المشاركة الآن والتسجيل لاحقاً. إذا كان لديك حساب, سجل دخولك الآن لتقوم بالمشاركة من خلال حسابك.