I am using jQuery for some functionality within my ASP.NET application, however every time a jQuery event is triggered the results display for a second but the page then refreshes. The code will take what the user selects from an select box and put it into a text box, the thing is it works in chrome but for the life of me I cannot get it working in firefox. I need this to work in fixfox as it will be getting in it.
How could I get this to work in firefox:
<script type="text/javascript">
$(function () {
$('#mybkng').hide();
$('#props').click(getProp);
});
function getProp() {
var prop = $(this).val();
$('#select').click(function () {
event.preventDefault();
$('#mybkng').show();
$('#theproperty').val(prop);
});
}
</script>
Any help would be appreciated this has been driving me nuts. Also would it be possible to do this with VB?
I think the problem is with the function call use return before the function call on the button.
In the function
and where ever you are calling use return before it as follows