Path to Template Directory inside jQuery? (2 posts)

  1. norbiu
    Posted 5 years ago #

    My header is calling a javascript file which sends out an email:

    <script type="text/javascript" src="<?php bloginfo('template_directory') ?>/css/effects.js"></script>

    But inside this file, I have a jQuery code that calls a .php file that does the actual sending of the email:

      type: "POST",
      url: "css/sendmail.php",
      data: dataString

    But the script doesn't work, unless the url is
    <?php bloginfo('template_directory') ?>/css/sendmail.php
    and not just

    Is there any way to include a path to the template directory in js?

  2. withinreach
    Posted 4 years ago #

    bump - need answer also!

Topic Closed

This topic has been closed to new replies.

About this Topic