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

TOPIC:

Form fill date_till after date_from is filled 30 Jun 2012 16:15 #2721

I have a form with two date fields: dt_from and dt_till.
I want to create an OnChange event. After typing in a value in the dt_from field i want to fill the dt_till field with the dt_from + 7 days.

Who can help me with that?
Molenwal1 Webdesign
www.molenwal1.nl

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

Re: Form fill date_till after date_from is filled 02 Jul 2012 09:00 #2727

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 986
Anywhere in JDom, you can use the 'selectors' parameter.
JDom::_('html.form.input.text', array(
	...
	'selectors' => array(
		'onChange' => htmlspecialchars("My javascript code"),
		'rel' => 'foo',
		...
	)
));

Not tested, maybe some syntax error, but the idea is that.
'selectors' parameter is unherited for all the classes under 'html.xxx'
JDom is open and unlimited.
Coding is now a piece of cake

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

Last edit: by admin.
  • Page:
  • 1
Time to create page: 0.096 seconds

The j-cook project is one of the best of its kind and it is nice that we all try to contribute in little ways to make life easy for each other.

vlemos (Forum)  

Get Started