When a Swap Image behavior is deleted from the page, all the
additional event handlers must be stripped out as well. To do so, the deleteBehavior() function first
reads in the behavior function call string and then searches for the Preload ID. This is a unique name
inserted by Dreamweaver if the user checked the Preload option when running the behavior. If the
preloadID is found, the preload handler, such as onLoad = MM_preloadImages(), is removed. Next,
the Swap Image deleteBehavior() searches to see if the Swap Image Restore code was added??”and if
so, deletes that event handler as well.
The identifyBehaviorArguments() function
If you??™ve ever had to relocate a Web site from one directory to another, you know what laborious job it is to
make sure that all references are intact. Dreamweaver takes some of the tedium out of this chore. When you
use Save As from Dreamweaver, all the file paths within HTML attributes, such as the image source files and
link href files, are automatically updated. Dreamweaver extends the same functionality to URLs contained
within behaviors.
For example, suppose that you have constructed a Web page that uses the Check Browser action to route
users to various URLs, depending on the browser they are using. Should you elect to save your Web page in
a different folder, for whatever reason, Dreamweaver automatically updates the referenced URLs.
Pages:
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946