TAILIEUCHUNG - Ajax in Action phần 8

sau đó chúng ta có thể gọi một BuildList () chức năng, mà sẽ hạn chế tập hợp kết quả. Chúng tôi giải thích thêm về điều đó trong phần "Xây dựng khoảng kết quả", sau đó trong chương này. GiveOptions () chức năng được khai báo điện tử tham số | Implementing DHTML windows 447 With the portal windows open we can test the functionalities built into the DHTML library without the Ajax functionality we are going to add next. Here are some of the things we can do Maximize and minimize the windows by clicking on the button labeled with an O. Hide the window by clicking the button labeled with an X. Open the DHTML window into its own pop-up window by clicking on the w. Drag the window by holding down the left mouse button on the title bar and moving the mouse around. Releasing the mouse button stops the drag operation. Resize the window by clicking on the green box on the lower-right corner and dragging it around the screen. You can see that the windows in figure are in different positions than in figure . Now that we have the ability to position and resize the windows with the library we need to make our changes to the external .js file. The changes will allow us to call a function that utilizes Ajax to send the new property values to our database. Figure Ajax portal showing windows with different positions Licensed to Jonathan zheng yiyisjun@ 448 CHAPTER 11 The enhanced Ajax web portal Adding Ajax autosave functionality Using Ajax allows us to implement an autosave feature that can be fired by any event without the user knowing that it is happening. Normally the user would have to click a button to force a postback to the server. In this case we will be firing the autosave with the onmouseup event which ends the process of dragging and resizing events. If we were to fire a normal form submission on the onmouseup event the user would lose all of the functionality of the page disrupting her workflow. With Ajax the flow is seamless. Adapting the library As we mentioned earlier the code from JavaScript DHTML libraries is normally cross-browser compliant which frees us from spending time getting cross-browser code to work correctly. If you look at the code in the external .

TỪ KHÓA LIÊN QUAN
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.