• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 17. Dynamic HTML: Drag and Drop, Data Binding, and Behaviors

Chapter 17. Dynamic HTML: Drag and Drop, Data Binding, and Behaviors


In this chapter, we’re going to keep working on making our web pages come alive, this time by supporting drag and drop, data binding, and Internet Explorer behaviors.

You can implement drag and drop in two primary ways: implementing visual dragging, and implementing data transfer. Visual dragging involves moving objects around in a web page, and data transfer means dragging and dropping actual data, from text to images, that you can work with in code. Naturally, we’ll see both ways.

Data binding is a big topic in the Internet Explorer, and we’ll take a look at it here. You can store data in a variety of formats—plain text, HTML format, and even XML documents (we’ll see all of these formats here)—and display that data in the browser. We’ll let the user move through the various records and fields of our data using buttons, and we’ll also see how to display our data in tables.

Internet behaviors represent Microsoft’s attempt to separate data from code, which is a big programming topic these days. When you separate code from data, the resulting application is cleaner and easier to maintain. Behaviors enable you to place JavaScript code in external files with the extension .htc, and you can associate a behavior with an HTML element using styles (as we’ll see in this chapter). You can give a behavior custom properties, methods, and events, just as HTML elements have (as we’ll also see in this chapter).


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint