Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC:

Add an onchange event to a jdom form field 26 May 2014 12:01 #12454

Hi people,
I'm looking for a way to add an onchange event to a radio group. I'd like to do this is the best way. Does the ckradio form field allow for onchange events? I can't find anything, so I'm guessing the answer is no, but it seems like something people might want, so I'm wondering if I can override ckradio to work this in. Not au fait enough with jdom to know how to do this myself, so I'm hoping someone might be able to give me some pointers.

I have tried adding an onchange attribute to the relevant xml file, but that has no effect. I'm wanting to add a show/hide div event, so an onsubmit event for the form isn't any good (In case someone was going to suggest this).

Please Log in or Create an account to join the conversation.

Add an onchange event to a jdom form field 05 Jun 2014 14:13 #12467

Thanks for all the input guys! :dry:
I did eventually find out a way around this.
My feeble knowledge of js meant that it wasn't immediately apparent to me that I could create a separate listener for a change event from the input itself. So I have something like this:
var jform_wizard = document.getElementById("jform_wizard");
	jform_wizard.onchange = function() {
	var wizval = document.getElementById("jform_wizard").value;
	setActiveDivs(wizval);
	};

which means that an onclick event doesn't need to be added to the input itself.

Now I have another question related to jdom, and I'm hoping for better than 15 views and no responses this time. Wish me luck

Andy

Please Log in or Create an account to join the conversation.

  • Page:
  • 1
Time to create page: 0.050 seconds
  let me say what a brilliant app! Thank you very very much for all the hard work to build Cook!
Tocpe (Forum)

Get Started