I have a form for entering directions and displaying a google map
<form action="#" onsubmit="setDirections(this.from.value, 'address', 'en_US'); return false">
Outside of the form, I have the following:
Formatted Directions<div id="printdirec"><a href="http://maps.google.com/">Print Directions</a></div>
I want to change the value inside the div tag 'printdirec' to say something else
I tried this (which I thought would work), but it is not:
<script type='text/javascript'>
$(document).ready(function() {
$(":submit").click(function(e) {
$('div.printdirec').val('tttt')
});
});
</script>
Any suggestions on what I'm doing wrong?
source
share