how to get input value with ajax and show it in php -
here input
<textarea id="mytext" class="txtarea" name="in_content" cols="120" rows="15"><?php echo $term;?></textarea>
here ajax code take value of textarea above
$('#spdf-form').submit(function() { $.ajax({ type: 'post', url: $(this).attr('action'), data: $(this).serialize(), success: function(data) { $('#spdf_results').html(data); $('#spdf-form').fadeout('slow'); var textareavalue = $("#mytext").text(); alert(textareavalue); } }) return false; });
it's works, , show value in alert popup. want show result php code. want insert value tinymce editor, , editor called this
<?php the_editor(''); ?>
so think should this
$myvalues = results ajax function
and call editor this
<?php the_editor($myvalues); ?>
but dont know how that, can me please? tried value directly didnt work also.
php server-side. javascript/jquery/ajax client-side. can't run php on same page after it's been sent client.
you'll need use ajax request editor code server, take editor code , insert page.
Comments
Post a Comment