Board Logo

Autosubmit
Combat Medic - 1/3/2003 at 04:42 PM

I am trying to get the calendar control to autosubmit the form that it came from after a date has been selected. Does anyone know how I would go about this?

Thanks
Mike


JFitz - 12/1/2003 at 08:47 PM

I am also looking to have the calling form autosubmit. I tried using a Javascript onChange event on the date text field but it's not recognized. I have also tried an onFocus to no avail.


tigra - 12/10/2003 at 10:15 PM

Ok, here is how you can call custom javascript code when user selects the date:

1. open calendar?.js file, define cal_onselect?() function
2. Assign the function you've created to the calendar object in the constructor
3. Put a call to the this method in calendar.html (set_datetime function)

Here is the file that demonstrates that:


careyb - 8/25/2006 at 12:44 PM

Quote:
Originally posted by tigra
Ok, here is how you can call custom javascript code when user selects the date:

1. open calendar?.js file, define cal_onselect?() function
2. Assign the function you've created to the calendar object in the constructor
3. Put a call to the this method in calendar.html (set_datetime function)

Here is the file that demonstrates that:


How could you change the function to use that for any calling form, using a variable for the formname instead of 'tstest'?


ryknow23 - 2/9/2010 at 05:42 PM

I have a page (http://www.omnianesthesia.com/adminx/credCRNAEx.asp) where I have integrated the Tigra calendar into a list of names with expiration dates for licenses and certifications that anesthesia people have to renew in order to maintain their licenses and certificates. I have some javascript code that allows me to update multiple records. It only updates the records that have been changed without updating all the records.

The problem occurs because the code I have does not recognize that the input has changed when the calendar is used to pick a date. If I just input a date by typing it works fine but if I use the calendar it does not. Is there a way to focus on the text box once the date has been selected so that either the onChange event or the onFocus event can be used in the input box to get the code to recognize the change? Or is there another solution? Any help would be appreciated.

Thanks
Rick


superdataman - 6/20/2010 at 06:08 AM

I am using Tigra Calendar v4.0.3. I needed a way to set the focus back to the form field that Tigra Calendar has just placed a date in. After reading many posts, I came up with a simple solution:
-------------------------------------
Step 1:
---------
In the calendar_*.js file (mine is "calendar_us.js"), I added the following as the last line of the "f_tcalHide" function:

setFormFieldFocus(this.e_input);

-------------------------------------
Step 2:
---------
In the HEAD section of my Web page I added:
<script type="text/javascript">
function setFormFieldFocus(FormElement)
{
FormElement.focus();
}
</script>

This sets the focus to the form field that Tigra Calendar has just placed a date in.


Softcomplex: http://www.softcomplex.com/
Back to forum: http://www.softcomplex.com/forum/