tailieunhanh - Publishing AJAX and PHP - part 22

AJAX Grid // clear any output that has already been generated ob_clean(); // output the error message $error_message = 'ERRNO: ' . $errNo . chr(10) . 'TEXT: ' . $errStr . chr(10) . 'LOCATION: ' . $errFile . ', line ' . $errLine; echo $error_message; // prevent processing any more PHP scripts exit; } ? 7. It's time for the client now. Start by creating : AJAX Grid Now let's create the XSLT file named that will be used in the JavaScript code to generate the output: AJAX Grid. | AJAX Grid clear any output that has already been generated ob_clean output the error message error_message ERRNO . errNo . chr 10 . TEXT . errStr . chr 10 . LOCATION . errFile . line . errLine echo error_message prevent processing any more PHP scripts exit 7. It s time for the client now. Start by creating DOCTYPE html PUBLIC - W3C DTD XHTML Transitional EN http TR xhtml1 DTD xhtml1-transiti html head title AJAX Grid title script type text javascript src script link href type text css rel stylesheet head body onload init div id gridDiv body html 8. Now let s create the XSLT file named that will be used in the JavaScript code to generate the output xml version encoding lSO-8859-1 xsl stylesheet version xmlns xsl http 1999 XSL Transform xsl template match h2 AJAX Grid h2 xsl call-template name menu form id grid_form_id table class list tr th class th1 ID th th class th2 Name th th class th3 Price th th class th4 Promo th th class th5 th tr xsl for-each select data grid row xsl element name tr xsl attribute name id xsl value-of select product_id xsl attribute td xsl value-of select product_id td td xsl value-of select name td td xsl value-of select price td td xsl choose xsl when test on_promotion gt 0 input type checkbox name on_promotion disabled disabled checked checked xsl when xsl otherwise input type checkbox name on_promotion disabled disabled xsl otherwise xsl choose td 210 Chapter 8 td xsl element name a xsl attribute name href xsl attribute xsl attribute name onclick editld xsl value-of select product_id true xsl attribute Edi t xsl element td xsl element xsl for-each table form xsl call-template name menu xsl template xsl template name menu xsl for-each select data params table tr td class left xsl value-of select items_count Items td td class right xsl choose xsl when test previous_page 0 xsl element name a xsl attribute name href xsl attribute xsl attribute name onclick .

TỪ KHÓA LIÊN QUAN