The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript jQuery using .load()

  • This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #35568

    Hey guys, I recently ran into a little snag while designing my website. I just started using the load() function and it’s working great! The only problem I have is one of my pages is a contact form which has its own javascript file that’s included.

    All it does is lets you know if any of the fields are too short, and restrains the user from sending the message. I also have my php return an error to the user but the javascript is nice because the user doesn’t have to go back and refill the fields again.

    What I’m asking for is how to possibly load the javascript for the contact page after the content loads.

    Also I’ve tried putting the javascript in the head, doesn’t work.
    The only time it will load like it’s supposed to is when you visit the page directly…

    Thanks in advance.

    Live page:


    Wrap all of the js for the contact page in a function, and then call that function as a callback on successful load.

Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘JavaScript’ is closed to new topics and replies.