I have a javascript code and it's necessary load my code after my form or in end of my page.
When I use this code load before my form in my page:

<script type="text/javascript">
  /// my code

How can load javascript after my form? or at the end of the page? thank you

  • It will be better if you mention what form you use and even more information about your specific case.
    – FFrewin
    Dec 2 '14 at 18:49

You simply need to put your Javascript after the form, where ever it's being rendered from:

<form method="post" action="">
    // rest of form code
    // you Javascript code

If you don't have the JS and form in the same file, then put them in the same file.

  • i do it and add code after form but it's load befor my form
    – saber
    Dec 2 '14 at 16:24
  • Is this part of a Joomla module, component, plugin or a separate PHP script?
    – Lodder
    Dec 2 '14 at 16:26
  • it's joomla component i want add custom js in listbingo component
    – saber
    Dec 2 '14 at 16:29
  • Ahh so the form is being rendered. I can have a look at the component later on if it's a free extension and get back to you
    – Lodder
    Dec 2 '14 at 16:45
  • i want add javascript to this file: administrator/components/com_listbingo/views/ad/tmpl/form.php
    – saber
    Dec 2 '14 at 17:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.