TAILIEUCHUNG - Professional Portal Development with Open Source Tools Java Portlet API phần 7

Như đã nêu trong sơ đồ quá trình XP thể hiện trong hình 7,15, xem xét cẩn thận nên việc triển khai một máy chủ hợp tác trong giai đoạn khởi đầu của việc triển khai của bạn để kiến thức có thể tuyên truyền thông qua việc tham gia các nhóm khác nhau trong chương trình của bạn. | Chapter 8 098 element. Let s make sure that we only advance the 099 numbers if there is a value in one of the fields. 100 if eleVal hasBlanks eleVal moveAhead 1 101 102 else 103 The user hit the new button but not on the last 104 element. Let s look ahead to see what values are 105 stored for the last elements. If both are empty 106 only advance the current record number to match 107 the of number. 108 lastVal rep eleName Ofnum 109 if lastVal hasBlanks lastVal moveAhead 1 110 else moveToLast 1 111 112 113 114 Get a handle to the actual field element. Once the reference is created store the current value in the storage array and obtain the new value if any to display in the field. This example only uses text fields. If other types of fields are used such as radio buttons or picklists you will have to add the JavaScript syntax necessary to process those types. 115 if moveAhead 116 newRec 117 newOf 118 119 else if moveToLast 120 Ofnum 121 Last change the repeating group counters to display the appropriate index number. 122 123 124 function hasBlanks str 125 var len 126 var spot 127 var sym 0 128 129 for var i 0 i len i 130 spot i 131 if spot 132 sym 1 133 break 134 135 136 if sym return false 137 else return true 138 The function hasBlanks is used to ensure that a field does not contain only spaces. This is necessary because a space is a valid character as far as JavaScript is concerned. When the user selects the New 238 Effective Client-Side Development Using JavaScript button in the repeating group a check is performed to ensure that at least one of the fields has a value. If not the counters are not moved. Using hasBlanks ensures that a field with only spaces is not mistakenly identified as a field with a true value. 139 script 140 head 141 body bgcolor cadetblue 142 form name myform 143 center 144 table border 2 145 tr td 146 Street input name street type text size 50 147 td tr 148 tr td 149 City .

TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.