Page is a not externally linkable
- Code, Content, and Presentation
-- JavaScript and AJAX
---- refresh specific elements with jquery


neophyte - 4:11 am on May 17, 2012 (gmt 0)


Hello All -

I've got the need to refresh one or more specific page elements (not the entire page) with jquery when a particular javascript function completes.

I've looked all over the web but can't find the right solution for this functionality - most information relates to refreshing one or more elements after a certain period of time... I've tried to reverse engineer some of these suggestions but I can't get the syntax right.

In a nutshell:

I'm doing an ajax call to DELETE a single row from a database table.

After the delete finishes I need to update the content in a particular div (#main_content). I'd like to make this refresh a seperate function so I can use it for other things as well, like:

- ajax call
- on success...
- updateElement(#main_content)

function updateContent(element)
{
location.reload().element; (this is where it's not working probably because of incorrect syntax)
}

Can anyone give me an idea on where I'm going wrong?


Thread source:: http://www.webmasterworld.com/javascript/4454409.htm
Brought to you by WebmasterWorld: http://www.webmasterworld.com