Attaching Javascript to the Click Event of a Check Box

Sherry Collins asked on May 25, 2015 18:31

I have a check box and two date fields on a design screen that will be used by the content manager. On the design screen the content manager will have a checkbox to check for listing the Featured Article. The two dates are to pick how long the article appears.

The rule is if the check box is not checked then the date picker is not enabled. I have written a jQuery script that works fine in a regular aspx page, so I assume it will work in Kentico.

My question is how do I attached the jQuery to the click event of the checkbox. I have tried placing the Javascript webpart in the Zone of the main page for the blog posts and it never fires.


Recent Answers

Charles Matvchuk answered on May 26, 2015 01:47 (last edited on May 26, 2015 01:50)

Sherry, it seems like you are posting the same questions over and over again. Please see your last thread where Brendan explains how to go about using depending fields which should take care of this. He also indicated about using jQuery and JavaScript in the Admin section.

You could also create a custom form control, or a custom .ascx, or completely create a custom edit form.

2 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.