spacer
Yehuda Shiran November 13, 2001
Attaching the WebService Behavior
Tips: November 2001

Yehuda Shiran, Ph.D.
Doc JavaScript

Developer News
Microsoft Shows Off Silverlight 4, IE9 Plans
Metasploit Expands Vulnerability Test Framework
HyperCard Reborn?

In order to call remote methods from Web Services in Internet Explorer, you need to use the WebService behavior. The WebService behavior is implemented as an HTML Component (HTC), so it can be used in Microsoft Internet Explorer 5 and later versions. The WebService behavior communicates with Web Services over HTTP using Simple Object Access Protocol (SOAP).

The first step in using the WebService behavior is to attach it to an element using the STYLE attribute. It is also necessary to set the ID attribute so that this element can be easily referenced in script. You can attach the WebService behavior to various types of elements. Here is an example that shows how to attach it to a DIV element:

<DIV ID="webServiceCallerDiv" 
     STYLE="behavior:url(webservice.htc)"></DIV>
And here is an example that shows how to attach it to a BODY element:

<BODY ID="webServiceCallerBody" 
      STYLE="behavior:url(webservice.htc)"></BODY>
The behavior can also be applied using other variations of Cascading Style Sheets (CSS) style sheet syntax. To begin working with the WebService behavior, download the WebService HTC File and copy it to the same directory as the Web page that uses the behavior. By placing the WebService HTC File in the same directory as your HTML page that calls it, you avoid any DHTML behavior-related cross-domain security issues.


People who read this tip also read these tips:

Look for similar tips by subject:

internet.commediabistro.comJusttechjobs.comGraphics.com

Search:

WebMediaBrands Corporate Info

Legal Notices, Licensing, Permissions, Privacy Policy.
Advertise | Newsletters | Shopping | E-mail Offers | Freelance Jobs

webref The latest from WebReference.com Browse >
Rolling Out Your Own HTML Application Version Control · HTML 5: Client-side Storage · Working with Ajax Server Extensions
Sitemap · Experts · Tools · Services · Email a Colleague · Contact FREE Newsletters 
 The latest from internet.com
Wi-Fi Product Watch, November 2009 · Chip Market Recovering From '08 Collapse · Low-Cost Tools to Kickstart Your New Business