build your own ajax web applications PHẦN 4

lỗi, không thể xác minh thông tin đăng nhập của bạn. Mã phía máy khách của chúng tôi phân tích kết quả này hoặc chuyển hướng đến trang chủ ứng dụng, hoặc hiển thị thông báo lỗi cho người sử dụng. Cũng lưu ý rằng chúng ta thiết lập Content-Type text / plain, do đó, | Running the Animation Opacity in Opera Unfortunately at the time of writing even the latest version of Opera version doesn t support CSS opacity so such an animation does not work in that browser. However this feature is planned for Opera version 9. Running the Animation The code for the processing animation consists of five methods the first three control the Processing . animation while the remaining two control the Done animation. The three methods that control the Processing . animation are startProc which sets up the Processing . animation and schedules repeated calls to doProc with setinterval doProc which monitors the properties of this class and sets the current frame of the Processing . animation appropriately stopProc which signals that the Processing . animation should cease The two that control the Done animation are startDone sets up the Done animation and schedules repeated calls to doDone with setinterval doDone sets the current frame of the Done animation and terminates the animation once it s completed Starting it Up Setting the animation up and starting it are jobs for the startProc method File excerpt function var self Status proc if false 100 setinterval 90 75 Licensed to siowchen@ Chapter 3 The A in AJAX After setting the proc property to proc processing this code calls the setDisplay method which sets the color and content of the pollingMessage div. We ll take a closer look at setDisplay next. Once the code sets the color and content of the pollingMessage div it initializes the div s opacity to 100 completely opaque and calls displayopacity to make this setting take effect. Finally this method calls setinterval to schedule the next step of the animation process. Note that as with setTimeout the setinterval call returns an interval ID. We store this in the procinterval property so we can stop the process later.

Không thể tạo bản xem trước, hãy bấm tải xuống
TỪ KHÓA LIÊN QUAN
TÀI LIỆU MỚI ĐĂNG
38    352    2    29-05-2024
169    72    2    29-05-2024
120    117    7    29-05-2024
Đã 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.