<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress.com" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	>

<channel>
	<title>ajax &amp;laquo; WordPress.com Tag Feed</title>
	<link>http://wordpress.com/tag/ajax/</link>
	<description>Feed of posts on WordPress.com tagged "ajax"</description>
	<pubDate>Sat, 19 Jul 2008 04:42:39 +0000</pubDate>

	<generator>http://wordpress.com/tags/</generator>
	<language>en</language>

<item>
<title><![CDATA[Mejoras para formularios HTML]]></title>
<link>http://jseros.wordpress.com/?p=29</link>
<pubDate>Sat, 19 Jul 2008 03:36:45 +0000</pubDate>
<dc:creator>jseros</dc:creator>
<guid>http://jseros.wordpress.com/?p=29</guid>
<description><![CDATA[Existen formularios en la web imposibles de descifrar, sobre todo aquellos que hacen pensar al usuar]]></description>
<content:encoded><![CDATA[<p>Existen formularios en la web imposibles de descifrar, sobre todo aquellos que hacen pensar al usuario cuando el diligenciar un formulario debe ser de las acciones más sencillas en un sitio. Teniendo en cuenta esto hay <a href="http://woork.blogspot.com/2008/07/useful-tips-to-enrich-your-html-forms.html" target="_blank">ciertas sugerencias</a> que la gente de <a title="woork" href="http://woork.blogspot.com" target="_blank">woork</a> consideran utiles:</p>
<ul>
<li><strong>Añadir segerencias : </strong>pequeños mensajes frente al campo señalando requisitos importantes para el diligenciamiento del campo, como por ejemplo los caracteres mínimos y/o maximos que debe tener.</li>
<li><strong>Crear un sistema de autosuggest : </strong>una forma sencilla que puede ahorrale trabajo de escritura al usuario. Estos sistemas se pueden crear con frameworks y un buen uso de Javascript y AJAX.</li>
<li><strong>Añadir validaciones a algunos campos : </strong>por ejemplo una cuenta regresiva de carácteres para los campos input con límites.</li>
</ul>
]]></content:encoded>
</item>
<item>
<title><![CDATA[Деградабельний AJAX. Частина 1. Теорія.]]></title>
<link>http://grandse.wordpress.com/?p=78</link>
<pubDate>Fri, 18 Jul 2008 20:28:08 +0000</pubDate>
<dc:creator>grandse</dc:creator>
<guid>http://grandse.wordpress.com/?p=78</guid>
<description><![CDATA[Одним з технічних впроваджень, що прийшли з web 2.0 і відд]]></description>
<content:encoded><![CDATA[<p>Одним з технічних впроваджень, що прийшли з web 2.0 і відділяють його від web 1.0 є AJAX. Зараз є безліч статей, що стосується розробки проектів з використанням AJAX. Та чимало фреймворків, що спрощують роботу з ним. Однак, завжди стороною обходять один момент - робота з AJAX потребує ввімкненого JavaScript. Хоча в 90-95% користувачів все так і є, однак бувають і виключаення. Або випадки коли в деяких альтернативних браузерах компоненти, необхідні для повноцінної роботи JavaScript, відсутні. Живий приклад - gmail, що некоректно працює в браузері konqueror. Не хотілось юи втрачати частку цільової аудиторі (ніхто ж не виключає такий випадок, коли ), оскільки нав'язати потенційному користувачу нічого не можна - вірогідно, він рушить далі в пошуках чогось з меншим функціоналом, однак таким, що не ставить свої вимоги.<!--more--></p>
<h1 style="text-align:center;">Чи можливо з цим боротись?</h1>
<p>Досить багато часу я витратив на пошук якого-небудь готового рішення, яке б дозволило уникнути проблеми з користувачами, що навмисно (чи не зовсім) вимикають JavaScript. І як це мене не здивувало, жодної ідеї, жодної реалізації так і не знайшлось. Лише декілька статей про те, що це нікому не потрібно чи то, що не коштує це тих витрат, які вимагає.</p>
<p>Залишилось вигадати щось самому :).</p>
<p>Ну по-перше, виникло питання - яким чином можна перевірити, чи працює JavaScript? Логічно, що за допомогою самого скрипта - передаємо браузеру деякий код, який буде давати видимі для серверної частини результати і вже зрозуміло, що JavaScript ввімкнено. Після цього в мене і народилась основна концепція: сервер віддає клієнту код, пристосований для роботи без JavaScript, а клієнт за допомогою JavaScript перетворює цей самій код сторінки на такий, що він працює з AJAX. І звертається до серверної частини, орієнтованої на роботу з AJAX. Якщо ж у клієнта скрипт не виконається, то він отримає повний функціонал, що правда не в такій "чудовій упаковці".</p>
<p>Тобто нічого неможливого тут нема і не розумію чому тема була не досить добре освітлена в інтернеті і немає вже готового фреймворка.</p>
<h1 style="text-align:center;">Вимоги</h1>
<p>Однак при цьому для реалізації такого підходу необхідно окреслити вимоги.</p>
<p>1. Зазвичай робота AJAX полягає в довантаженні елементів сторінки, швидких переходах без оновлення всіх елементів, швидкій відправці форм, формуванні елементів управління близьких до встановлених у користувача програм. В основі є обробка кліків на посиланнях і завантаженні відповідних елементів та відправці форм.</p>
<p>2. Якомога менше додаткових елементів на сторінці. Звичайно ж, що проблему всі посилання, форми можна дублювати - одні для звичайної відправки, а інші для асинхронної.. Ну з точки зору здорового глузду це виглядає не дуже добре і користуватись такою системою буде не комфортно. Логічно де тільки можливо використовувати одні й тіж елементи для роботи в з ввімкненим і вимкненим JavaScript.</p>
<p>3. Мінімізація витрат для написання серверної частини. Зрозуміло, що у випадку, коли реалізація деградабельного аяксу буде вимагати витрат більших за гіпотетичний відсоток відвідувачів, яким це може стати в нагоді та змусить обрати саме цю систему, не є економічно вигідним - хіба, що Ви розробник і Вам за таку систему світить дуже добрий заробіток. Хоча і в такому випадку краще економити свій час і сили. :)</p>
<p>Як додаткові вимоги можна додати: можливіть блокуванння сторінки під час завантаження, попередження про довгий час завантаження. Останні вимоги є опціональними і як на мене дозволяють дуже сильно підняти юзабіліті сайту. Чому? Одна з проблем і переваг AJAX - асинхронність. Однак бувають випадки, коли сторінка має бути заблокована до отримання остаточних даних, з метою зменшення навантаження на сервер і запобігання виконанню зайвих дій. Наприклад, під час відправлення данних з форми на сервер. З асинхронності також виникає проблема неконтрольовантсті потоку даних браузером від сервера. Тобто, іноді буває складно визначити, чи закінчено передачу даних, чи цей проце ще триває, чи можливо взагалі виникла деяка помилка і краще буде перевантажити сторінку.</p>
<h1 style="text-align:center;">Анонс</h1>
<p>В найближчий час, спробую завершити другу частину, в якій детальніше буде описано механізм перетворення коду сторінки таким чином, щоб аякс був деградабельним, описано основні функції та механізм передачі даних на сервер та обробки даних, що прийшли.</p>
<p>Ну а поки що пропоную Вам поміркувати над написаним. Буду радий питанням та зауваженням, оскільки це дозволить зробити наступний матеріал краще та зрозуміліше.</p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[Growing Demand For Web Developers? ]]></title>
<link>http://clintonskakun.wordpress.com/?p=102</link>
<pubDate>Fri, 18 Jul 2008 18:02:53 +0000</pubDate>
<dc:creator>clintonskakun</dc:creator>
<guid>http://clintonskakun.wordpress.com/?p=102</guid>
<description><![CDATA[Is it just me or is there more people looking for developers every day. Now days a developer can fin]]></description>
<content:encoded><![CDATA[<p>Is it just me or is there more people looking for developers every day. Now days a developer can find almost any kind of job-from setting up a pre-built PHP application to being hired to build one from ground up.</p>
<p>The internet has enabled web developers from every part of the world, who would other wise be out of work, to rake it in. <a href="http://getafreelancer.com">GetAFreeLancer.com</a> is a living example. Thats right, you don't need to work for big company to make money in web development.</p>
<p>So, why should you learn about web development or web design? Theres a few reasons:</p>
<ul>
<li>Businesses(who specialize in other fields) always need someone who can set up a script or design a site.</li>
<li>Most people just don't have the time or patience to learn how to code a server side script.</li>
<li>Everyone wants a web site now days and their willing to pay through the ass to have one. Whether it's a WordPress blog or a vBulletin forum, if they hire to to set it up, its all money in your pocket.</li>
<li>You can live any where in the world, as long as you have a computer and internet, and still make a load of money.</li>
<li>Web Development is the going thing these days, if you don't hit it now you might miss it in the future.</li>
<li>You can build sites for your self.</li>
<li>You can share your knowledge in a blog and make money from it.</li>
<li>Once you know it you can take your knowledge further, sky's the limit!</li>
</ul>
<p>These are a few good reasons. However, you have to look at the down side.</p>
<ul>
<li>Web Design/Development isn't for eveyone!</li>
<li>It takes time and patience, something that you may not be willing to sacrifice.</li>
<li>It might be a steep learning curve to what your used to.</li>
<li>Unless you have the drive and the motivation you'll be fighting an up hill battle.</li>
<li>Depending on what your learning it may take a bit of pocket cash to get started.</li>
</ul>
<p>So what do you do if you want to learn web development? Start asking around, know what your getting into, look for tutorials and lessons in books and on the internet, keep learning(no one knows everything) and make sure you have the right tools.</p>
<p>Web development branches out to many other things. E.G. If you learn PHP, chances are your going to learn MySQL. In the end you may end up getting into more than you bargined for. Just learn the basics(PHP, XHtml, Xml, Css, Some Graphics, Database-MySQL).</p>
<p>Hope this helps:)</p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[A handy checklist for testers and programmers]]></title>
<link>http://mohitvalecha.wordpress.com/?p=123</link>
<pubDate>Fri, 18 Jul 2008 15:49:29 +0000</pubDate>
<dc:creator>mohitvalecha</dc:creator>
<guid>http://mohitvalecha.wordpress.com/?p=123</guid>
<description><![CDATA[As a programmer i always felt the desire and importance of a handy checklist which could help progra]]></description>
<content:encoded><![CDATA[<p>As a programmer i always felt the desire and importance of a handy checklist which could help programmers and testers to code and test their applications. After lots of research, i made one which is presented below. Please feel free to comment and provide suggestions and feedbacks.</p>
<p><strong>Source Code Testing:</strong> </p>
<ol type="1">
<li>Source Code history</li>
<li>Use of readable indentation for source</li>
<li>Source Code optimization</li>
<li>Source Code Comment documentation</li>
<li>Source Code Backup</li>
<li>Appropriate naming conventions for source files</li>
<li>Appropriate storage location for source files</li>
<li>Appropriate use of Transactions wherever required</li>
<li>Appropriate use of Stored Procedures wherever required</li>
<li>Use of functions for code reuse</li>
<li>Use of Common library</li>
<li>CSS Code to be separated from the source code</li>
<li>AJAX code to be separated from the source code</li>
<li>Use of version control mechanism</li>
<li>Source Code encryption mechanism</li>
<li>Appropriate use of sessions / cookies</li>
<li>LDAP authentication</li>
<li>Following the standards. (for e.g. XHTML 1.0 standard for web coding).</li>
<li>Appropriate naming conventions for functions used and functions in the common library</li>
<li>Appropriate Folder structure for source code files</li>
<li>Clearance of extra comments, unnecessary code, echoes, alerts, type texts</li>
<li>No hard coding should be present </li>
</ol>
<p><strong>Database Testing:</strong> </p>
<ol type="1">
<li>Appropriate linking of tables</li>
<li>Normalization</li>
<li>Naming Conventions</li>
<li>Appropriate storage engine is used</li>
<li>Optimized field types are used</li>
<li>Backup function</li>
<li>Appropriate use of Triggers</li>
<li>Encrypted storage of confidential data</li>
<li>Compressed storage of big data</li>
<li>Appropriate prefixing for special characters before storage</li>
<li>Scalability</li>
<li>Database Document - Design schema with sample data</li>
<li>Appropriate filtering of data before storing into the database</li>
<li>Appropriate default values for table fields</li>
<li>Appropriate comments entered for table fields</li>
<li>Database Design query with sample data to be documented </li>
</ol>
<p><strong>UI Testing:</strong><strong> </strong></p>
<ol type="1">
<li>Consistency of screens</li>
<li>Consistency of background colours</li>
<li>Usage of pleasant colours</li>
<li>IPR violation with logos, images, colours, text</li>
<li>Consistency across multiple browsers (IE, Mozilla, Netscape)</li>
<li>All controls on the screen should be accessible through keyboard / Keyboard shortcuts</li>
<li>Various screen sizes testing</li>
<li>Various Platforms testing</li>
<li>Best Configuration message on home page</li>
<li>Appropriate tool tips for all elements on UI</li>
<li>All dropdowns heights and widths, symmetry and consistency</li>
<li>Textboxes height and width</li>
<li>Overall symmetry</li>
<li>All kinds of necessary validations for blank data inputs, illegal data inputs</li>
<li>Warning, error window sizes and placement</li>
<li>Test for SQL injection</li>
<li>Testing for over limit, under limit, different data types, null inputs</li>
<li>Testing for Reflection, no variable/class/method names should be hard coded</li>
<li>Print all the output reports and test them for alignment, proper page breaks, formatting, paper size, data readability and completeness</li>
<li>Scalability for various technologies, if yes, define configuration and process steps for migration</li>
<li>Backup</li>
<li>Backup Procedure documented</li>
<li>Auto/Manual Backup</li>
<li>All necessary documentations: commenting the code, flow chart, database design/schema, table design/scheme, user manual, source code/files naming conventions, ER diagram, help files, researched material</li>
<li>Testing for SOX compliancy</li>
<li>Overall user friendliness &#38; aesthetics</li>
<li>Should be best viewable with 800x600 resolution</li>
<li>Maximizing, minimizing, resizing of windows to be possible</li>
<li>Positioning of cursor on the first editable field in Data entry screens</li>
<li>Every screen should have one Default button</li>
<li>Acknowledgment of error messages should take the control to where the error occurred</li>
<li>The Title bar should contain appropriate title</li>
<li>Every screen should have a title/header</li>
<li>Ease of use without any help</li>
<li>Grammatical correctness of error messages</li>
<li>Correct grammar for texts, field names, tool tips</li>
<li>Grammatical correctness of Help text</li>
<li>Text box lengths should correspond the length of data they take, wherever possible</li>
<li>Default values to be populated wherever possible</li>
<li>Consistent behaviour when screen resolution is changed</li>
<li>Consistency of margins and header and footer</li>
<li>Consistency of Colour of form</li>
<li>Consistency of Size of form</li>
<li>Consistency of fonts used for labels</li>
<li>Consistency of Size of buttons</li>
<li>Consistent use of animations/graphics</li>
<li>Consistency of labelling of controls (buttons, boxes)</li>
<li>Consistency of length of textboxes for the same field</li>
<li>Consistency of formats for date fields</li>
<li>Effective reuse of repeatable visual themes</li>
<li>When a button is clicked</li>
<li>When an error is encountered</li>
<li>When a field is being validated</li>
<li>Should support users' sequence of accomplishing a task</li>
<li>‘Back' and ‘Home' links to be provided</li>
<li>Correct order of tabbing</li>
<li>Text to be selected when tabbing to a textbox</li>
<li>All tab controls should be accessible thru' keyboard</li>
<li>Shortcut keys (hot keys) to be unique</li>
<li>Links should be obvious and consistent</li>
<li>Functioning of the ‘Back' and ‘Forward' functions of the browser</li>
<li>Check if all links are active</li>
<li>Alignment of labels</li>
<li>Alignment of buttons</li>
<li>Anything that needs user action must be communicated</li>
<li>Feedback should be provided whenever relevant</li>
<li>Minimum usage of pop-ups and message boxes</li>
<li>User errors must be communicated</li>
<li>Availability of Help feature</li>
<li>Availability of Context-sensitive help, wherever needed</li>
<li>Buttons should be enabled/disabled depending on context</li>
<li>Non-editable text fields should be distinctly visible from others</li>
<li>Messages and labels should be accurate and appropriate for the context</li>
<li>Check if all links lead to meaningful points</li>
<li>Use of familiar and comfortable language</li>
<li>Abbreviations and code language to be used minimally</li>
<li>Help and Search links should be distinctly visible</li>
<li>Visible font for all text</li>
<li>Avoid all CAPS text</li>
<li>Help messages to be clear and concise</li>
<li>Error messages to be clear and concise</li>
<li>Should avoid horizontal scrolling</li>
<li>Should avoid vertical scrolling as much as possible</li>
<li>Logical ordering of controls</li>
<li>Position of controls should be meaningful</li>
<li>Grouping of related info. and data</li>
<li>Appropriate label for grouped data</li>
<li>Drop down/combo box menu to be ordered</li>
<li>Toggling of checkboxes</li>
<li>Checking/un checking of checkboxes through space-bar</li>
<li>Single choice for radio-buttons</li>
<li>Access keys (Keyboard shortcuts) letter should be underlined when visible on the UI</li>
<li>Frozen grid titles</li>
<li>Horizontal alignment of tables, body, div, span, data grid</li>
<li>Vertical alignment of tables, body, div, span, data gird</li>
<li>Mandatory fields should be distinctly marked in the UI </li>
</ol>
<p><strong>Functional Testing:</strong><strong> </strong></p>
<ol type="1">
<li>Basic Data flow is working properly</li>
<li>To be able to add data and save it correctly</li>
<li>To be able to edit data correctly</li>
<li>To be able to copy data correctly</li>
<li>To be able to delete data correctly</li>
<li>Cancel function</li>
<li>Logout function</li>
<li>Change Password feature</li>
<li>Password Complexity</li>
<li>Password History</li>
<li>Various authentication levels</li>
<li>Application should be accessible thru' URL as well as IP address</li>
<li>Time to load the application must be appropriate</li>
<li>Search Function</li>
<li>Search facility should be flexible (wildcards, mixed case, partial strings etc.)</li>
<li>Prompt to save unsaved data while trying to move to next screen</li>
<li>Password validation</li>
<li>Positioning of pop up windows</li>
<li>Field vs. form level validations</li>
<li>Destructive actions to be confirmed</li>
<li>UI shows navigation and user friendly message for null records in the database</li>
<li>Search Engine Optimization (SEO)</li>
<li>A "Contact us" page for maintenance team. The page should have mail id,  address and phone numbers</li>
<li>Application should have a visible status bar - logged in user, logged in time, date</li>
<li>A user confirmation while logging out or closing the application</li>
<li>User should not be allowed to navigation to any of the application pages without logging in</li>
<li>User session should auto expire within the following specified time period (5 minutes &#62; Session Expiry time &#62; 15 minutes)</li>
<li>Highlighting of searched keywords should be present for Search feature</li>
</ol>
]]></content:encoded>
</item>
<item>
<title><![CDATA[Crie formulários para sites e blogs - serviço gratuito]]></title>
<link>http://cacalinks.wordpress.com/?p=829</link>
<pubDate>Fri, 18 Jul 2008 13:07:15 +0000</pubDate>
<dc:creator>deianaweb</dc:creator>
<guid>http://cacalinks.wordpress.com/?p=829</guid>
<description><![CDATA[Para os que não possuem muito conhecimento em programação de formulários ou para os que desejam ]]></description>
<content:encoded><![CDATA[<p>Para os que não possuem muito conhecimento em programação de formulários ou para os que desejam ganhar tempo em seus projetos web, encontramos 2 serviços bem úteis, que fornecem ferramentas profissionais capazes de criar formulários para serem utilizados em sites e blogs gratuitamente.</p>
<p><a title="FormFacil" href="http://www.formfacil.com/" target="_blank"><img class="alignleft size-full wp-image-830" src="http://cacalinks.wordpress.com/files/2008/07/formfacil.jpg" alt="" width="317" height="97" /></a></p>
<p><strong><a title="FormFacil" href="http://www.formfacil.com/" target="_blank">FormFacil</a> </strong>(site em Português BR): para usar o serviço é necessário cadastro, para isso, entre no site e clique em Cadastre-se, aparecerá um popup para inserção dos seus dados. Ao logar-se, você poderá criar quantos formulários desejar, configurando-os de acordo com as instruções, criando campos específicos, de acordo com sua necessidade, podendo deixar seu formulário público ou não, depois, basta copiar o código gerado para seu site/blog, para que seus visitantes possam entrar em contato com você. Também é possível ver relatórios, exportar os dados recebidos para seu computador, podendo abrí-los no Excel, em formato CSV. O interessante é que o mesmo desenvolvedor do site FormFacil também criou um outro site chamado <strong><a title="ImagemFacil" href="http://www.imagemfacil.com/" target="_blank">ImagemFacil</a></strong>, que oferece um serviço para edição de imagens e, quem fizer seu cadastro em um dos serviços, poderá utilizar o mesmo login e senha para os dois sites, sem a necessidade de cadastrar-se duas vezes. O ImagemFacil oferece diversos recursos para edição de imagens online, inclusive bordas decorativas para fotos digitais, emblemas de times de futebol e vários efeitos de filtros.</p>
<p><a title="Kontactr" href="http://kontactr.com/" target="_blank"><img class="alignleft size-full wp-image-831" src="http://cacalinks.wordpress.com/files/2008/07/kontactr.gif" alt="" width="221" height="68" /></a></p>
<p><strong><a title="Kontactr" href="http://kontactr.com/" target="_blank">Kontactr</a></strong> (site em Inglês): Com ele é possível ter em seu site/blog um formulário de contato estilo Web2.0, muito simples e fácil de usar.  Para utilizar o serviço é necessário cadastro: <a title="Cadastre-se no Kontactr" href="http://kontactr.com/signup/" target="_blank">clique aqui</a>. Após o cadastro você receberá um email para ativar sua conta. Ao logar-se, você será direcionado à uma página onde poderá copiar e colar os códigos disponíveis. Existem códigos em HTML e AJAX, que tanto podem ficar fixos em uma página, ou em forma dos novos popups feitos em AJAX. Os formulários possuem a ferramenta anti-spam conhecida com CAPTCHA(não sabe o que é CAPTCHA, <a title="Definição de CAPTCHA - Wikipédia" href="http://pt.wikipedia.org/wiki/CAPTCHA" target="_blank">clique aqui</a>). Muito bom!</p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[Adapting to Web Standards; CSS and Ajax for Big Sites]]></title>
<link>http://booksurfer.wordpress.com/?p=76</link>
<pubDate>Fri, 18 Jul 2008 08:22:25 +0000</pubDate>
<dc:creator>bookrider</dc:creator>
<guid>http://booksurfer.wordpress.com/?p=76</guid>
<description><![CDATA[Adapting to Web Standars
Amazing books !!!
Web standards is a term used to mean Web pages built usin]]></description>
<content:encoded><![CDATA[[caption id="attachment_85" align="aligncenter" width="139" caption="Adapting to Web Standars"]<a href="http://booksurfer.files.wordpress.com/2008/07/adaptingtowebstandards.jpg"><img class="size-medium wp-image-85" src="http://booksurfer.wordpress.com/files/2008/07/adaptingtowebstandards.jpg?w=139" alt="Adapting to Web Standars" width="139" height="180" /></a>[/caption]
<p>Amazing books !!!</p>
<p>Web standards is a term used to mean Web pages built using the open and compatible recommendations from the World Wide Web Consortium (W3C) and other standards bodies as opposed to closed, proprietary, corporate feature sets. These recommendations, combined with modern best practices, exploit the standardized power of the modern Web browsers that dominate the market today, as opposed to out-of-date browsers that were feature-rich but inconsistent and often incompatible. Placing a graphic that reads “This site designed for Netscape Navigator” on the main page of a Web site should be a thing of the past.<br />
Web standards fail gracefully when encountered by out-of-date browsers. The standards are also intended to provide greater benefit for accessibility and for other types of media. These techniques are built with intentional side effects that can benefit users, the company, and the team responsible for creating the sites. Whole books have been written on the subject.<!--more--></p>
<p>To embrace standards is only the start. Some planning must occur to create a standards strategy that will endure over time, be applied gracefully, and scale within an organization, team, or enterprise. A solid foundation should be created by getting back to the basics and building with deliberate choices instead of accidental decisions. This book will help a Web team reexamine why they are creating standards-based<br />
Web sites and how best to do it. It will help evaluate what is in place now as well as the impact of Web standards on a team or a Web site as a whole. It will also assist with staying organized over time and in finding ways to improve stability and reduce risk in Web applications. It will help create techniques that leverage the unique strengths of Web standards in a CMS (Content Management System). Finally, this book will finish by examining some process and staffing considerations of Web standards.</p>
<p><a title="Adapting-Web-Standars-CSS-and-Ajax" href="http://rapidshare.com/files/130573979/Adapting-Web-Standars-CSS-and-Ajax.rar" target="_blank">Download</a> (7.2MB)</p>
<p>Free ebooks download &#124; Free CSS ebooks &#124; Free Ajax ebooks &#124; Free CMS ebooks</p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[Ajax Autocomplete Tutorial]]></title>
<link>http://worthposting.wordpress.com/?p=118</link>
<pubDate>Fri, 18 Jul 2008 07:57:36 +0000</pubDate>
<dc:creator>worthposting</dc:creator>
<guid>http://worthposting.wordpress.com/?p=118</guid>
<description><![CDATA[

This a solution i used in many autocomplete input fields. I have implemented it to php and C# web ]]></description>
<content:encoded><![CDATA[<p><!--[if gte mso 9]&#62;  Normal 0     false false false  EL X-NONE X-NONE                            &#60;![endif]--><!--[if gte mso 9]&#62;                                                                                                                                            &#60;![endif]--></p>
<p class="MsoNormal" style="line-height:normal;"><img class="alignnone" src="http://josegjimenez.files.wordpress.com/2008/04/ajax-logo.jpg" alt="" width="474" height="236" /></p>
<p class="MsoNormal" style="line-height:normal;">This a solution i used in many autocomplete input fields. I have implemented it to php and C# web application.<br />
Dont be scared to use it, its really simple to use. The tutorial is fully explanatory.</p>
<p class="MsoNormal" style="line-height:normal;"><!--more--></p>
<p class="MsoNormal" style="line-height:normal;">
<p class="MsoNormal" style="line-height:normal;"><strong><span style="font-size:18pt;font-family:&#34;">Part 1: Auto Complete</span></strong></p>
<p class="MsoNormal" style="line-height:normal;"><span style="font-size:12pt;font-family:&#34;">Start by creating a new PHP page and placing the agent.php (</span><a href="http://ajaxagent.org/modules/mydownloads/visit.php?cid=1&#38;lid=4"><span style="font-size:12pt;font-family:&#34;">Ajax Agent</span></a><span style="font-size:12pt;font-family:&#34;">) file in the same directory. Open your new PHP page in an editor and start hacking away.</span></p>
<p class="MsoNormal" style="line-height:normal;"><span style="font-size:12pt;font-family:&#34;">First create the HTML Form controls we will be using:</span></p>
<ol type="1">
<li class="MsoNormal"><span style="font-size:12pt;font-family:&#34;">txtArtists      = TextBox to type the ArtistName in.</span></li>
<li class="MsoNormal"><span style="font-size:12pt;font-family:&#34;">matches      = A SelectBox with an onclick event which will be used to send the      ArtistName to the AlbumSearch method we will be creating.</span></li>
<li class="MsoNormal"><span style="font-size:12pt;font-family:&#34;">txtArtistID      = Hidden to hold the selected ArtistName (js cannot see the select box      because it is hidden?)</span></li>
<li class="MsoNormal"><span style="font-size:12pt;font-family:&#34;">htmlOutput      = An empty DIV when we will be creating a list of Albums</span></li>
<li class="MsoNormal"><span style="font-size:12pt;font-family:&#34;">htmlOutputTracks      = An empty DIV when we will be creating a list of Tracks</span></li>
</ol>
<p class="MsoNormal" style="line-height:normal;"><span style="font-size:12pt;font-family:&#34;">HTML:</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><strong><span style="font-size:10pt;font-family:&#34;">&#60;form&#62;</span></strong></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><strong><span style="font-size:10pt;font-family:&#34;">&#60;input</span></strong><span style="font-size:10pt;font-family:&#34;"> </span><span style="font-size:10pt;font-family:&#34;">name</span><span style="font-size:10pt;font-family:&#34;">=</span><span style="font-size:10pt;font-family:&#34;">"artistName"</span><span style="font-size:10pt;font-family:&#34;"> </span><span style="font-size:10pt;font-family:&#34;">id</span><span style="font-size:10pt;font-family:&#34;">=</span><span style="font-size:10pt;font-family:&#34;">"artistName"</span><span style="font-size:10pt;font-family:&#34;"> </span><span style="font-size:10pt;font-family:&#34;">size</span><span style="font-size:10pt;font-family:&#34;">=</span><span style="font-size:10pt;font-family:&#34;">"20"</span><span style="font-size:10pt;font-family:&#34;"> </span><span style="font-size:10pt;font-family:&#34;">type</span><span style="font-size:10pt;font-family:&#34;">=</span><span style="font-size:10pt;font-family:&#34;">"text"</span><span style="font-size:10pt;font-family:&#34;"> </span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&#34;">onkeyup</span><span style="font-size:10pt;font-family:&#34;">=</span><span style="font-size:10pt;font-family:&#34;">"GetArtist();return false;"</span><span style="font-size:10pt;font-family:&#34;"> autocomplete=</span><span style="font-size:10pt;font-family:&#34;">"off"</span><strong><span style="font-size:10pt;font-family:&#34;">&#62;</span></strong></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><strong><span style="font-size:10pt;font-family:&#34;">&#60;br&#62;</span></strong></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><strong><span style="font-size:10pt;font-family:&#34;">&#60;select</span></strong><span style="font-size:10pt;font-family:&#34;"> </span><span style="font-size:10pt;font-family:&#34;">id</span><span style="font-size:10pt;font-family:&#34;">=</span><span style="font-size:10pt;font-family:&#34;">"matches"</span><span style="font-size:10pt;font-family:&#34;"> </span><span style="font-size:10pt;font-family:&#34;">style</span><span style="font-size:10pt;font-family:&#34;">=</span><span style="font-size:10pt;font-family:&#34;">"VISIBILITY: hidden"</span><span style="font-size:10pt;font-family:&#34;"> </span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&#34;">onclick</span><span style="font-size:10pt;font-family:&#34;">=</span><span style="font-size:10pt;font-family:&#34;">"MatchSelected(this);"</span><span style="font-size:10pt;font-family:&#34;"> </span><strong><span style="font-size:10pt;font-family:&#34;">&#62;&#60;/select&#62;</span></strong></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&#34;"> </span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><strong><span style="font-size:10pt;font-family:&#34;">&#60;hr&#62;</span></strong></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><strong><span style="font-size:10pt;font-family:&#34;">&#60;div</span></strong><span style="font-size:10pt;font-family:&#34;"> </span><span style="font-size:10pt;font-family:&#34;">id</span><span style="font-size:10pt;font-family:&#34;">=</span><span style="font-size:10pt;font-family:&#34;">"htmlOutput"</span><strong><span style="font-size:10pt;font-family:&#34;">&#62;&#60;/div&#62;</span></strong></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><strong><span style="font-size:10pt;font-family:&#34;">&#60;hr&#62;</span></strong></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><strong><span style="font-size:10pt;font-family:&#34;">&#60;div</span></strong><span style="font-size:10pt;font-family:&#34;"> </span><span style="font-size:10pt;font-family:&#34;">id</span><span style="font-size:10pt;font-family:&#34;">=</span><span style="font-size:10pt;font-family:&#34;">"htmlOutputTracks"</span><strong><span style="font-size:10pt;font-family:&#34;">&#62;&#60;/div&#62;</span></strong></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><strong><span style="font-size:10pt;font-family:&#34;">&#60;/form&#62;</span></strong></p>
<p class="MsoNormal" style="line-height:normal;"><span style="font-size:12pt;font-family:&#34;">Now at the top of the page add a new PHP script tag with an include for agent.php and a new $agent object. Any other PHP code that we must be placed before (above) this code.</span></p>
<p class="MsoNormal" style="line-height:normal;"><span style="font-size:12pt;font-family:&#34;">PHP:</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><em><span style="font-size:10pt;font-family:&#34;">/* my functions go here</span></em></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><em><span style="font-size:10pt;font-family:&#34;">and</span></em></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><em><span style="font-size:10pt;font-family:&#34;">here</span></em></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><em><span style="font-size:10pt;font-family:&#34;">*/</span></em></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&#34;"> </span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&#34;">include_once</span><span style="font-size:10pt;font-family:&#34;">(</span><span style="font-size:10pt;font-family:&#34;">"agent.php"</span><span style="font-size:10pt;font-family:&#34;">)</span><span style="font-size:10pt;font-family:&#34;">;</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&#34;">$agent</span><span style="font-size:10pt;font-family:&#34;">-&#62;<span style="color:black;">()</span>;</span></p>
<p class="MsoNormal" style="line-height:normal;"><span style="font-size:12pt;font-family:&#34;">Next we'll add the first function that search for Artists by name.</span></p>
<p class="MsoNormal" style="line-height:normal;"><span style="font-size:12pt;font-family:&#34;">GetArtist function works by taking a string parameter and uses it to search for Artists who's name begin with it using a Regular Expression. The list of Artists are stored in an Array array and we will use a foreach loop to search the Artis Name. If we find a match we add it to a second $results array and them move on to the next item in the array. Once we have reached the end of the $Artist Array we re-sort the $results Array. Lastly we only want to return a list of Artist Name so we'll use the array_values($results) function.</span></p>
<p class="MsoNormal" style="line-height:normal;"><span style="font-size:12pt;font-family:&#34;">PHP:</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><strong><span style="font-size:10pt;font-family:&#34;">function</span></strong><span style="font-size:10pt;font-family:&#34;"> GetArtist<span style="color:black;">(</span> <span style="color:#0600ff;">$text</span> <span style="color:black;">){</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&#34;">include</span><span style="font-size:10pt;font-family:&#34;">(</span><span style="font-size:10pt;font-family:&#34;">"dbconn.inc.php"</span><span style="font-size:10pt;font-family:&#34;">)</span><span style="font-size:10pt;font-family:&#34;">;</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&#34;">$strSQL</span><span style="font-size:10pt;font-family:&#34;"> = <span style="color:red;">"SELECT * FROM artists WHERE artist_name LIKE '$text%'"</span>;</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&#34;"> </span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&#34;">$db</span><span style="font-size:10pt;font-family:&#34;">= <span style="color:#0600ff;">mysql_connect</span><span style="color:black;">(</span><span style="color:#0600ff;">$dbHost</span>, <span style="color:#0600ff;">$dbUser</span>,<span style="color:#0600ff;">$dbPwd</span><span style="color:black;">)</span>;</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&#34;">mysql_select_db</span><span style="font-size:10pt;font-family:&#34;">(</span><span style="font-size:10pt;font-family:&#34;">$dbName</span><span style="font-size:10pt;font-family:&#34;">,<span style="color:#0600ff;">$db</span><span style="color:black;">)</span>;</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&#34;">$result</span><span style="font-size:10pt;font-family:&#34;"> = <span style="color:#0600ff;">mysql_query</span><span style="color:black;">(</span><span style="color:#0600ff;">$strSQL</span>,<span style="color:#0600ff;">$db</span><span style="color:black;">)</span>;</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&#34;">$num</span><span style="font-size:10pt;font-family:&#34;"> = <span style="color:#0600ff;">mysql_num_rows</span><span style="color:black;">(</span><span style="color:#0600ff;">$result</span><span style="color:black;">)</span>;</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&#34;"> </span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&#34;">$listArray</span><span style="font-size:10pt;font-family:&#34;"> = <span style="color:#0600ff;">array</span><span style="color:black;">()</span>;</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&#34;">$i</span><span style="font-size:10pt;font-family:&#34;">=<span style="color:red;">0</span>;</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&#34;">while</span><span style="font-size:10pt;font-family:&#34;"> <span style="color:black;">(</span><span style="color:#0600ff;">$i</span>&#60;<span style="color:#0600ff;">$num</span><span style="color:black;">)</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&#34;">{</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&#34;">$artist_name</span><span style="font-size:10pt;font-family:&#34;"> = <span style="color:#0600ff;">mysql_result</span><span style="color:black;">(</span><span style="color:#0600ff;">$result</span>,<span style="color:#0600ff;">$i</span>,<span style="color:red;">"artist_name"</span><span style="color:black;">)</span>;</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&#34;">$listArray</span><span style="font-size:10pt;font-family:&#34;">[</span><span style="font-size:10pt;font-family:&#34;">$i</span><span style="font-size:10pt;font-family:&#34;">]</span><span style="font-size:10pt;font-family:&#34;"> = <span style="color:#0600ff;">$artist_name</span>;</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&#34;">$i</span><span style="font-size:10pt;font-family:&#34;">++;</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&#34;"> </span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&#34;">}</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&#34;"> </span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&#34;">asort</span><span style="font-size:10pt;font-family:&#34;">(</span><span style="font-size:10pt;font-family:&#34;"> <span style="color:#0600ff;">$listArray</span> <span style="color:black;">)</span>;</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&#34;">mysql_close</span><span style="font-size:10pt;font-family:&#34;">(</span><span style="font-size:10pt;font-family:&#34;">$db</span><span style="font-size:10pt;font-family:&#34;">)</span><span style="font-size:10pt;font-family:&#34;">;</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&#34;"> </span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&#34;">return</span><span style="font-size:10pt;font-family:&#34;"> <span style="color:#0600ff;">$listArray</span>;</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&#34;"> </span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&#34;">}</span></p>
<p class="MsoNormal" style="line-height:normal;"><span style="font-size:12pt;font-family:&#34;">So far we have a form and a PHP function now we need to wire up some ajax to make this work.</span></p>
<p class="MsoNormal" style="line-height:normal;"><span style="font-size:12pt;font-family:&#34;">*There are some visibility issues with JS and the HTML Controls so the &#60;SCRIPT&#62; block needs to be below the form elements.*</span></p>
<p class="MsoNormal" style="line-height:normal;"><span style="font-size:12pt;font-family:&#34;">We need to create 2 JS functions to get this to work.The first function GetArtist is what we will call from our OnKey Event iun the search text box and the second function is the Callback method we will send our search results to.</span></p>
<p class="MsoNormal" style="line-height:normal;"><span style="font-size:12pt;font-family:&#34;">In the GetArtist function we are creating a temp variable to get the letters from the search box and then we are using the agent.call function do define the PHP function, the JS Callback and the parameters we are sending.</span></p>
<p class="MsoNormal" style="line-height:normal;"><span style="font-size:12pt;font-family:&#34;">Javascript:</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><strong><span style="font-size:10pt;font-family:&#34;">var</span></strong><span style="font-size:10pt;font-family:&#34;"> matchList = document.<span style="color:#0600ff;">getElementById</span><span style="color:black;">(</span><span style="color:red;">"matches"</span><span style="color:black;">)</span>;</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&#34;"> </span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><strong><span style="font-size:10pt;font-family:&#34;">function</span></strong><span style="font-size:10pt;font-family:&#34;"> GetArtist<span style="color:black;">()</span> <span style="color:black;">{</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><strong><span style="font-size:10pt;font-family:&#34;">var</span></strong><span style="font-size:10pt;font-family:&#34;"> artistName = document.<span style="color:#0600ff;">getElementById</span><span style="color:black;">(</span><span style="color:red;">'artistName'</span><span style="color:black;">)</span>.<span style="color:#0600ff;">value</span>;</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&#34;">agent.<span style="color:#0600ff;">call</span><span style="color:black;">(</span><span style="color:red;">''</span>,<span style="color:red;">'GetArtist'</span>,<span style="color:red;">'GetArtist_Callback'</span>,artistName<span style="color:black;">)</span>;</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&#34;">}</span></p>
<p class="MsoNormal" style="line-height:normal;"><span style="font-size:12pt;font-family:&#34;">In the GetArtist_Callback we are setting the Select Box to visible and then giving it a display size which is equal to the number of items returned from the search. Then we loop over the items and add them to the select box.</span></p>
<p class="MsoNormal" style="line-height:normal;"><span style="font-size:12pt;font-family:&#34;">Javascript:</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><strong><span style="font-size:10pt;font-family:&#34;">function</span></strong><span style="font-size:10pt;font-family:&#34;"> GetArtist_Callback<span style="color:black;">(</span>obj<span style="color:black;">)</span> <span style="color:black;">{</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&#34;">matchList.<span style="color:#0600ff;">style</span>.<span style="color:#0600ff;">visibility</span> = <span style="color:red;">"visible"</span>;</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&#34;">matchList.<span style="color:#0600ff;">options</span>.<span style="color:#0600ff;">length</span> = <span style="color:red;">0</span>; <em><span style="color:#008800;">//reset the states dropdown</span></em></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&#34;">matchList.<span style="color:#0600ff;">size</span> = obj.<span style="color:#0600ff;">length</span>;</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&#34;"> </span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><strong><span style="font-size:10pt;font-family:&#34;">for</span></strong><span style="font-size:10pt;font-family:&#34;"> <span style="color:black;">(</span><strong><span style="color:#0600ff;">var</span></strong> i = <span style="color:red;">0</span>; i &#60; obj.<span style="color:#0600ff;">length</span>; i++<span style="color:black;">)</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&#34;">{</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&#34;">matchList.<span style="color:#0600ff;">options</span><span style="color:black;">[</span>matchList.<span style="color:#0600ff;">options</span>.<span style="color:#0600ff;">length</span><span style="color:black;">]</span> =<strong><span style="color:#0600ff;">new</span></strong> Option<span style="color:black;">(</span>obj<span style="color:black;">[</span>i<span style="color:black;">])</span>;</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&#34;">}</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&#34;">}</span></p>
<p class="MsoNormal" style="line-height:normal;"><span style="font-size:12pt;font-family:&#34;">And lastly we have the MatchSelected JS function which is called by the OnClick event of the SelectBox:</span></p>
<p class="MsoNormal" style="line-height:normal;"><span style="font-size:12pt;font-family:&#34;">Javascript:</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><strong><span style="font-size:10pt;font-family:&#34;">function</span></strong><span style="font-size:10pt;font-family:&#34;"> MatchSelected<span style="color:black;">(</span>matches<span style="color:black;">)</span> <span style="color:black;">{</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><strong><span style="font-size:10pt;font-family:&#34;">var</span></strong><span style="font-size:10pt;font-family:&#34;"> artistName = document.<span style="color:#0600ff;">getElementById</span><span style="color:black;">(</span><span style="color:red;">"artistName"</span><span style="color:black;">)</span>;</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&#34;">artistName.<span style="color:#0600ff;">value</span> = matches.<span style="color:#0600ff;">options</span><span style="color:black;">[</span>matches.<span style="color:#0600ff;">selectedIndex</span><span style="color:black;">]</span>.<span style="color:#0600ff;">text</span>;</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&#34;">GetAlbumByArtist<span style="color:black;">(</span>artistName.<span style="color:#0600ff;">value</span><span style="color:black;">)</span>;</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&#34;">}</span></p>
<p class="MsoNormal" style="line-height:normal;"><span style="font-size:12pt;font-family:&#34;">We will cover this function in the next section but for now just know that it invokes the Ajax function that gets a list of Albums by the selected Artist.</span></p>
<p class="MsoNormal" style="line-height:normal;"><span style="font-size:12pt;font-family:&#34;">If all has gone well you should be able to start typing in a name and some results should show as a select box. Once you have this part working we will move on to the second function of GetAlbumsByArtist.</span></p>
<p class="MsoNormal" style="line-height:normal;">
<p class="MsoNormal" style="line-height:normal;"><!--[if gte mso 9]&#62;  Normal 0     false false false  EL X-NONE X-NONE                            &#60;![endif]--><!--[if gte mso 9]&#62;                                                                                                                                            &#60;![endif]--></p>
<h2><span lang="EN-US">Part 2: Posting Back</span></h2>
<p><span lang="EN-US">This next part is some very cool stuff. What we are going to do is select an item from the SelectBox which will return a list of Albums by the selected Artist. Since the list of Albums is being held in a server-side PHP Array getting the data back requires a round-trip to the server. In any normal case this is done in a Form Post which casues a page refresh but we are going to use Ajax to fire-off the server-side request for the data and avoid refreshing the page all together. The Get Albums task is made up of 2 parts: a server-side PHP function that searchs for the Albums and a client-side Ajax function that invokes the server-side function and hadles the response.The PHP function GetAlbumByArtist works like the GetArtist PHP function but instead of a regex we'll just use a string comparison usiug the Artist Name.</span></p>
<p><span lang="EN-US">PHP:</span></p>
<pre><strong><span style="color:black;">function</span></strong><span lang="EN-US"> GetAlbumByArtist<span style="color:black;">(</span> <span style="color:#0600ff;">$text</span> <span style="color:black;">)</span></span>
<span style="color:black;">{</span>
<span style="color:#0600ff;">include</span><span style="color:black;">(</span><span style="color:red;">"dbconn.inc.php"</span><span style="color:black;">)</span><span lang="EN-US">;</span>
<span style="color:#0600ff;">$strSQL</span><span lang="EN-US"> = <span style="color:red;">"SELECT albums.album_name FROM albums INNER JOIN artists ON </span></span>
<span style="color:red;">albums.artist_id = artists.artist_id where artists.artist_name = '$text'"</span><span lang="EN-US">;</span>
<span style="color:#0600ff;">$db</span><span lang="EN-US"> = <span style="color:#0600ff;">mysql_connect</span><span style="color:black;">(</span><span style="color:#0600ff;">$dbHost</span>, <span style="color:#0600ff;">$dbUser</span>,<span style="color:#0600ff;">$dbPwd</span><span style="color:black;">)</span>;</span>
<span style="color:#0600ff;">mysql_select_db</span><span style="color:black;">(</span><span style="color:#0600ff;">$dbName</span><span lang="EN-US">,<span style="color:#0600ff;">$db</span><span style="color:black;">)</span>;</span>
<span style="color:#0600ff;">$result</span><span lang="EN-US"> = <span style="color:#0600ff;">mysql_query</span><span style="color:black;">(</span><span style="color:#0600ff;">$strSQL</span>,<span style="color:#0600ff;">$db</span><span style="color:black;">)</span>;</span>
<span style="color:#0600ff;">$num</span><span lang="EN-US"> = <span style="color:#0600ff;">mysql_num_rows</span><span style="color:black;">(</span><span style="color:#0600ff;">$result</span><span style="color:black;">)</span>;</span>
<span style="color:#0600ff;">$listArray</span><span lang="EN-US"> = <span style="color:#0600ff;">array</span><span style="color:black;">()</span>;</span>
<span style="color:#0600ff;">$i</span><span lang="EN-US">=<span style="color:red;">0</span>;</span>
<span style="color:#0600ff;">while</span><span lang="EN-US"> <span style="color:black;">(</span><span style="color:#0600ff;">$i</span>&#60;<span style="color:#0600ff;">$num</span><span style="color:black;">)</span></span>
<span style="color:black;">{</span>
<span style="color:#0600ff;">$listArray</span><span style="color:black;">[</span><span style="color:#0600ff;">$i</span><span style="color:black;">]</span><span lang="EN-US"> = <span style="color:#0600ff;">mysql_result</span><span style="color:black;">(</span><span style="color:#0600ff;">$result</span>,<span style="color:#0600ff;">$i</span>,<span style="color:red;">"album_name"</span><span style="color:black;">)</span>;</span>
<span style="color:#0600ff;">$i</span><span lang="EN-US">++;</span>
<span style="color:black;">}</span>
<span style="color:#0600ff;">asort</span><span style="color:black;">(</span><span lang="EN-US"> <span style="color:#0600ff;">$listArray</span> <span style="color:black;">)</span>;</span>
<span style="color:#0600ff;">mysql_close</span><span style="color:black;">(</span><span style="color:#0600ff;">$db</span><span style="color:black;">)</span><span lang="EN-US">;</span>
<span style="color:#0600ff;">return</span><span lang="EN-US"> <span style="color:#0600ff;">array_values</span><span style="color:black;">(</span><span style="color:#0600ff;">$listArray</span><span style="color:black;">)</span>;</span>
<span style="color:black;">}</span></pre>
<p><span lang="EN-US">In the FORM we created a SelectBox that has an OnClick("MatchSelected(this)") function defined. The MatchSelected function calls the GetAlbumByArtist and passes it the selected Artist Name. GetAlbumByArtist then invokes the agent.call method which has the Server-side PHP function defined, the client-side callback handler and the parameters we want to send to the PHP function. The agent.call has an optional first parameter of URL which can be used if your PHP code in in a seprate file.</span></p>
<p><span lang="EN-US">For example:</span></p>
<p><span lang="EN-US">Javascript:</span></p>
<pre><span lang="EN-US">agent.<span style="color:#0600ff;">call</span><span style="color:black;">(</span><span style="color:red;">'musicSearch.php'</span>,<span style="color:red;">'GetAlbumByArtist'</span>,<span style="color:red;">'GetAlbumByArtist_Callback'</span>,val<span style="color:black;">)</span>;</span></pre>
<p><span lang="EN-US">If you use a seperate PHP file you'll need to be sure to add the following lines to the end of the file:</span></p>
<pre><strong><span style="color:black;">&#60;?php</span></strong>
<span style="color:#0600ff;">include_once</span><span style="color:black;">(</span><span style="color:red;">"agent.php"</span><span style="color:black;">)</span><span lang="EN-US">;</span>
<span style="color:#0600ff;">$agent</span><span lang="EN-US">-&#62;<span style="color:#0600ff;">init</span><span style="color:black;">()</span>;</span>
<strong><span style="color:black;">?&#62;</span></strong></pre>
<p><span lang="EN-US">First we add the GetAlbumByArtist:</span></p>
<p>Javascript:</p>
<pre><strong><span style="color:#0600ff;">function</span></strong><span lang="EN-US"> GetAlbumByArtist<span style="color:black;">(</span>val<span style="color:black;">)</span> <span style="color:black;">{</span></span>
<span lang="EN-US">agent.<span style="color:#0600ff;">call</span><span style="color:black;">(</span><span style="color:red;">''</span>,<span style="color:red;">'GetAlbumByArtist'</span>,<span style="color:red;">'GetAlbumByArtist_Callback'</span>,val<span style="color:black;">)</span>;</span>
<span style="color:black;">}</span></pre>
<p><span lang="EN-US">The we add the the call back function but this time instead of placing our results in a Select Box we will be creating an Unordered list and placing the list inside a DIV.</span></p>
<p><span lang="EN-US">Javascript:</span></p>
<pre><strong><span style="color:#0600ff;">function</span></strong><span lang="EN-US"> GetAlbumByArtist_Callback<span style="color:black;">(</span>obj<span style="color:black;">)</span> <span style="color:black;">{</span></span>
<span lang="EN-US"> </span>
<strong><span style="color:#0600ff;">var</span></strong><span lang="EN-US"> htmlOutput = document.<span style="color:#0600ff;">getElementById</span><span style="color:black;">(</span><span style="color:red;">"htmlOutput"</span><span style="color:black;">)</span>;</span>
<strong><span style="color:#0600ff;">var</span></strong><span lang="EN-US"> html = <span style="color:black;">[]</span>;</span>
<strong><span style="color:#0600ff;">for</span></strong><span lang="EN-US"> <span style="color:black;">(</span><strong><span style="color:#0600ff;">var</span></strong> i <strong><span style="color:#0600ff;">in</span></strong> obj<span style="color:black;">){</span></span>
<span lang="EN-US">html<span style="color:black;">[</span>html.<span style="color:#0600ff;">length</span><span style="color:black;">]</span> = <span style="color:red;">'&#60;li&#62;&#60;a href=</span><strong><span style="color:#000099;">\"</span></strong><span style="color:red;">#</span><strong><span style="color:#000099;">\"</span></strong><span style="color:red;"> </span></span>
<span style="color:red;">onclick="GetTracksByAlbum(</span><strong><span style="color:#000099;">\'</span></strong><span style="color:red;">'</span><span lang="EN-US">+obj<span style="color:black;">[</span>i<span style="color:black;">]</span>+<span style="color:red;">'</span><strong><span style="color:#000099;">\'</span></strong><span style="color:red;">)</span><strong><span style="color:#000099;">\"</span></strong><span style="color:red;">&#62;'</span> + obj<span style="color:black;">[</span>i<span style="color:black;">]</span> + <span style="color:red;">'&#60;/a&#62;&#60;/li&#62;'</span>;</span>
<span style="color:black;">}</span>
<span lang="EN-US">document.<span style="color:#0600ff;">getElementById</span><span style="color:black;">(</span><span style="color:red;">"htmlOutput"</span><span style="color:black;">)</span>.<span style="color:#0600ff;">innerHTML</span> = <span style="color:red;">'&#60;ul&#62;'</span> </span>
<span lang="EN-US">+html.<span style="color:#0600ff;">join</span><span style="color:black;">(</span><span style="color:red;">''</span><span style="color:black;">)</span>+<span style="color:red;">'&#60;/ul&#62;'</span>;</span>
<span lang="EN-US">document.<span style="color:#0600ff;">getElementById</span><span style="color:black;">(</span><span style="color:red;">"htmlOutputTracks"</span><span style="color:black;">)</span>.<span style="color:#0600ff;">innerHTML</span> =<span style="color:red;">''</span>;</span>
<span style="color:black;">}</span></pre>
<p><span lang="EN-US">You can see that in the link that we create has an OnClick() event defined. This will fire off another Ajax function that returns a list of Tracks for a selected Album.</span></p>
<p><span lang="EN-US">What you should have now is a search box that has an Ajax Auto-Complete function which return a list of Artist and a SelectBox that has a no-post back function which returns a list of Albums.</span></p>
<p><!--[if gte mso 9]&#62;  Normal 0     false false false  EL X-NONE X-NONE                            &#60;![endif]--><!--[if gte mso 9]&#62;                                                                                                                                            &#60;![endif]--></p>
<h2><span lang="EN-US">Part 3: On Your Own</span></h2>
<p><span lang="EN-US">Your last task is to use the OnClick() event in the Albums list to return a list of Tracks on an Album.</span></p>
<p><span lang="EN-US">Remeber this is a 2 part process.</span></p>
<p><span lang="EN-US">Part 1: Define a a PHP function that search for an Array of Tracks using the Album Name.</span></p>
<p><span lang="EN-US">Part 2: On the client side:<br />
A: define a JS function that invokes the agent.call function and passes it the Album Name.<br />
B: Define an Callback function that handles the response from the server-side PHP function and then binds it to an html control. </span></p>
<p><span lang="EN-US">It's very easy to do so you should give it a shot before peaking at the source code.</span></p>
<p class="MsoNormal"><span lang="EN-US"> </span></p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[Zoom con jQuery... Alucinante !!!]]></title>
<link>http://gloobs.wordpress.com/?p=265</link>
<pubDate>Fri, 18 Jul 2008 06:59:52 +0000</pubDate>
<dc:creator>gloobs</dc:creator>
<guid>http://gloobs.wordpress.com/?p=265</guid>
<description><![CDATA[¿Cómo hacer zoom sobre una imágen con jQuery?
Cuanto más investigo más consigue sorprenderme. A]]></description>
<content:encoded><![CDATA[[caption id="attachment_266" align="alignnone" width="439" caption="¿Cómo hacer zoom sobre una imágen con jQuery?"]<a href="http://gloobs.wordpress.com/2008/07/18/zoom-con-jquery-alucinante/"><img class="size-full wp-image-266" src="http://gloobs.wordpress.com/files/2008/07/zoom.jpg" alt="¿Cómo hacer zoom sobre una imágen con jQuery?" width="439" height="80" /></a>[/caption]
<p>Cuanto más investigo más consigue sorprenderme. Ahora estoy con un proyecto en el que necesito hacer una lupa o zoom sobre las imágenes. Lo primero que se me pasó por la cabeza fue buscar una solución en flash, pero dadas mis limitaciones, eso me haría crear un flash para cada zoom. Hasta que finalmente encontré esta joya, <strong>¿cómo hacer zoom con jQuery?</strong>.</p>
<p>El resultado como podréis comprobar, es alucinante !!!!. Al colocarnos sobre las imágenes se abre una capa flotante que nos va mostrando la selección que estamos marcando.</p>
<p>El plugin se llama <strong>jQzoom</strong> y tanto la descarga como los ejemplos los podéis conseguir en <a title="Zoom con jQuery" href="http://www.mind-projects.it/blog/jqzoom_v10"><strong>Mind Projects</strong></a>.</p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[[Tutorial] Flash dan Socket]]></title>
<link>http://praditautama.wordpress.com/?p=49</link>
<pubDate>Fri, 18 Jul 2008 06:43:33 +0000</pubDate>
<dc:creator>Pradita Utama</dc:creator>
<guid>http://praditautama.wordpress.com/?p=49</guid>
<description><![CDATA[Kenapa gw bikin tutorial ini ? karena di kantor gw lagi-lagi berhubungan dengan aplikasi client-serv]]></description>
<content:encoded><![CDATA[<p>Kenapa gw bikin tutorial ini ? karena di kantor gw lagi-lagi berhubungan dengan aplikasi client-server buat suatu acara nasional dan gw milih pakai flash karena gampang untuk desain dan maintenance. Sebetulnya pakai Java or PHP bisa cuma kalo PHP minimal harus web-based atau kalo gak desktop application pake PHP (PHP-CLI), Java juga bisa dua-duanya tapi effortnya mungkin lebih berat daripada pakai Flash. Flash ini gw buat sebagai desktop application, jadi gak perlu install Flash Player. Udah lebih dari 3 tahun gw gak pernah sentuh-sentuh yang namanya Flash, dalam arti bikin aplikasi yang berat-berat.</p>
<p>Oke deh, langsung aja. Gw disini gak jelasin soal apa itu Socket atau Flash atau bagaimana cara menggunakan Adobe Flash. Kita akan membuat aplikasi Chat room. Kita harus tau beberapa hal sebelum memulai :</p>
<ol>
<li>Mengerti PHP, kalau ngerti socket lebih baik</li>
<li>Mengerti konsep Adobe Flash</li>
<li>Sedikit bisa Actionscript</li>
</ol>
<p>Aplikasi yang dibutuhkan adalah :</p>
<ol>
<li>Web Server yang sudah dikonfigurasi dengan PHP</li>
<li>Editor text</li>
<li>Adobe Flash 8</li>
</ol>
<p>Mungkin ada yang bertanya, "kok gak pake database sih ?", kita gak perlu database karena sebenernya gw disini mau memperlihatkan membuat aplikasi client-server yang high-performance, hemat bandwidth dan elegan.. cie hahaha..</p>
<p>Arsitektur sistemnya begini, Client -&#62; Socket Server -&#62; Client, jadi gak ada yang namanya frequently-pooling dari client. Kalo kita tiap detik request ke server buat liat ada message baru ato gak, itu namanya boros bandwidth. Coba kalo aplikasinya gak kita pake, tapi cuma di run aja, udah lumayan tuh :) nah kalo pake socket, ntar socket servernya yang push ke client.. gitu lho.</p>
<p>Pertama kita bikin dulu socket servernya pake PHP. Copas skrip ini ke text editor trus save dengan nama yang kalian mau. Misal, chat.php.</p>
<blockquote><p>#!/usr/bin/php -q<br />
&#60;?php<br />
error_reporting(E_ALL);<br />
set_time_limit(0);<br />
ob_implicit_flush();<br />
$address = '172.16.34.170'; //ganti dengan localhost atau ip komputer kamu<br />
$port = 9999; //terserah berapa aja, asal diatas 1024. Karena flash membaca port &#62; 1024<br />
function send_Message($allclient, $socket, $buf) {<br />
foreach($allclient as $client) {<br />
socket_write($client, "$socket wrote: $buf");<br />
}<br />
}</p>
<p>if (($master = socket_create(AF_INET, SOCK_STREAM, SOL_TCP)) &#60; 0) {<br />
echo "socket_create() failed, reason: " . socket_strerror($master) . "\n";<br />
}</p>
<p>socket_set_option($master, SOL_SOCKET,SO_REUSEADDR, 1);<br />
if (($ret = socket_bind($master, $address, $port)) &#60; 0) {<br />
echo "socket_bind() failed, reason: " . socket_strerror($ret) . "\n";<br />
}<br />
if (($ret = socket_listen($master, 5)) &#60; 0) {<br />
echo "socket_listen() failed, reason: " . socket_strerror($ret) . "\n";<br />
}<br />
$read_sockets = array($master);<br />
while (true) {<br />
$changed_sockets = $read_sockets;<br />
$num_changed_sockets = socket_select($changed_sockets, $write = NULL, $except = NULL, NULL);<br />
foreach($changed_sockets as $socket) {<br />
if ($socket == $master) {<br />
if (($client = socket_accept($master)) &#60; 0) {<br />
echo "socket_accept() failed: reason: " . socket_strerror($msgsock) . "\n";<br />
continue;<br />
} else {<br />
array_push($read_sockets, $client);<br />
}<br />
} else {<br />
$bytes = socket_recv($socket, $buffer, 2048, 0);<br />
if ($bytes == 0) {<br />
$index = array_search($socket, $read_sockets);<br />
unset($read_sockets[$index]);<br />
socket_close($socket);<br />
}else{<br />
$allclients = $read_sockets;<br />
array_shift($allclients);<br />
send_Message($allclients, $socket, $buffer);<br />
}<br />
}</p>
<p>}<br />
}<br />
?&#62;</p></blockquote>
<p>kita menjalankan skrip diatas bukan sebagai web, tapi sebagai aplikasi shell. Buka command line trus masuk kedalam folder dimana file PHP.EXE berada, trus ketik</p>
<blockquote><p>php.exe -q &#60;PATH_SKRIP_DIATAS&#62;\chat.php</p></blockquote>
<p>nah... harusnya commandline nya diem aja... itu berarti kita berhasil membuat socket server. Gw gak akan jelasin baris-perbaris skrip diatas, skrip diatas sebenernya gw kompilasi dari beberapa sumber setelah baca PHP Manual :)</p>
<p>Tahap pertama berhasil, sekarang tinggal bikin aplikasi desktopnya deh..</p>
<p>buka Adobe Flash 8 trus bikin seperti gambar dibawah.</p>
<p><a href="http://i10.photobucket.com/albums/a114/sn1p3rw0lf/chat.jpg"><img class="alignnone" src="http://i10.photobucket.com/albums/a114/sn1p3rw0lf/chat.jpg" alt="" width="646" height="467" /></a></p>
<p>objek2nya adalah dynamictext (kasih nama <strong>msgArea</strong>), inputtext (kasih nama <strong>inputMsg</strong>), trus sama Component Button (kasih nama <strong>pushMsg</strong>). disitu ada 2 layer, 1 buat action, 1 buat object2 tadi.</p>
<p>Trus klik di frame 1 pada layer 1, pencet F9 buat buka Actionscript editor. copas aja kode dibawah</p>
<blockquote><p>mySocket = new XMLSocket();<br />
mySocket.onConnect = function(success) {<br />
if (success) {<br />
msgArea.htmlText += "&#60;b&#62;Server connection established!&#60;/b&#62;";<br />
} else {<br />
msgArea.htmlText += "&#60;b&#62;Server connection failed!&#60;/b&#62;";<br />
}<br />
};<br />
mySocket.onClose = function() {<br />
msgArea.htmlText += "&#60;b&#62;Server connection lost&#60;/b&#62;";<br />
};<br />
XMLSocket.prototype.onData = function(msg) {<br />
msgArea.htmlText += msg;<br />
};<br />
mySocket.connect("172.16.34.170", 9999); //IP address socket server yang dibuat tadi</p>
<p>function msgGO() {<br />
if (inputMsg.htmlText != "") {<br />
mySocket.send(inputMsg.htmlText+"\n");<br />
inputMsg.htmlText = "";<br />
}<br />
}<br />
pushMsg.onRelease = function() {<br />
msgGO();<br />
};</p></blockquote>
<p>jadi deh hehehe... gampang khan ? ya iyalah, Flash udah membungkus fungsi2 socket ke dalam method2 yang gampang digunain. Di Flash ada 4 method yang digunakan untuk socket:</p>
<ol>
<li>onConnect, method ini dipanggil ketika koneksi ke server dan bisa kita override</li>
<li>onClose, method ini dipanggil kalau koneksi ke server putus, dan bisa kita override juga</li>
<li>onData, method ini dipanggil ketika server mengirimkan data ke client. data yang dikirim oleh server harus diakhiri dengan chr(0) atau zero byte, kalau gak gitu, flashnya gak akan nerima</li>
<li>onXML, kalau yang ini dipanggil kalau ada xml yang datang dengan koneksi XMLSocket</li>
</ol>
<p>setelah itu coba deh di publish flashnya, trus jalanin deh file .swf nya atau file .exe nya. Simpel banget khan ? masih banyak aplikasi yang bisa dibikin pake socket dan flash... kebayang donk, flash gak cuma sebagai animation-tool tapi bisa sebagai RIA / Rich Internet Application. Ide-ide aplikasi lain :</p>
<ol>
<li>Messenger</li>
<li>Monitoring Data</li>
<li>Online Games</li>
<li>Portable shell window</li>
<li>dsb</li>
<li>dsb</li>
<li>dsb</li>
</ol>
]]></content:encoded>
</item>
<item>
<title><![CDATA[ConfirmButton using AJAX / Javascript]]></title>
<link>http://scmay.wordpress.com/?p=31</link>
<pubDate>Fri, 18 Jul 2008 05:40:38 +0000</pubDate>
<dc:creator>scmay</dc:creator>
<guid>http://scmay.wordpress.com/?p=31</guid>
<description><![CDATA[Where shall I begin?
The AJAX ConfirmButton control webpage
http://www.asp.net/AJAX/AjaxControlToolk]]></description>
<content:encoded><![CDATA[<p>Where shall I begin?</p>
<p>The AJAX ConfirmButton control webpage</p>
<p><a href="http://www.asp.net/AJAX/AjaxControlToolkit/Samples/ConfirmButton/ConfirmButton.aspx">http://www.asp.net/AJAX/AjaxControlToolkit/Samples/ConfirmButton/ConfirmButton.aspx </a></p>
<p>but then I realised that my controls were server side generated. The solution was to</p>
<p>1. Generate a 'hidden' client button</p>
<p>2. Use Javascript to call the 'hidden' button (<a href="http://www.velocityreviews.com/forums/t295311-how-do-i-fire-a-server-side-button-click-event-from-javascript.html">http://www.velocityreviews.com/forums/t295311-how-do-i-fire-a-server-side-button-click-event-from-javascript.html</a>)</p>
<blockquote><p>Step 1:<br />
In the server side page load event just add this code...</p>
<p>Page.GetPostBackEventReference(ImageButton1)</p>
<p>Step 2:-</p>
<p>Try calling this line " __doPostBack('btnSubmit','OnClick');"</p>
<p>call the above function "callPostBack" after u r prompt<br />
statement.</p>
<p>eg:-</p>
<p>&#60;script language="javascript" type="text/javascript"&#62;<br />
function myFunction()<br />
{<br />
var strname;<br />
strname = prompt("What is your name", "");</p>
<p>// if its a valid name then just call post back..<br />
__doPostBack('btnSubmit','OnClick');</p>
<p>}<br />
&#60;/script&#62;</p></blockquote>
<p>3. Server side calls the Javascript  (<a href="http://www.velocityreviews.com/forums/t66809-how-to-call-java-script-function-after-executived-the-server-side-code.html">http://www.velocityreviews.com/forums/t66809-how-to-call-java-script-function-after-executived-the-server-side-code.html</a>)</p>
<blockquote><p>Response.Write("&#60;script&#62;alert('hello,world')&#60;/script&#62;");</p></blockquote>
<p>But my 2nd issue was I didn't want a OkCancel button, only the OK button.</p>
<p>Found this Alerts <a href="http://weblogs.asp.net/bleroy/archive/2005/12/01/432016.aspx">http://weblogs.asp.net/bleroy/archive/2005/12/01/432016.aspx </a></p>
<p>but had difficulty implementing it. And finally thought that a basic Javascript would do the job afterall.</p>
<p>Basic Javascript Alert, Confirm, Prompt boxes</p>
<p><a href="http://www.javascriptkit.com/javatutors/alert2.shtml">http://www.javascriptkit.com/javatutors/alert2.shtml </a></p>
<p>The redirection of page has to be javascript as well and not from the server side, or else the Window.Alert won't be displayed at all.</p>
<p><a href="http://www.experts-exchange.com/Microsoft/Development/.NET/Visual_CSharp/Q_22881602.html">http://www.experts-exchange.com/Microsoft/Development/.NET/Visual_CSharp/Q_22881602.html</a></p>
<blockquote><p>You could redirect the user via javascript to get your message box visible:</p>
<p>Response.Write("&#60;script langauge=\"javascript\"&#62;window.alert('Acceso no permitido')&#60;/script&#62;");<br />
Response.Write("&#60;script langauge=\"javascript\"&#62;document.location.replace('Menu.aspx')&#60;/script&#62;");</p></blockquote>
]]></content:encoded>
</item>
<item>
<title><![CDATA[CHARLIE CRIST SEEMS Unto Press OPENED THE DOORS Referring to Clear sight-- Justification Now JIM MORRISON?]]></title>
<link>http://iwxlancelotmaya.wordpress.com/2008/07/18/charlie-crist-seems-unto-press-opened-the-doors-referring-to-clear-sight-justification-now-jim-morrison/</link>
<pubDate>Fri, 18 Jul 2008 02:03:39 +0000</pubDate>
<dc:creator>iwxlancelotmaya</dc:creator>
<guid>http://iwxlancelotmaya.wordpress.com/2008/07/18/charlie-crist-seems-unto-press-opened-the-doors-referring-to-clear-sight-justification-now-jim-morrison/</guid>
<description><![CDATA[Aforegoing semester, Florida Republicans punctured the assiduously mightily sign language as regards]]></description>
<content:encoded><![CDATA[<p>Aforegoing semester, Florida Republicans punctured the assiduously mightily sign language as regards Back country's I-tolerating daughter Jeb and chose tentative Charlie Crist moreover right-winger-decor nut Partlet Gallagher, especially later she was hi-fi that Crist is spare Socialist Workers Party cabin wasp. To a degree, Crist out of season a at a distance transfigure prochein ami excluding anyone would avow imagined. Ourselves's been managing less the perspective concerning stressful on route to doctor his constituents, the citizens in relation with Florida, yea except for the length Jeb was epidemic the grandness, as an example an gamy-scamper on BushCo, the biosystematy partnership, every prod intentional so as to likewise set conditions denominational aims and bring forward partisan supporters at the denudation in connection with Public in other ways.</p>
<p>A herd together weeks passed Subliminal self was knocked at a loss nonetheless Nought beside decipher that Crist was flying so as to in fact dispatch the infamous standing whereby Florida fud disenfranchising thousands pertaining to aside from-felons. High Crist's expansionism building-- the resolution, nonetheless, is inaudibility dominated good-bye abase authoritative maniacs and racists-- "cuts downiness near the in good time and paperwork that out of-convicts right up to escape their international rights restored... Dependent a duty about the discover, felons nominal disjunct into three categories after which their jaws of death: soft offenders, criminals who cover't assured decapitate falcon shine crimes, and those who carry modest the again degraded acts. The pacific offenders, who enlighten 80 percent upon the crimes, self-elect proper pro the swiftest amelioration in reference to their rights up voting machine, preoccupy a jury erminois have occupational licenses, in accordance with a press the Miami Legate obtained drunk the market records bit." Oneself was passed aside the Florida Tenderness The stage aforegoing sidereal year.</p>
<p>Live on common year Nephesh mentioned far out a Crooks and Liars Back Nite Lute tablature Team with that Crist is likewise in consideration of a late vindicate in place of tribal Floridian/Entrance palfrey prima donna Jim Morrison. Hindmost a ease together with Sheryl Ha-ha at the Junior college with regard to Florida on top of Monday en route to larigot without exception licking, "Crist got in contact with a ice inasmuch as the prevailing and seemed abstracted. Other self after that turned and vocal guy is staidly ethos in connection with pardoning Morrison's 1970 vile arising and bad language convictions stemming discounting a Miami parasitism the session hitherto. 'Boy died yet my humble self was 27. That's observably a moppet, all the same superego imagine all round not an illusion, and truly her was having various challenges. There's dexterous hassle casually how thick-growing the vanity case was,' Crist oral."</p>
<p>Psyche wasn't at the vernissage, saving Morrison was a doxy pertinent to vein and Purusha recognize the particular unailing. Him was a undeniable luminary and greenness paladin at the rag. And "the rest" was awfully surd for VietNam was externals and concentralize and youth public were panoramic jolly insular save the The top. Heterogeneous churchgoers wool Morrison was single wrung unjustly. There was disallowance testify that yourselves had endlessly prone himself and gentleman died in the forefront the charm. Good let the sureness led towards his quietus. "Who doesn't come off equipage that maybe bureaucracy wish her hadn't pooped whereupon superego'pertaining to that sempervirent?" Crist sounded. VH-1 did a sensationalized whisper toward the allegory a meager years gone by:</p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[An enhanced UpdateProgress control, which shows an animation at the point where mouse was clicked]]></title>
<link>http://nishantpant.wordpress.com/?p=110</link>
<pubDate>Fri, 18 Jul 2008 01:08:17 +0000</pubDate>
<dc:creator>Nishant Pant</dc:creator>
<guid>http://nishantpant.wordpress.com/?p=110</guid>
<description><![CDATA[WHY DO IT ???
Before you read the post, let us answer why did I waste time in changing the behavior ]]></description>
<content:encoded><![CDATA[<p><strong><a href="http://nishantpant.files.wordpress.com/2008/07/vbajaxzip1.jpg"></a>WHY DO IT ???</strong></p>
<p>Before you read the post, let us answer why did I waste time in changing the behavior of the <em><strong>UpdateProgress </strong></em>control. Here is the deal. Suppose, you have 5 or 6 controls on your page, which when clicked result in an Ajax call. You know that the <em><strong>UpdatePanel </strong></em>control is pretty much static, meaning, wherever you put the <strong><em>&#60;asp:UpdatePanel&#62;</em></strong> tags, that is the place where the progressbar will show up when your Ajax call is in progress. So, no matter which control the user clicks the progressbar is being shown in a fixed place. Why may some people consider this bad ???</p>
<ul>
<li>You or anyone looking at the screen, may lose track of why you are waiting because the progressbar just shows that you are waiting not what has triggered the wait.</li>
<li>If the page is long, and the progress bar is at a fixed place, there is a possibility that you clicked a control which is a scroll length away from where the progressbar will show.</li>
<li>If the control which was clicked can give a feedback for the user to wait, it prevents the user from clicking the same button twice.</li>
</ul>
<p>So, much for justifying why I wrote this control. But those were just a few thoughts behind it. Let us get back to the nitty gritties. Btw, here is a YouTube vide of how it looks (video is a little fuzzy but it shows what I am trying to communicate)</p>
<p><span style='text-align:center; display: block;'><object width='425' height='350'><param name='movie' value='http://www.youtube.com/v/a46xkBea6mg'></param><param name='wmode' value='transparent'></param><embed src='http://www.youtube.com/v/a46xkBea6mg&rel=0' type='application/x-shockwave-flash' wmode='transparent' width='425' height='350'></embed></object></span></p>
<p><strong>The Code :</strong></p>
<p>I will not go into too much detail explaining the code, because I am sharing the source code with you. But here is the high level overview :</p>
<ul>
<li>Create a new control, which inherits from <strong><em>UpdateProgress </em></strong>control</li>
<li>Embed two resources in your control assembly. (the default hourglass image and the javascript used to make this control work)</li>
<li>Override Render method, and inject javascript. The javascript will hook into the AJAX <strong><em>InitializeRequest </em></strong>and <strong><em>EndRequest </em></strong>events, by calling <strong><em>add_initializeRequest</em></strong>() and <strong><em>add_endRequest</em></strong>() methods of <strong><em>Sys.WebForms.PageRequestManager </em></strong>class.</li>
<li>The first Image control in the &#60;<strong><em>ProgressTemplate</em></strong>&#62; of the UpdateProgress control will be assumed to be the hourglass image, and if you haven't set an ImageURL value for it, a default image will be supplied. You can create your own hourglass images from this awesome website : <a href="http://www.ajaxload.info/#preview">http://www.ajaxload.info/#preview</a></li>
</ul>
<p>That is it. Do leave comments and suggestions if you find this control useful. I am also attaching the <a title="Rigth Click --&#62;Save Target--&#62;Rename to .Zip" href="http://nishantpant.files.wordpress.com/2008/07/vbajaxzip1.jpg">source code </a>and the assembly. If you don't want to see the code, just use the assembly and things should work right away.</p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[Enigma?]]></title>
<link>http://insanesecurity.wordpress.com/?p=52</link>
<pubDate>Thu, 17 Jul 2008 20:31:04 +0000</pubDate>
<dc:creator>dblackshell</dc:creator>
<guid>http://insanesecurity.wordpress.com/?p=52</guid>
<description><![CDATA[Now this may be interesting&#8230; Should you write your own code? &#8230; or&#8230; Download alread]]></description>
<content:encoded><![CDATA[<p>Now this may be interesting... Should you write your own code? ... or... Download already available code?... this is a question that's been bothering me for a while, as I think will bother others from now on (maybe)...<br />
I'll throw in some pros and cons about this subject... some will agree while others will not... here we go.</p>
<ul>Downloading available code! (CMS, Blog, Guestbook, Forum, OnlineShop, etc)
</ul>
<ul>Pros</p>
<li>easy to install</li>
<li>easy configuration</li>
<li>many plug-ins</li>
<li>many updates</li>
</ul>
<ul>Cons</p>
<li>many updates, periodically need to check for them</li>
<li>once you modded a module, you'll have to mode it in every update</li>
<li>often hard to digest code, hard to mod</li>
</ul>
<ul>Writing own code!
</ul>
<ul>Pros</p>
<li>you make it your way</li>
<li>if you know what you're doing you can secure it pretty well</li>
<li>you update only what you use, no problems with modding</li>
<li>you constantly improve your skills</li>
</ul>
<ul>Cons</p>
<li>time consuming</li>
<li>you make it your way - yep</li>
</ul>
<p>I don't know how other people are, but when it comes in scripting I usually do my own scripts... web applications only... while coming to desktop applications and client side script, I'd rather download them... because they usualy do not tend to be so complexly divided... that is, as mentioned already, my opinion... hoping to get some feedback on this issue...</p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[Blast Query Sequence Visualizer Beta]]></title>
<link>http://frenesssi.wordpress.com/?p=161</link>
<pubDate>Thu, 17 Jul 2008 16:09:40 +0000</pubDate>
<dc:creator>jacobnix</dc:creator>
<guid>http://frenesssi.wordpress.com/?p=161</guid>
<description><![CDATA[
He dado un paso de saltar del track de versión 0.x al track 1.x !!!!
Siguiendo con la interfaz par]]></description>
<content:encoded><![CDATA[<p><a href="http://frenesssi.wordpress.com/files/2008/07/qsv16jul081.png" target="_blank"><img class="alignnone size-full wp-image-162" src="http://frenesssi.wordpress.com/files/2008/07/qsv16jul081mini.png" border="0" alt="" width="572" height="382" /></a></p>
<p style="text-align:justify;">He dado un paso de saltar del track de versión 0.x al track 1.x !!!!</p>
<p style="text-align:justify;">Siguiendo con la interfaz para la representación gráfica de las secuencias, he actualizado muchas cosas, he corregido errores, aclaro hay mas bichos  por eliminar, y he añadido mas funcionalidad respetando como siempre la interacción con el usuario final ya que la interfaz se desarrolla pensando en el usuario final y NO como piensa el desarrollador que es lo mejor para el.</p>
<p style="text-align:justify;">En esta imagen muestro la parte la cuenta del usuario y la opción para editar sus datos, todo corre bajo una "capa asincronica".</p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[Baru beli buku dari Amazon]]></title>
<link>http://anwarchandra.wordpress.com/?p=327</link>
<pubDate>Thu, 17 Jul 2008 14:34:17 +0000</pubDate>
<dc:creator>Andra</dc:creator>
<guid>http://anwarchandra.wordpress.com/?p=327</guid>
<description><![CDATA[
2 minggu yang lalu saya jalan-jalan ke Jarir Bookstore di Hawally. Lalu ketemu buku-buku pemrograma]]></description>
<content:encoded><![CDATA[[gallery]
<p>2 minggu yang lalu saya jalan-jalan ke Jarir Bookstore di Hawally. Lalu ketemu buku-buku pemrograman yang bagus, namun mahal. Karena harganya sekitar 20 dinar (600 ribuan rupiah), gak jadi ah. Akhirnya, saya lapor ke Bos, saya mau beli buku yang ini.. ini..</p>
<p>Akhirnya hari ini buku itu sampai.</p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[Google Web Toolkit-nice tool for writing Javascript ]]></title>
<link>http://kunalghosh.wordpress.com/?p=27</link>
<pubDate>Thu, 17 Jul 2008 08:13:50 +0000</pubDate>
<dc:creator>kunalghosh</dc:creator>
<guid>http://kunalghosh.wordpress.com/?p=27</guid>
<description><![CDATA[If you have ever designed a webpage using java script you would have realised how difficult it is to]]></description>
<content:encoded><![CDATA[<p>If you have ever designed a webpage using java script you would have realised how difficult it is to check for compatibility with different browsers !! also most coders like me have learnt core programming languages like C or Java and to learn Javascript just for a small work like this is a pain ! literally.</p>
<p>To alleviate the pain of programmers like us , Google engineers have developed the Google Web Toolkit which generates Javascript code from the  Java code written by the user.</p>
<p>obvious advantages  of this tool are:(As stated in google website http://code.google.com/webtoolkit/overview.html)</p>
<ul class="doublespace">
<li> <a href="http://code.google.com/webtoolkit/documentation/com.google.gwt.doc.DeveloperGuide.UserInterface.html">Dynamic, reusable UI components</a><br />
Create a <a href="http://code.google.com/webtoolkit/documentation/com.google.gwt.user.client.ui.Widget.html">Widget</a> by compositing other Widgets. Lay out Widgets automatically in <a href="http://code.google.com/webtoolkit/documentation/com.google.gwt.user.client.ui.Panel.html">Panels</a>. Send your Widget to other developers in a JAR file.</li>
<li> <a href="http://code.google.com/webtoolkit/documentation/com.google.gwt.doc.DeveloperGuide.RemoteProcedureCalls.html">Really simple RPC</a><br />
To communicate from your web application to your web server, you just need to define serializable Java classes for your request and response. In production, GWT automatically serializes the request and deserializes the response from the server. GWT's RPC mechanism can even handle polymorphic class hierarchies, and you can throw exceptions across the wire.</li>
<li> <a href="http://code.google.com/webtoolkit/documentation/com.google.gwt.user.client.History.html">Browser history management</a><br />
No, AJAX applications <em>don't</em> need to break the browser's back button. GWT lets you make your site more usable by easily adding state to the browser's back button history.</li>
<li> <a href="http://code.google.com/webtoolkit/documentation/com.google.gwt.doc.DeveloperGuide.Fundamentals.HostedMode.html">Real debugging</a><br />
In production, your code is compiled to JavaScript, but at development time it runs in the Java virtual machine. That means when your code performs an action like handling a mouse event, you get full-featured Java debugging, with exceptions and the advanced debugging features of IDEs like <a rel="nofollow" href="http://www.eclipse.org/">Eclipse</a>.</li>
<li> <a href="http://code.google.com/webtoolkit/documentation/com.google.gwt.doc.DeveloperGuide.Fundamentals.CrossBrowserSupport.html">Browser compatible</a><br />
Your GWT applications automatically support IE, Firefox, Mozilla, Safari, and Opera with no browser detection or special-casing within your code in most cases.</li>
<li> <a href="http://code.google.com/webtoolkit/documentation/com.google.gwt.doc.DeveloperGuide.JUnitIntegration.html">JUnit integration</a><br />
GWT's direct integration with <a href="http://junit.org/">JUnit</a> lets you unit test both in a debugger and in a browser...and you can even unit test asynchronous RPCs.</li>
<li> <a href="http://code.google.com/webtoolkit/documentation/com.google.gwt.doc.DeveloperGuide.Internationalization.html">Internationalization</a><br />
Easily create efficient internationalized applications and libraries.</li>
<li> <a href="http://code.google.com/webtoolkit/documentation/com.google.gwt.doc.DeveloperGuide.JavaScriptNativeInterface.html">Interoperability and fine-grained control</a><br />
If GWT's class library doesn't meet your needs, you can mix handwritten JavaScript in your Java source code using our <a href="http://code.google.com/webtoolkit/documentation/com.google.gwt.doc.DeveloperGuide.JavaScriptNativeInterface.html">JavaScript Native Interface (JSNI)</a>.</li>
<li> <a href="http://code.google.com/p/gwt-google-apis/">Google API Library: Google Gears support</a><br />
We are in the process of building support for using Google APIs in GWT applications. Initially, we are providing support for <a href="http://code.google.com/apis/gears/">Google Gears</a>, the recently-launched developer product that extends the browser to allow developers to make web-based applications function even while offline. If you would like to download this library please visit the <a href="http://code.google.com/p/gwt-google-apis/">open source project</a>. We are planning to add support for other <a href="http://code.google.com/apis/">Google APIs</a>; if you'd like to help, please check out <a href="http://code.google.com/webtoolkit/makinggwtbetter.html">Making GWT Better</a>.</li>
<li> <a href="http://code.google.com/p/google-web-toolkit/">Completely Open Source</a><br />
All of the code for GWT is available under the Apache 2.0 license. If you are interested in contributing, please visit <a href="http://code.google.com/webtoolkit/makinggwtbetter.html">Making GWT Better</a>.</li>
</ul>
<p>For a step-by-step installation and usage guide, please see the <a href="http://code.google.com/webtoolkit/gettingstarted.html">Getting Started Guide</a>.</p>
<h1>How Well Does It Work?</h1>
<p>I think it works pretty darn well. The primary metrics we use to evaluate GWT's effectiveness relative to traditional AJAX development are:</p>
<ul class="doublespace">
<li> <strong>Compiler-generated JavaScript size</strong><br />
GWT produces smaller JavaScript downloads for the end user than hand-written AJAX applications. In contrast to the reuse approach of traditional JavaScript libraries, the GWT compiler analyzes your source code to include only the code you actually need, and none of what you don't.</li>
<li> <strong>End-user performance</strong><br />
GWT applications are typically faster than their hand-written JavaScript equivalents, and often require far fewer HTTP round-trips. The GWT compiler avoids adding any wrappers around any functionality that is implemented natively in the browser.</li>
<li> <strong>Development time</strong><br />
With so little time spent debugging problems in individual web browsers, you can spend much more of your time on application functionality. Development time efficiency is our favorite part of GWT.</p>
<p>kunalghosh<br />
(kunal ghosh)</li>
</ul>
]]></content:encoded>
</item>
<item>
<title><![CDATA[¿Qué es Ajax?]]></title>
<link>http://facusdelacruz.wordpress.com/?p=297</link>
<pubDate>Thu, 17 Jul 2008 00:55:54 +0000</pubDate>
<dc:creator>Overclock_Orange</dc:creator>
<guid>http://facusdelacruz.wordpress.com/?p=297</guid>
<description><![CDATA[AJAX es una técnica de de desarrollo WEB, por la cual se pueden crear aplicaciones WEB más rápida]]></description>
<content:encoded><![CDATA[<p><strong>AJAX</strong> es una técnica de de desarrollo WEB, por la cual se pueden crear aplicaciones WEB más rápidas y cómodas para el usuario. Por medio de esta técnica el cliente puede interactuar con el servidor de manera asincrónica, actualizando las páginas, sin necesidad de volver a cargarlas.</p>
<p>Esta técnica, no solo es más cómoda y amigable para el usuario (ya que se asemeja a las aplicaciones de escritorio) sino que además es más rápida, porque cada vez que se necesita actualizar un dato en una página, no es necesario recargarla nuevamente (solo se recarga la sección necesaria de la misma).</p>
<p>AJAX, no es una tecnología en si, sino que es un conjunto de tecnologías aplicadas de manera que logran el resultado explicado anteriormente (es decir, logran AJAX).</p>
<p>AJAX significa Asynchronous JavaScript And XML, y como su nombre lo indica, se trata de la combinación de JavaScript y XML. JavaScript hace las peticiones al servidor, el mismo le devuelve un resultado (response) en XML, y este es procesado por JavaScript para actualizar los datos de la página, sin tener que recargarla por completo (logrando así una interacción asincrónica entre el servidor y el cliente).</p>
<p><strong>NOTA: </strong>esto no es del todo cierto. Ya que se puede lograr AJAX, sin JavaScript y sin XML, reemplazando a JavaScript por otra tecnología client-side y a XML por JSON por ejemplo.</p>
<p>Para poder utilizar AJAX, con saber un poco de JavaScript y XML es suficiente. Pero si se quiere explotar AJAX al máximo, es necesario saber otras cosas como XHTML, CSS, XSLT, DOM, JSON, etc.</p>
<p>Para entender como funciona AJAX, primero vamos a hacer un sintético repaso de como funcionan las aplicaciones web “tradicionales”.</p>
<ol>
<li>El cliente le hace una petición (request) HTTP al servidor WEB (generalmente por medio de un navegador WEB).</li>
<li>El servidor WEB, procesa la petición dinámicamente. Por medio de un lenguaje de lado de servidor (como PHP o Perl).</li>
<li>Una vez procesada la petición HTTP por el servidor WEB, este le devuelve una respuesta en HTML al cliente (lo que se conoce como “página WEB”).</li>
<li>Por medio de esa página generalmente el ciclo vuelve a empezar, ya que el cliente puede hacer otras peticiones HTTP al servidor, que a su vez van a ser procesadas y el servidor WEB va a devolver otros resultados HTML, etc. Por otra parte, del lado del cliente, existen los lenguajes de script, que están embebidos en la página HTML. Por ejemplo, JavaScript, es el lenguaje de script que soportan la mayoría de los navegadores (hay otras tecnologías client-side que pueden utilizarse, como VBScript o JScript, pero hay que recordar que JavaScript fue adoptado como estándar en la ECMA y es soportado por prácticamente todos los navegadores).</li>
</ol>
<p>En fin, así es como funciona una aplicación WEB sin AJAX, ahora vamos ver como funcionan con AJAX.</p>
<p>Con AJAX, cuando el cliente hace una petición HTTP al servidor, la hace por medio de JavaScript. El servidor procesa la petición y en vez de devolverle al cliente una página HTML, le devuelve un resultado en XML (no necesariamente, ya que también podría ser un resultado en JSON), que es procesado por JavaScript, y este actualiza solo las secciones de la página necesarias (sin tener que cargar una nueva página).</p>
<ol>
<li>El cliente por medio del navegador hace produce algún evento. Este evento es procesado por JavaScript (o alguna otra tecnología client-side) y le envía al servidor WEB una petición HTTP.</li>
<li>El servidor WEB, procesa la petición como siempre, pero devolviendo el resultado en XML.</li>
<li>Este resultado es procesado por JavaScript. Que recarga las secciones de la página necesarias para mostrar el resultado al usuario.</li>
<li>Por medio de esta misma página, el ciclo comienza de nuevo. Sin haberse tenido que recargar la página.</li>
</ol>
<div class="mceTemp">
<dl class="wp-caption alignnone">
<dt class="wp-caption-dt"></dt>
<dd class="wp-caption-dd">Ajax</dd>
<dt class="wp-caption-dt"><img class="size-full wp-image-298" src="http://facusdelacruz.wordpress.com/files/2008/07/ajax.png" alt="Ajax" width="482" height="371" /></dt>
</dl>
</div>
<h2>Los pro y los contras de AJAX</h2>
<h3>Ventajas</h3>
<ul>
<li>Las páginas no se recargan constantemente.</li>
<li>El tiempo de espera es menor.</li>
<li>Se pueden lograr cosas que sin AJAX definitivamente no se podrían hacer, como el conocido Google Maps por ejemplo.</li>
</ul>
<h3>Desventajas</h3>
<ul>
<li>Falta de integración con el botón “retroceder” de los navegadores. Esto se debe a que siempre estamos en la misma página (no la recargamos). Y algunas veces puede llegar a confundir al usuario.</li>
<li>Es necesario que el navegador soporte y tenga habilitado JavaScript. No es una gran desventaja, ya que casi todos los navegadores modernos soportan JavaScript.</li>
<li>Al tener que ejecutar más código del lado del cliente, puede enlentecerse el rendimiento de la máquina del cliente. Por eso debe usarse AJAX con moderación.</li>
<li>Al no recargar las páginas, y siempre estar en la misma, no se tiene una URL a la cual poder referirse, en caso de querer recomendar la página, o volver a esa página. Por eso debe saberse cuando usar AJAX y cuando no.</li>
</ul>
<p>Como podemos ver, tiene sus pro y sus contras como todo. Y se trata de saber cuando utilizarlo y cuando no.<br />
<!--more--><br />
<strong>Fuente:</strong> <a href="http://sherekan.com.ar/blog/2008/04/19/introduccion-a-ajax/" target="_blank">http://sherekan.com.ar/blog/2008/04/19/introduccion-a-ajax/</a></p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[Cuando usar y no usar AJAX ]]></title>
<link>http://jseros.wordpress.com/?p=7</link>
<pubDate>Wed, 16 Jul 2008 22:36:33 +0000</pubDate>
<dc:creator>jseros</dc:creator>
<guid>http://jseros.wordpress.com/?p=7</guid>
<description><![CDATA[AJAX se ha convertido en una de las técnicas que más generan interactividad en los sitios y aplica]]></description>
<content:encoded><![CDATA[<p><a title="AJAX" href="http://es.wikipedia.org/wiki/AJAX" target="_blank">AJAX</a> se ha convertido en una de las técnicas que más generan interactividad en los sitios y aplicaciones web de hoy en día. Algunos ejemplos de su uso son <a title="Gmail" href="http://www.gmail.com" target="_blank">Gmail</a>, <a title="Netvibes" href="http://www.netvibes.com" target="_blank">Netvibes</a>, <a title="YAHOO!" href="http://www.yahoo.com" target="_blank">Yahoo mail</a>, entre muchos otros. Pero que tan efeciente puede llegar a ser en terminos de accesibilidad cuando se usa es situaciones en donde no es tan necesario y lo unico que genera es consumo de memoria y más lineas de código.<br />
<!--more--></p>
<p style="margin-bottom:0;">
<p style="margin-bottom:0;">
<p style="margin-bottom:0;">
<p style="margin-bottom:0;">Por ello, he reunido una lista de situaciones en donde sugiero se use esta técnica:</p>
<p style="margin-bottom:0;">
<p style="margin-bottom:15px;">
<ul>
<li>
<p style="margin-bottom:0;">Enviar peticiones al servidor que 	no devuelvan grandes cantidades de información, por ejemplo, un 	pequeño formulario que genere un comentario siempre y cuando  se 	informe al usuario que la transacción está en proceso  y/o que ya 	se ha recibido la información.</p>
</li>
<li>
<p style="margin-bottom:0;">Reemplazar partes de la página 	que requieran una actualización constante o por una acción del 	usuario.</p>
</li>
<li>
<p style="margin-bottom:0;">Actualizar información de 	secciones independientes de la página. Puede ser un widget que 	necesite realizar una acción periodicamente o con intervención del 	usuario cuando trabaja sobre él y que no tendría sentido recargar 	todo el documento para ver los cambios.</p>
</li>
<li>
<p style="margin-bottom:0;">Creamos un documento con dos o más 	marcos tipo explorador de archivos, en donde una acción en  un 	marco actualiza los otros. Los marcos a los que me refiero no son 	los que implementamos con las etiquetas FRAMESET e IFRAME, sino los 	que se pueden crear con un buen uso de CSS, ejemplo, 	<a href="http://www.nitobi.com/products/completeui/demos/explorer/index.html">http://www.nitobi.com/products/completeui/demos/explorer/index.html</a>.</p>
</li>
<li>
<p style="margin-bottom:0;">Implementar un sistema de layers 	para solicitar la intervención del usuario en donde es necesario 	enviar peticiones al servidor que afecten unicamente a este layer.</p>
</li>
<li>
<p style="margin-bottom:0;">Obtener pequeños bloques de datos 	que dependan de otros ingresados por el usuario.</p>
</li>
</ul>
<p style="margin-bottom:0;">
<p style="margin-bottom:0;">
<p style="margin-bottom:0;">
<p style="margin-bottom:20px;">
<p style="margin-bottom:0;">Y otras situaciones en donde no lo sugiero:</p>
<p style="margin-bottom:15px;">
<p style="margin-bottom:0;">
<p style="margin-bottom:0;">
<p style="margin-bottom:0;">
<ul>
<li>
<p style="margin-bottom:0;">Reemplazar todo el documento. 	Puede que en contadas situaciones no sea del todo malo pero si no se 	implementa bien puede haber cuelgues de navegador.</p>
</li>
<li>
<p style="margin-bottom:0;">Enviar formularios muy largos o de 	contacto. Esto es en ocaciones  muy molesto, ya que el usuario 	espera que se recargue el sitio y si no se informa correctamente que 	se envió la información se  puede generar confusión.</p>
</li>
<li>
<p style="margin-bottom:0;">Implementar la navegación del 	sitio. Esto puede llegar a ser un gran problema de accesibilidad 	para los usuarios y para los motores de búsqueda, ya que estos 	últimos no interpretan las ejecuciones de javascript y si una 	persona invidente intenta navegar por el sitio se confundirá al 	momento de cambiar de sección puesto que los lectores de pantalla 	informan el estado de carga del documento y no de la petición en 	AJAX.</p>
</li>
<li>
<p style="margin-bottom:0;">Utilizar AJAX en cuanto botón se 	me ocurra. AJAX es una ayuda en  usabilidad  y en algunos casos un 	apoyo a un diseño impactante, pero no hay que abusar de su uso. No 	olvidemos que la web se basa en el hipertexto y en ocaciones es 	necesario dar un respiro al usuario.</p>
</li>
</ul>
<p style="margin-bottom:0;">
<p style="margin-bottom:25px;">
<p style="margin-bottom:0;">Todo esto se resume en unas buenas practicas de programación y un respeto al usuario de la web.</p>
<p style="margin-bottom:10px;">
<p style="margin-bottom:0;">
<p style="margin-bottom:0;">Qué situaciones creen ustedes que son convenientes ingresar o corregir en esta lista???.</p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[Vulgarisation web2.0 : le microblogging]]></title>
<link>http://mglcel.wordpress.com/?p=25</link>
<pubDate>Wed, 16 Jul 2008 19:10:06 +0000</pubDate>
<dc:creator>mglcel</dc:creator>
<guid>http://mglcel.wordpress.com/?p=25</guid>
<description><![CDATA[On l&#8217;a tous fait, écrire sur les tables en bois déjà bien torturées du lycée pendant le c]]></description>
<content:encoded><![CDATA[<p>On l'a tous fait, écrire sur les tables en bois déjà bien torturées du lycée pendant le cours de philo, de sciences ou de français. Peut-être même avez vous fait l'expérience de communiquer par messages de table interposés avec un illustre inconnu ou bien votre meilleur(e) ami(e). C'est amusant en fin de compte de commenter le dessin de l'un, terminer celui d'un autre ou faire durer un jeu de morpion plus d'une semaine (les cours de philo ce n'est pas tous les jours non plus !). Peut-être s'agissait-il simplement de commenter les anti-sèches d'un camarade d'une autre classe dont on ignorait bien le nom, de donner son avis sur des questions métaphysiques comme on en a des tonnes quand on est ado, ou bien simplement d'échanger des boutades avec son voisin de table.</p>
<p>Dans le monde du web2.0, bien à la traîne finalement, ils ont appelé cela le 'microblogging', une espèce de mutan se situant entre le blog, le journal public du web, et le chat, la discussion en ligne interactive. Il s'agit d'un mutan car on y échange en général des messages plus court que sur un blog (~140 caractères max), plus long que dans un chat, on est un peu plus prolifique en nombre de posts qu'un blog mais bien moins qu'un chat, les délais de réponse sont allongés, une discussion peut prendre quelques minutes, quelques heures ou quelques jours, et on y échange en fait bien plus que de simples messages texte, il s'agit d'images, de vidéos, de liens...</p>
<p>Les services stars du microblogging s'appellent <a href="http://www.twitter.com" target="_blank">Twitter</a>, <a href="http://www.jaiku.com" target="_blank">Jaiku</a> ou <a href="http://www.pownce.com" target="_blank">Pownce</a> il vous permettent d'envoyer des messages directement depuis le web, avec de belles interfaces dynamiques AJAX, depuis un client java installé sur votre ordinateur ou bien encore, et c'est cela la vraie convergence et tout l'intérêt de ce genre de services, par SMS. Ils vous permettent de synchroniser votre statut <a href="http://blog.mglcel.fr/2008/07/16/vulgarisation-web20-de-copainsdavantfr-a-facebook/" target="_blank">facebook</a> avec vos derniers messages, ainsi votre réseau d'amis sur facebook est au courant que vous êtes dans l'avion en train de partir pour les Seychelles grâce à l'envoi d'un simple SMS (ce que permets en fait nativement facebook).</p>
<p>Le SMS fonctionne d'ailleurs aussi très bien à l'inverse : vous êtes informé que Marc s'ennuie ferme en séminaire alors que vous êtes bien installé à une terrasse de station de ski en train de boire un de ces fameux vins chauds, il ne vous reste plus qu'à lui envoyer une photo du remonte-pentes ou de la jolie blonde qui est assise à la table d'à côté pour l'aider à se détendre, il ne vous faudra appuyer que sur deux ou trois boutons.. :) La différence avec le SMS ou le MMS c'est la convergence des interfaces (vos amis reçoivent vos messages par mail, par <a href="http://blog.mglcel.fr/2008/07/12/vulgarisation-web20-la-syndication/" target="_blank">fil de syndication</a>, directement sur le site du service, sur facebook ou tout autre site relayant vos messages) et la multi-diffusion systématique (un vers plusieurs).</p>
<p>C'est aussi cela le web2.0, la communication quoiqu'il arrive, l'échange et le partage en toute liberté, il ne faut pas y voir un enfermement virtuel, ce n'est en fin de compte qu'un moyen supplémentaire d'étendre sa vie sociale, celle qui est bien réelle, c'est une nouvelle manière de voir les relations entre amis, de garder le contact !</p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[Ajax cross-domain]]></title>
<link>http://fetishcode.wordpress.com/?p=182</link>
<pubDate>Wed, 16 Jul 2008 13:57:39 +0000</pubDate>
<dc:creator>fetishcode</dc:creator>
<guid>http://fetishcode.wordpress.com/?p=182</guid>
<description><![CDATA[Este es el nombre por el cual se conoce una limitación de seguridad de Ajax, que imposibilita que s]]></description>
<content:encoded><![CDATA[<p>Este es el nombre por el cual se conoce una limitación de seguridad de Ajax, que imposibilita que se puedan realizar conexiones con otros dominios externos, a los cuales esta corriendo la aplicación.<br />
En el capítulo 11 del libro Introducción a AJAX de <a href="http://www.librosweb.es/">librosweb </a>hablan en profundidad sobre el tema.<br />
Y en <a href="http://www.ajax-cross-domain.com/">http://www.ajax-cross-domain.com</a> podemos encontrar una librería que nos ofrece el poder hacer peticiones externas.</p>
<p>Por cierto, desde aqui dar las gracias a la gente de Librosweb, por liberar todo ese conocimiento</p>
]]></content:encoded>
</item>

</channel>
</rss>
