Yes - the control id is generated by sharepoint, consisting of the Guid 
assigned to the web part (I think) and some other details. So it will change 
between environments, site collections and even pages that the control is 
deployed to.
The best bet is to find another way to refer to your control in the jQuery, for 
example by class, or by using a selection pattern where you select a div 
containing the dropdown, then the next 'select'.
e.g. 
var dropDownCtrl = jQuery("select.drpDownClassName")
or
var dropdownCtrl = jQuery("div.divsClassName > select")
From: akhanna...@gmail.com
Date: Wed, 3 Jul 2013 14:16:24 +1200
Subject: Dropdownlist and masterpage gibberish
To: ozmoss@ozmoss.com

Hi Guys,
I am creating a custom user control in MOSS 2007 to save some values to 
database.

I am seeing the tags have changed because of masterpage..and affected Jquery 
code



Dropdown id was ddlComponents, it changed to 
#ctl00_m_g_97d0d488_aa17_4761_a330_12496d50c779_ctl00_ddlComponents

I have changed this and Jquery is working fine...

When we deploy to Test environment, will this gibberish - 
ctl00_m_g_97d0d488_aa17_4761_a330_12496d50c779_ctl00_- change again...





Cheers
A




_______________________________________________
ozmoss mailing list
ozmoss@ozmoss.com
http://prdlxvm0001.codify.net/mailman/listinfo/ozmoss                           
          
_______________________________________________
ozmoss mailing list
ozmoss@ozmoss.com
http://prdlxvm0001.codify.net/mailman/listinfo/ozmoss

Reply via email to