Archive for May, 2009
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
Data View Controls: Form Action Button and Dynamic Redirect
May 6th
Example of code to add to the form sav button to redirect to another page when submitting a custom form
javascript: {ddwrt:GenFireServerEvent(concat(‘__commit;__redirect={DispForm3.aspx?ID’,$ID,’}'))}
http://autosponge.spaces.live.com/blog/cns!D7F85948C20F0293!233.entry
Redirect your users to another URL when they press the “Save” button
May 6th
Found this blog about SharePoint and InfoPoint, which takes up the possibility to redirect a user to another url when they press te save button.
If you want to redirect your users to another URL when they press the “Save” button inside a list form, then just add the following in the link to the form:
/lists/yourlist/newform.aspx?Source=/thankyou.aspx
I usually use relative url’s as in the example, but you may also write the whole URL of course…
Great!
http://miss-sharepoint.blogspot.com/2009/05/simple-redirect-script.html
Recent Comments