Get Umbraco Certified in October
5 courses in 4 different countries across 2 continents leaves no excuse.
Attend courses in the Netherlands, UK, USA and at Umbraco HQ in Denmark.
See the schedule and read more about our training here.
Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Hi there, I've got some images (in the media section) that I want to show depending on the current value of a contour dropdown (as it changes need to run some ajax code).
Is there a way to acheive this with Contour?, Some sort of event handler override?
As far as I know there isn't something built in that can do this, but it is possible to do this using JQuery, and having a function that attached a JQuery event listener to the dropdown when the page loads. We've done that on a few forms for dropdowns with "other, please enter" that displays a field that we hide if it's selected, so they can enter the other option.
Yup currently the best options is to do this client side with some JQuery
Don't spose you have some examples? I'm wanting to have similar functionality on a SimpleMediaPicker control I'm using for a dashboard admin task. (eg visually show which of the mediapickers have changed there values from the current stored one)
Here's a solution I came up with for anyone stumbling accross this.
(it's quite specific to the media picker...)
So from the base code [http://umbraco.codeplex.com/SourceControl/changeset/view/751c9aa11bbd#components%2feditorControls%2fmediapicker%2fMediaPicker.js]
We can use the .show() .hide() actions called on the $("#" + this._mediaTitleClientID).parent()
By extending the show/hide method to chain our own changed event too, something like
Write your reply to:
Image will be uploaded when post is submitted