0
votes

I have a listing page(that has datagrid). I do have edit button in each row clicking that opens up overlay (ajax modal popup). After inserting/updating data, I have to refresh data grid to display newly inserted data and displays message on the top of page saying Data is inserted/updated successfully.

Since I have update panel around the page, page has a focus on the row where I click edit button so users actually have to scroll all the way up to see successful message. Is there any way I can set focus/scroll all the way up after ajax update so user can see whether the record is updated successfully or not.

Note: I am calling updatepanel.update() method to refresh update panel after closing modal popup.

Any help will be appreciated.

1

1 Answers

0
votes

Would the good old named anchor tag help you?

e.g.

<a name="messageOnTop">my message</a>
<!-- big data grid -->

<!-- button that opens the overlay doing business -->
<a href="#" onclick="doOverlay(); 
    /* when finished with overlay: */ 
    document.location = '#messageOnTop'">button</a>

The above is just pseudo-code. What I want to say, is that you can jump to the anchor with the #-notation in the URL