View Full Version : Jquery refersh table

11-10-2010, 09:44 PM
Please look at this example page

Basicly I have a page with database results, there is an edit button when clicked, pops up a Greybox Redux with a form in it to edit the database results

When the form is submitted I want to update the records that are in the main <div> without a page refresh.

Using the above example imagine the form portion in a greybox and when submitted it closes the greybox, proccess the form, gets the results and updates the div on the main page. I dont want to refresh the whole page just the contents in the '#showdiv'

I am using the method above I just dont know how to modify the javascript to target the div on the main page. If works fine if I place the div and the form on the same page. Do I just modify the target below? to point to the parent page and the div id?

<script type="text/javascript">
$(document).ready(function() {
target: '#showdata',
success: function() {

11-25-2010, 03:40 AM
Is this what your going for?

<script type="text/javascript">
$(document).ready(function() {

type: 'POST',
url: 'data.php',
data: $("#myForm").serialize(),
success: function() {
}); </script>

12-21-2010, 03:20 AM
can someone explain how this was done http://www.brightcherry.co.uk/code_examples/table_refresh/insert.php

i want to do something very similar but i dont know where to start. anyone know where i can find a premade script for this?

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum