How to create a Data View Web Part that triggers a connection from the Drop-down view style in FrontPage 2003| Article ID | : | 838685 | | Last Review | : | August 6, 2004 | | Revision | : | 1.2 |
INTRODUCTIONThis article describes how to create a Data View Web Part by using the drop-down view style in Microsoft Office FrontPage 2003. The drop-down view style in FrontPage 2003 triggers a connection when you select a record on a Web page in your Web browser. MORE INFORMATIONTo create a Data View Web Part by using a drop-down view style, follow these steps: | 1. | Start FrontPage 2003. | | 2. | Open a default Microsoft Windows SharePoint Services Web site in FrontPage 2003. | | 3. | Under Folder List, double-click the Default.aspx file to open it in Design view. | | 4. | Create two Data View Web Parts. To do this, follow these steps:| a. | On the Data menu, click Insert Data View. | | b. | In the Data Source Catalog pane, select any data source to create a Data View Web Part. For example, you can create two Data View Web Parts by using the Announcements list data source. | | c. | For this example, click Announcements under SharePoint Lists, and then click Insert Data View. | | d. | Repeat step 4.c to insert a second Announcements list Data View Web Part. |
| | 5. | Change the style of the first Data View Web Part. To do this, follow these steps:
| a. | Above the Title column in the first Announcements list Data View Web Part, click the drop down arrow on the Data View Options tab, and then click Style. | | b. | In the View Styles dialog box, click HTML view. | | c. | In the HTML view styles list box, locate the Dropdown menu of titles style, and then click the Dropdown menu of titles style. | | d. | Click OK. | | e. | Click Yes when you receive the following message: If you change the view style, any custom formatting or provider Web Part connections will be removed. Do you want to continue? |
| | 6. | Connect the first Announcements list Data View Web Part to the second Announcements list Data View Web Part. To do this, follow these steps:
| a. | Right-click the first Announcements list Data View Web Part, and then click Web Part Connections. | | b. | In the Web Part Connections Wizard, click Provide Data Values To under Choose the action on the source Web Part to use for this connection, and then click Next. | | c. | Click Connect to a Web Part on this page, and then click Next. | | d. | Under Target Web Part, click the second Announcements list, and then click Next. | | e. | Under Columns in first Announcements list, click Title, click Title under Columns in second Announcements list, and then click Next. | | f. | Click Title in the Create a hyperlink on: list, and then click Next. | | g. | Click Finish. |
| | 7. | Update the underlying code to create the Data View Web Part that triggers a connection. To do this, follow these steps:| a. | Click the Code view. | | b. | Locate the following tag: <select name="ID" size="1"> Change the tag as follows:
<select name="ID" size="1" onchange="eval(this.options.value)">
| | c. | Locate the following tag:<a target="_self"> Locate the following code: <xsl:attribute name="href"><xsl:variable xmlns:xsl="http://www.w3.org/1999/XSL/Transform" name="cursel">dvt_curselkey={<xsl:value-of select="$CurrentRowKey"/>}</xsl:variable><xsl:variable xmlns:xsl="http://www.w3.org/1999/XSL/Transform" name="fields">@ProductID=<xsl:value-of select="ddwrt:ConnEncode(string(@ProductID))"/></xsl:variable>javascript:<xsl:value-of xmlns:xsl="http://www.w3.org/1999/XSL/Transform" select="ddwrt:GenFireConnection(concat('a9abe436-4cb7-4f23-affb-a11913e68ee3*',$fields),string($cursel))"></xsl:value-of></xsl:attribute> | | d. | Copy the code that you found in step 7c, and then paste the code immediately before the following code:<a target="_self"> The result will be similar to the following:<xsl:attribute name="href"><xsl:variable xmlns:xsl="http://www.w3.org/1999/XSL/Transform" name="cursel">dvt_curselkey={<xsl:value-of select="$CurrentRowKey"/>}</xsl:variable><xsl:variable xmlns:xsl="http://www.w3.org/1999/XSL/Transform" name="fields">@ProductID=<xsl:value-of select="ddwrt:ConnEncode(string(@ProductID))"/></xsl:variable>javascript:<xsl:value-of xmlns:xsl="http://www.w3.org/1999/XSL/Transform" select="ddwrt:GenFireConnection(concat('a9abe436-4cb7-4f23-affb-a11913e68ee3*',$fields),string($cursel))"></xsl:value-of></xsl:attribute><a target="_self"> | | e. | Find the name=”href” line and replace it with name=“value” in the newly pasted code:<xsl:attribute name="value"><xsl:variable xmlns:xsl="http://www.w3.org/1999/XSL/Transform" name="cursel">dvt_curselkey={<xsl:value-of select="$CurrentRowKey"/>}</xsl:variable><xsl:variable xmlns:xsl="http://www.w3.org/1999/XSL/Transform" name="fields">@ProductID=<xsl:value-of select="ddwrt:ConnEncode(string(@ProductID))"/></xsl:variable>javascript:<xsl:value-of xmlns:xsl="http://www.w3.org/1999/XSL/Transform" select="ddwrt:GenFireConnection(concat('a9abe436-4cb7-4f23-affb-a11913e68ee3*',$fields),string($cursel))"></xsl:value-of></xsl:attribute> |
| | 8. | On the File menu, click Save. | | 9. | To verify the changes that you made in the Web page by using the FrontPage 2003, follow these steps:| a. | On the File menu, point to Preview in Browser, and then click Microsoft Internet Explorer 6.0. | | b. | Locate the first Announcements list Data View Web Part list box, and then select any title. |
|
Notice that the record for the corresponding title appears in the second Announcements list Data View Web Part.
APPLIES TO| • | Microsoft Office FrontPage 2003 |
Back to the top
| Other Support Options- Need More Help?
Contact a Support professional by Email, Online or Phone. - Customer Service
For non-technical assistance with product purchases, subscriptions, online services, events, training courses, corporate sales, piracy issues, and more. - Newsgroups
Pose a question to other users. Discussion groups and Forums about specific Microsoft products, technologies, and services.
|
|