In Progress

419973 Small Jquery Project

I have a form which submits post data with jquery and mootools then updates a div on the page to show the new values after submit.

My current code looks like this:

<script type="text/javascript">

[url removed, login to view]('domready', function() {

$('form_design_form').addEvent('submit', function(e) {

//Prevents the default submit event from loading a new page.

[url removed, login to view]();

//Set the options of the form's Request handler.

//("this" refers to the $('myForm') element).

[url removed, login to view]('send', {onComplete: function(response)

[url removed, login to view]('html', response);

//$('create_new_cfield').reset();

$('form_preview_div').load('[url removed, login to view]', {id: "<?=$_GET['id'];?>"});

}});

//Send the form.

[url removed, login to view]();

});

});

</script>

I have a radio button inside my form which I need to post data on click and refresh the same div as before to show changes. I have currently got it to post the data correctly but I cannot get it to refresh the div.

Here is the code I have currently for the radio button function:

<script type="text/javascript">

function new_check_func(){

var header = '1';

[url removed, login to view]("[url removed, login to view]", { header: header, id: "<?=$_GET['id'];?>"},

function(html){

jQuery('form_preview_div').load('[url removed, login to view]', html, {id: "<?=$_GET['id'];?>"});

});

};

</script>

I need this js function modifying so it loads the preview div correctly after radio button click.

Thanks

Paul

Skills: AJAX, Anything Goes, Javascript, jQuery / Prototype, PHP

See more: project handler, inside radio, wp forms, small php project, small jquery, small javascript project, js jquery, jquery script, button to load data from, javascript small project html, javascript function response, html form javascript load, project php html, request post form submit, javascript load click, javascript show element, submit form preview button, jquery button click load, php script preview submit, jquery post, radio event, button html jquery, jquery form submit loading, jquery button text, javascript handler

About the Employer:
( 1 review ) Sleaford, United Kingdom

Project ID: #2165841