you can see it here: http://mrgsp.md:8080/awesome/lookupdemo (make your browser window smaller, scroll down and click on a button near a textbox)
is there a way to make it not scroll up?
since you are using anchor tags you need to suppress the default behavior of the element. by calling preventDefault()
$("a").click(function (event) {
event.preventDefault();
//do stuff
}
Looking at your current javascript, something like this should work for you:
$("#lpo" + o).click(function (event) {
event.preventDefault();
if (lckPerson != null) return;
lckPerson = true;
$.get('/awesome/PersonLookup', {
prop: o,
paging: 'true'
}, function (d) {
$("#lp" + o).html(d).dialog('open');
lckPerson = null;
});
});
The problem is that the links are refered to the "#" which is the page top.
If you change this to href="javascript:void(0)"
this will not link to anything and will not scroll up.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With