• 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!

TOPIC: [SOLVED] document.getelementbyID not working

[SOLVED] document.getelementbyID not working 13 years 1 month ago #13130

  • tim2
  • tim2's Avatar
  • OFFLINE
  • Junior Boarder
  • Posts: 23
Joomla 1.5.22
RSFormPro Rev. 35
<script type="text/javascript">
window.onload=generateoptions(document.getElementById('trainingSession'));
</script>

http://zclientdev.net/maze/training.html

The generateoptions function creates a dropdown list based on the current date and time.

This javascript works outside of RSFormPro but not inside. Please advise on what I am doing wrong or what other technique I should use. This is the URL of the working form outside of Joomla.
http://zclientdev.net/maze/custom/dynamicdropdown.html

Please help!

Solution:

I finally got it to work by doing the following. I created a new function called initvalues:

function initvalues(){
generateoptions(document.getElementById('trainingSession'));
}

and then placed the following code at the bottom of the form in the form layout tab:

<script type="text/javascript">
initvalues();
</script>
Last Edit: 13 years 1 month ago by tim2. Reason: added solution
The administrator has disabled public write access.
  • 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!