Comments on: SharePoint: Extending the DVWP – Bonus: Creating a Title Based on Dropdowns with jQuery http://www.endusersharepoint.com/2010/11/10/sharepoint-extending-the-dvwp-%e2%80%93-bonus-creating-a-title-based-on-dropdowns-with-jquery/ No GeekSpeak on SharePoint 2007 WSS and MOSS Mon, 27 Dec 2010 21:17:12 -0500 http://wordpress.org/?v=2.8.6 hourly 1 By: Greg http://www.endusersharepoint.com/2010/11/10/sharepoint-extending-the-dvwp-%e2%80%93-bonus-creating-a-title-based-on-dropdowns-with-jquery/comment-page-1/#comment-111510 Greg Thu, 11 Nov 2010 17:34:36 +0000 http://www.endusersharepoint.com/?p=10576#comment-111510 Hi Jim, Nice post and solution! As Matt says,it is going to be really usefull. Regarding the various types of dropdowns, I recalled a post from Marc Anderson thta may be a good complement: http://sympmarc.com/2010/05/19/two-types-of-sharepoint-forms-dropdowns/ Greg Hi Jim,
Nice post and solution! As Matt says,it is going to be really usefull.
Regarding the various types of dropdowns, I recalled a post from Marc Anderson thta may be a good complement: http://sympmarc.com/2010/05/19/two-types-of-sharepoint-forms-dropdowns/

Greg

]]>
By: Jim Bob Howard http://www.endusersharepoint.com/2010/11/10/sharepoint-extending-the-dvwp-%e2%80%93-bonus-creating-a-title-based-on-dropdowns-with-jquery/comment-page-1/#comment-111412 Jim Bob Howard Thu, 11 Nov 2010 03:15:30 +0000 http://www.endusersharepoint.com/?p=10576#comment-111412 Good. I like to be helpful. ;) Good. I like to be helpful. ;)

]]>
By: Matt Bramer http://www.endusersharepoint.com/2010/11/10/sharepoint-extending-the-dvwp-%e2%80%93-bonus-creating-a-title-based-on-dropdowns-with-jquery/comment-page-1/#comment-111394 Matt Bramer Thu, 11 Nov 2010 00:59:24 +0000 http://www.endusersharepoint.com/?p=10576#comment-111394 Just looking for a plug n play solution for questions that crop up on the STP. This will definitely help! Just looking for a plug n play solution for questions that crop up on the STP. This will definitely help!

]]>
By: Jim Bob Howard http://www.endusersharepoint.com/2010/11/10/sharepoint-extending-the-dvwp-%e2%80%93-bonus-creating-a-title-based-on-dropdowns-with-jquery/comment-page-1/#comment-111311 Jim Bob Howard Wed, 10 Nov 2010 15:53:13 +0000 http://www.endusersharepoint.com/?p=10576#comment-111311 Sure, Matt. You could do that, too. The way I see it is that you could experiment with the DOM and give the container TD a unique title attribute (e.g. title='mySelect'). Then your jQuery would look for the TD and check to see if you're dealing with an input or a select. if ($("td[title='mySelect'] select").length > 0) { // it's a select } else { // it's an input }; I'm not sure you'd save any keystrokes or complexity over trying the most common and then trying the other if you come up with undefined. Does that help? Blessings, Jim Bob Sure, Matt. You could do that, too.

The way I see it is that you could experiment with the DOM and give the container TD a unique title attribute (e.g. title=’mySelect’). Then your jQuery would look for the TD and check to see if you’re dealing with an input or a select.

if ($(”td[title='mySelect'] select”).length > 0) {
// it’s a select
} else {
// it’s an input
};

I’m not sure you’d save any keystrokes or complexity over trying the most common and then trying the other if you come up with undefined.

Does that help?

Blessings,
Jim Bob

]]>
By: Matt B. http://www.endusersharepoint.com/2010/11/10/sharepoint-extending-the-dvwp-%e2%80%93-bonus-creating-a-title-based-on-dropdowns-with-jquery/comment-page-1/#comment-111309 Matt B. Wed, 10 Nov 2010 15:47:24 +0000 http://www.endusersharepoint.com/?p=10576#comment-111309 Jim, Do you think there is a way to write a test in jQuery to check these drop-downs and apply different code if they are > 19 ? Jim,
Do you think there is a way to write a test in jQuery to check these drop-downs and apply different code if they are > 19 ?

]]>