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”>http://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
http://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 (6)

  1. Ian Morrish says:

    I’ll put a working example up on my site also…

  2. John Jansen says:

    Cool Ian. Ian’s site is FULL of cool examples like this one. http://www.wssdemo.com. Very cool.

    -John

  3. Mike Walsh Helsinki says:

    John,

    would you want me in the wss FAQ to just give the link to this blog item or could I quote the text ?

  4. John Jansen says:

    Feel free to quote the text, whatever is best for you.

    -John

  5. Mike Walsh Helsinki says:

    Thanks John..