My header is calling a javascript file which transmits out an e-mail:

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

But inside this file, I've got a jQuery code that calls b .perl file that does the particular delivering from the email:

$.ajax(Publish",

  url: "css/sendmail.php",

  data: dataString`

However the script does not work, unless of course the url is:

<?php bloginfo('template_directory') ?>/css/sendmail.php

and not simply:

css/sendmail.php

Can there be in whatever way to incorporate a road to the wordpress template directory inside js?

You can produce a Javascript snippet that saves web site dir inside a variable, and employ this later:

<script type="text/javascript">

var templateDir = "<?php bloginfo('template_directory') ?>"

</script>