What I am trying to figure out how to use JavaScript to Show/Hide PHP scripts.
JavaScript:
<script type="text/javascript">
function showhide(id){
if (document.getElementById){
obj = document.getElementById(id);
if (obj.style.display == "none"){
obj.style.display = "";
} else {
obj.style.display = "none";
}
}
}
</script>
Body Code:
<?php
echo "<a href='javascript:showhide('delivery.php');'>Show/Hide Delivery options</a>";
require "delivery.php" ?>
Any ideas on why/how I could get this to work?
Any help is appreciated!
delivery.php?