Hey guys i'm trying to update a div element when end user clicks the submit key.
So i have this code:
<div class="duruGetPhone"> <input type="submit" name="upload" value="submit" class="something" /> </div>
<script>
$(document).ready(function() {
$('input.something').click(function(e) {
e.preventDefault();
$('div.duruGetPhone').load('loadImage.php', {param1: '<?php echo $Hood; ?>', param2: '<?php echo $Id; ?>'});
});
});
</script>
This works fine if i use an 'a' tag or 'span' but doesn't work for an input. It actually updates the div just fine but doesn't carry out the submit. if i don't use "preventDefault" then nothing happens. can someone shed some light on this one?