home *** CD-ROM | disk | FTP | other *** search
/ 66.142.0.142 / 66.142.0.142.tar / 66.142.0.142 / tblMessageadd.aspx < prev    next >
Text File  |  2010-08-24  |  5KB  |  110 lines

  1. <%@ Page Language="VB" MasterPageFile="masterpage.master" ValidateRequest="false" AutoEventWireup="false" CodeFile="tblMessageadd.aspx.vb" Inherits="tblMessageadd" CodeFileBaseClass="AspNetMaker7_tfpssnet" %>
  2. <asp:Content ID="Content" ContentPlaceHolderID="Content" runat="server">
  3. <script type="text/javascript">
  4. <!--
  5. // Create page object
  6. var tblMessage_add = new ew_Page("tblMessage_add");
  7. // page properties
  8. tblMessage_add.PageID = "add"; // page ID
  9. var EW_PAGE_ID = tblMessage_add.PageID; // for backward compatibility
  10. // extend page with ValidateForm function
  11. tblMessage_add.ValidateForm = function(fobj) {
  12.     if (!this.ValidateRequired)
  13.         return true; // ignore validation
  14.     if (fobj.a_confirm && fobj.a_confirm.value == "F")
  15.         return true;
  16.     var i, elm, aelm, infix;
  17.     var rowcnt = (fobj.key_count) ? Number(fobj.key_count.value) : 1;
  18.     for (i=0; i<rowcnt; i++) {
  19.         infix = (fobj.key_count) ? String(i+1) : "";
  20.         elm = fobj.elements["x" + infix + "_msgStartDate"];
  21.         if (elm && !ew_CheckUSDate(elm.value))
  22.             return ew_OnError(this, elm, "Incorrect date, format = mm/dd/yyyy - Start Date");
  23.         elm = fobj.elements["x" + infix + "_msgEndDate"];
  24.         if (elm && !ew_CheckUSDate(elm.value))
  25.             return ew_OnError(this, elm, "Incorrect date, format = mm/dd/yyyy - End Date");
  26.     }
  27.     return true;
  28. }
  29. <% If EW_CLIENT_VALIDATE Then %>
  30. tblMessage_add.ValidateRequired = true; // uses JavaScript validation
  31. <% Else %>
  32. tblMessage_add.ValidateRequired = false; // no JavaScript validation
  33. <% End If %>
  34. //-->
  35. </script>
  36. <link rel="stylesheet" type="text/css" media="all" href="calendar/calendar-win2k-1.css" title="win2k-1" />
  37. <script type="text/javascript" src="calendar/calendar.js"></script>
  38. <script type="text/javascript" src="calendar/lang/calendar-en.js"></script>
  39. <script type="text/javascript" src="calendar/calendar-setup.js"></script>
  40. <script language="JavaScript" type="text/javascript">
  41. <!--
  42. // Write your client script here, no need to add script tags.
  43. // To include another .js script, use:
  44. // ew_ClientScriptInclude("my_javascript.js"); 
  45. //-->
  46. </script>
  47. <p><span class="aspnetmaker">Add to TABLE: Message<br /><br />
  48. <a href="<%= tblMessage.ReturnUrl %>">Go Back</a></span></p>
  49. <% tblMessage_add.ShowMessage() %>
  50. <form name="ftblMessageadd" id="ftblMessageadd" method="post" onsubmit="this.action=location.pathname;return tblMessage_add.ValidateForm(this);">
  51. <p />
  52. <input type="hidden" name="t" id="t" value="tblMessage" />
  53. <input type="hidden" name="a_add" id="a_add" value="A" />
  54. <table cellspacing="0" class="ewGrid"><tr><td class="ewGridContent">
  55. <div class="ewGridMiddlePanel">
  56. <table cellspacing="0" class="ewTable">
  57. <% If tblMessage.msgText.Visible Then ' msgText %>
  58.     <tr<%= tblMessage.msgText.RowAttributes %>>
  59.         <td class="ewTableHeader">Text</td>
  60.         <td<%= tblMessage.msgText.CellAttributes %>><span id="el_msgText">
  61. <input type="text" name="x_msgText" id="x_msgText" size="30" maxlength="255" value="<%= tblMessage.msgText.EditValue %>"<%= tblMessage.msgText.EditAttributes %> />
  62. </span><%= tblMessage.msgText.CustomMsg %></td>
  63.     </tr>
  64. <% End If %>
  65. <% If tblMessage.msgStartDate.Visible Then ' msgStartDate %>
  66.     <tr<%= tblMessage.msgStartDate.RowAttributes %>>
  67.         <td class="ewTableHeader">Start Date</td>
  68.         <td<%= tblMessage.msgStartDate.CellAttributes %>><span id="el_msgStartDate">
  69. <input type="text" name="x_msgStartDate" id="x_msgStartDate" value="<%= tblMessage.msgStartDate.EditValue %>"<%= tblMessage.msgStartDate.EditAttributes %> />
  70.  <img src="images/calendar.png" id="cal_x_msgStartDate" name="cal_x_msgStartDate" alt="Pick a date" style="cursor:pointer;cursor:hand;" />
  71. <script type="text/javascript">
  72. Calendar.setup({
  73.     inputField : "x_msgStartDate", // ID of the input field
  74.     ifFormat : "%m/%d/%Y", // the date format
  75.     button : "cal_x_msgStartDate" // ID of the button
  76. });
  77. </script>
  78. </span><%= tblMessage.msgStartDate.CustomMsg %></td>
  79.     </tr>
  80. <% End If %>
  81. <% If tblMessage.msgEndDate.Visible Then ' msgEndDate %>
  82.     <tr<%= tblMessage.msgEndDate.RowAttributes %>>
  83.         <td class="ewTableHeader">End Date</td>
  84.         <td<%= tblMessage.msgEndDate.CellAttributes %>><span id="el_msgEndDate">
  85. <input type="text" name="x_msgEndDate" id="x_msgEndDate" value="<%= tblMessage.msgEndDate.EditValue %>"<%= tblMessage.msgEndDate.EditAttributes %> />
  86.  <img src="images/calendar.png" id="cal_x_msgEndDate" name="cal_x_msgEndDate" alt="Pick a date" style="cursor:pointer;cursor:hand;" />
  87. <script type="text/javascript">
  88. Calendar.setup({
  89.     inputField : "x_msgEndDate", // ID of the input field
  90.     ifFormat : "%m/%d/%Y", // the date format
  91.     button : "cal_x_msgEndDate" // ID of the button
  92. });
  93. </script>
  94. </span><%= tblMessage.msgEndDate.CustomMsg %></td>
  95.     </tr>
  96. <% End If %>
  97. </table>
  98. </div>
  99. </td></tr></table>
  100. <p />
  101. <input type="submit" name="btnAction" id="btnAction" value="    Add    " />
  102. </form>
  103. <script language="JavaScript" type="text/javascript">
  104. <!--
  105. // Write your table-specific startup script here
  106. // document.write("page loaded");
  107. //-->
  108. </script>
  109. </asp:Content>
  110.