Asked by:
Javascript

General discussion
-
Hi,
ctl00_Content_ceNewOfferEndDate ,what does this mean is this some sort of syntax for javascript???
shreyaarchna
Tuesday, September 9, 2014 7:22 AM
All replies
-
normally that syntax indicates an ID value of the HTML output generated by an ASP.NET control
My blog: www.crmanswers.net - Rockstar 365 Profile
Tuesday, September 9, 2014 7:35 AM -
but in elsewhere i can see :
ctl00_Content_ceNewOfferEndDate
can you explain the difference ...and where can i find such syntax so that i may learn javascript...thank you in advance
shreyaarchna
Tuesday, September 9, 2014 8:19 AM -
Hi Shreya,
that is probably id of a div or span or some other container control. That is not JavaScript.
a good place to start would be search for JavaScript tutorial.
good one to start with is http://www.w3schools.com/js/default.asp
regards,
Tuesday, September 9, 2014 8:30 AM -
yes its a control but "ctl00_Content" ,what does this signify?
shreyaarchna
Tuesday, September 9, 2014 8:37 AM -
hi,
it does not signify anything. The prefix is created by ASP engine to make the control unique. Please add another few controls inside the same container control to see how it works.
regards,
Jithesh
Tuesday, September 9, 2014 8:46 AM -
function OfferEndDate(sender, args) {
if (sender.get_id() == 'ctl00_Content_ceNewOfferStartDate') {
fromDate = sender._selectedDate;
}so if it does not signify anything i can write just "ceNewOfferStartDate" instead of "ctl00_Content_ceNewOfferStartDate"????
shreyaarchna
Tuesday, September 9, 2014 8:51 AM -
Hi,
what I meant was that that part of the id is dynamic or unpredictable. If you move the control to another container object or move the control around, the prefix may change.
regards,
Jithesh
Tuesday, September 9, 2014 9:53 AM -
hi,
Yes ,Thank you i got it now...so is it good to use this or "find control"?
shreyaarchna
Tuesday, September 9, 2014 9:59 AM -
findcontrol it is.
regards,
Jithesh
Tuesday, September 9, 2014 10:03 AM