Danh mục

thiết kế giao diện wordpress phần 9

Số trang: 15      Loại file: pdf      Dung lượng: 951.13 KB      Lượt xem: 15      Lượt tải: 0    
Hoai.2512

Xem trước 2 trang đầu tiên của tài liệu này:

Thông tin tài liệu:

Dynamic Menus and Interactive ElementsAgain, if the user is browsing with IE6, then they will have to click to activate. The good news is the swapobject.js Javascript that we implemented above for your themes headers can be leveraged anywhere on your site including these posts.Yes, of course theres a plug-in: This wont help you too much if youre planning on Flash in your theme, but for Flash in your WordPress posts and pages, Jim Penaloza has written a great little plug-in using the SWFObject method detailed above. You can find out more about it here: http://wordpress.org/extend/plugins/wp-swfobject/[ 164 ]Chapter 7Want more...
Nội dung trích xuất từ tài liệu:
thiết kế giao diện wordpress phần 9Dynamic Menus and Interactive ElementsAgain, if the user is browsing with IE6, then they will have to click to activate. Thegood news is the swapobject.js Javascript that we implemented above for yourthemes headers can be leveraged anywhere on your site including these posts. Yes, of course theres a plug-in: This wont help you too much if youre planning on Flash in your theme, but for Flash in your WordPress posts and pages, Jim Penaloza has written a great little plug-in using the SWFObject method detailed above. You can find out more about it here: http://wordpress.org/extend/plugins/wp-swfobject/ [ 164 ] Chapter 7 Want more Flash? Despite my warnings at the beginning of this chapter, if you still want to add more interesting Flash to your site, theres a host of Flash-based WordPress plug-ins that allow you to easily embed Flash content and features into your WordPress posts and pages. Check out the plug-ins directory at http://wordpress.org/extend/plugins/ search.php?q=Flash.SummaryIn this chapter, weve looked at getting drop-down Suckerfish menus andFlash content quickly and painlessly into your WordPress theme and content. Nextup—getting AJAX with dynamic interactive forms into your WordPress project. [ 165 ] AJAX / Dynamic Content and Interactive FormsAJAX—its the buzzword that hit the Web with a bullet in 2005, thanks to JesseJames Garrett, a user-experience expert who founded AdaptivePath.com. If youretotally new to AJAX, Ill just point out that; at its core, AJAX is nothing that scary orhorrendous. AJAX isnt even a new technology or language!Essentially, AJAX is an acronym for Asynchronous JavaScript and XML, and it isthe technique of using JavaScript and XML to send and receive data between a webbrowser and a web server. The biggest advantage this technique has is that you candynamically update a piece of content on your web page or web form with data fromthe server (preferably formatted in XML), without forcing the entire page to reload.The implementation of this technique has made it obvious to many web developersthat they can start making advanced web applications (sometimes called RIAs—RichInterface Applications) that work and feel more like software applications, instead oflike web pages.Keep in mind that the word AJAX is starting to have its own meaning (as youll alsonote its occasional use here as well as all over the web as a proper noun, rather thanan all-cap acronym). For example, a Microsoft web developer may use VBScriptinstead of JavaScript to serve up Access Database data that is transformed into JSON(not XML) using a .NET server-side script. Today, that guys site would still beconsidered an AJAX site, rather than an AVAJ site (yep, AJAX just sounds cooler).In fact, its getting to the point where just about anything on a website (that isntin Flash) that slides, moves, fades, or pops up without rendering a new browserwindow is considered an Ajaxy site. In truth, a large portion of these sites donttruly qualify as using AJAX, theyre just using straight-up JavaScripting. Generally,if you use cool JavaScripts in your WordPress site, it will probably be consideredAjaxy, despite not being asynchronous or using any XML.AJAX / Dynamic Content and Interactive FormsWere going to take a look at the most popular methods to get you going with AJAXin WordPress using plug-ins and widgets to help you include dynamic self-updatingcontent and create interactive forms in your WordPress site. While were at it, wellalso look at some cool JavaScript toolkits, libraries, and scripts you can use toappear Ajaxy. Want more info on this AJAX business? The w3schools site has an excellent introduction to AJAX, explaining it in straight-forward, simple terms. They even have a couple of great tutorials that are fun and easy to accomplish, even if you only have a little HTML, JavaScript, and server-side script (PHP or ASP) experience (no XML experience required) (http://w3schools.com/ajax/).Preparing for Dynamic Content andInteractive FormsGone are the days of clicking, submitting, and waiting for the next page to load, ormanually compiling your own content from all your various online identities to postinto your site.A web page using AJAX techniques (if applied properly) will give the user asmoother and leaner experience. Click on a drop-down option and the checkboxmenus underneath are updated immediately with the relevant choices—nosubmitting, no waiting. Complicated forms that, in the past, took two or threescreens to process can be reduced into one convenient screen by implementing theform with AJAX.As wonderful as this all sounds, I must again offer a quick disclaimer. I understandthat, as with drop-down menus and Flash, you may want or your clients aredemanding that AJAX be in their sites. Just keep in mind, AJAX techniques arebest used in situations where they truly benefit the users experience of the page,for example, being able to add relevant content via a widget painlessly or cuttinga lengthy web process from three pages down to one. In a nutshell, using an AJAXtechnique simply to say your site is an AJAX site is probably not a good idea.You should be aware that, if not implemented properly, some uses of AJAX cancompromise the security of your site. You may inadvertently end up disabling keyweb browser features (like back buttons or the history manager). Then there are allthe basic usability and ac ...

Tài liệu được xem nhiều: