TAILIEUCHUNG - PHP and script.aculo.us Web 2.0 Application Interfaces- P9

PHP and Web Application Interfaces- P9: là một thư viện JavaScript cung cấp các hiệu ứng thị giác năng động, điều khiển giao diện người dùng, và các tính năng mạnh mẽ AJAX. Đó là những gì phụ-client PHP là phía máy chủ - mạnh mẽ, đơn giản, vui vẻ hoàn tất, và trên tất cả, PHẢI một! Theo các nhà phát triển, chúng tôi tất cả ước mơ xây dựng các ứng dụng mà người sử dụng ngay lập tức có thể rơi vào tình yêu với và nhận được hiệu quả. Đơn giản và các. | Chapter 13 In the code that we just saw we have created a simple text box and a submit button to post the data. The following screenshot shows us the output Now let s wrap things up and hide the user interface components that we do not intend to show to the user at this point in time. function showCommentsForm comments-form . add-comments . none hide-comments . Posting comments OK so now that we have our comments interface ready we will post the data to server the AJAX way. When the user clicks on the submit button the data is posted using the feature that we learned in Chapter 2. 229 Common 43 43 Things 43 Places and 43 People Clones We will add the following piece of JavaScript code to add the comments functionality function addComments var your_comments your_comments F your_comments var tutorialID tutorialID F tutorialID var ownerID ownerID F ownerID var pars your_comments tutorialID ownerID new asynchronous true parameters pars onComplete ShowData myform .reset return false In the above piece of code we are creating a function called addComments and it will read userID tutorialiD and the comments posted by the user. We will pass these values to the server file using . When the request is completed we will call another JavaScript function showData which will handle the response sent by the server. We mentioned that we are passing the values to the script. So let s explore what we will be doing in . A couple of things that we will have to do in sequence at the server side are as follows 1. Create an XML file. 2. Insert the data. 3. Read back the recently added comment. 4. Create an XML tree with the data read. Let s start by creating the XML file. The lines of code that we need to add to create an XML file are as follows header Content-Type text xml print xml version encoding UTF-8 standalone yes 230 Chapter 13 In this way we are passing

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.