Posts tagged dropdown
Dropdown with URL in onchange
May 6th
Found this on Lise’s blog:
If you want to create a dropdown list with onchange event to dynamically go to selected URL then do this:
Use Sharepoint Designer
Insert Data View
Select Show Data
Select which field that should be displayed in the drop-down list
Insert Data
ViewData..
Style
Change layout to “Drop-down view style”
Click OK
Change to Code view in Designer
Put a script type javascript code snippet before the before the /head> tag:Then find the following in your code
select name=”ID” size=”1″12
Change that to
select name=”ID” size=”1″ onchange=”FP_jumpMenu(this,’window’,false)”>Then find
option style=”display:{$GroupStyle}”
Change to
option style=”display:{$GroupStyle}” value=”{@FieldWithURL}”>
where FieldWithURL is the link that you want to go to
Save
// Link to blog post: http://miss-sharepoint.blogspot.com/2008/04/dropdown-with-url-in-onchange.html
Recent Comments