I am using the mail()
in php and wondered if it was possible to have event listeners included. Below includes code with a button that is to have the paragraph slideup when clicked. Yet, nothing happens.
<html>
<head>
<script type="text/javascript"src="js/jquery.js"></script>
<script type="text/javascript" src="js/jquery-ui.js"></script>
<script type='text/javascript'>
$(function() {
$(':button').click(function(){
$("p").slideToggle();
});
});
</script>
</head>
<body>
<?php
$to = "Example@yahoo.com";
$subject = "Maybe so??";
$body = "<p>Yeppir </p>
<button>Click Me </button>";
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
$headers .= 'From: skywalker@msn.com';
if (mail($to, $subject, $body, $headers)) {
echo("<p>Message sent!</p>");
} else {
echo("<p>Message delivery failed...</p>");
}
?>
</body>
</html>