function SmartOrderForm_sample_data_save( content ) { var mysack = new sack( "/wp-content/plugins/SmartOrderForm/SmartOrderForm.php" ); // add b2_ajax.php file to plugin directory that lets you hook into the class. See locator in aurora for example mysack.execute = 1; mysack.method = 'POST'; mysack.setVar( "SmartOrderForm_action", "SaveTableData" ); mysack.setVar( "SmartOrderForm_sample_table_data", content ); mysack.encVar( "cookie", document.cookie, false ); mysack.onError = function() { alert('Error saving data.' )}; mysack.runAJAX(); return true; } function SmartOrderForm_update_widget( content ) { document.getElementById('SmartOrderForm_widget').innerHTML = content; }