On Thu, Apr 15, 2010 at 6:51 AM, John Mitchell mitchelljj98@gmail.comwrote:
I am trying to make this as simple as possible:
As an example (listed below) I have a javascript ajax call to a java servlet within my existing Apache Tomcat web application not Drupal. All that would need to be modified would that the URL have to be the full path.
Is their a way within Drupal to embed a javascript call similar to the one listed below?
Thanks,
John
<script type = "text/javascript"> function download(link){ var email = document.getElementById('email'); var xmlHttpReq = new XMLHttpRequest(); var url = 'ecommerce?command=serve&name=' + link + '&email=' + email.value; xmlHttpReq.open('post', url, true); xmlHttpReq.onreadystatechange = function() { if (xmlHttpReq.readyState != 4) { return; } else { var responseText = xmlHttpReq.responseText; return false; } } xmlHttpReq.send(null); } </script>
Apache Solr Integration does something similar, you might be able to find
some clues - http://drupal.org/node/343467