Howto: Create a Data View Web Part as a dropdown menu linking directly to the Dispform.aspx page

Here is a howto article for making a dropdown view that links to the proper WSS page for display.

For the Announcements list as an example:

1. Insert a view of the Announcements list in FrontPage
2. Data..Style
3. From the General tab, select the Drop down view style
4. Switch to code view
5. Find the following code:
<select name="ID" size="1">
6. Change that code to say this:
<select onchange="FP_jumpMenu(this,'window',false)" id="id1" name="D1">
7. Find the code that says this:
<option style="display:{$GroupStyle}">
<xsl:value-of select="@Title"/>
</option>
8. Change that code to say this:
<option
style="display:{$GroupStyle}"><xsl:attribute
name="value">https://server/subsite/Lists/Announcements/DispForm.aspx?ID=<xsl:value-of
select="@ID"/></xsl:attribute>
<xsl:value-of select="@Title"/>
</option>
9. Make sure you replace https://server/subsite with the proper name of your
server site
10. Save the page (due to FrontPage's behaviors used in step 6, FrontPage
will generate the proper javascript function for you on save.)
11. Preview in the browser

Ta da.

Let me know if it works for you!

-John

Comments

  • Anonymous
    May 04, 2004
    I'll put a working example up on my site also...
  • Anonymous
    May 05, 2004
    Cool Ian. Ian's site is FULL of cool examples like this one. http://www.wssdemo.com. Very cool.

    -John
  • Anonymous
    June 06, 2004
    John,

    would you want me in the wss FAQ to just give the link to this blog item or could I quote the text ?
  • Anonymous
    June 07, 2004
    Feel free to quote the text, whatever is best for you.

    -John
  • Anonymous
    June 09, 2004
    Thanks John..