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.073 seconds

I jumped and started to work on a demo component... but 2 days later this demo component became the real component. I just showed today the end result to my customer and he turned to me and said... "this is more than I expected"... All of this is because Cook did cut about 70% of my work and provided me more ways to improve the usability of the component. The end result was 17 tables all related between than to generate a full dashboard for the travel agents. Thanks for Cook developers for such great tool. This component would not be possible to be done at short time with all the features in it
Griiettner (Forum)  

Get Started