hmmm
| urlkiller |
|
|---|---|
|
hmm... iam doing it the wrong way, i guess!
javascript:
$(document).ready(function()
{
$("#submiter").click(function(){
var message = $('#sendmessage').val();
ajaxSend({
url: 'plug.php?r=dashboard',
method: 'POST',
formId: 'myform'
})
alert(message);
$('#sendmessage').val('');
return false;
});
});
html
<form method="post" action="plug.php?r=dashboard" name="myform" id="myform" class="ajax" onsubmit="return false;">
<textarea class="minieditor" name="sendmessage" id="sendmessage"></textarea>
<input type="hidden" name="action" value="send">
<input type="hidden" name="gid" value="{WAVE_GID}">
<input type="hidden" name="uid" value="{WAVE_UID}">
<input type="hidden" name="cid" value="{WAVE_CID}">
<center><input type="submit" id="submiter" value="test send" style="padding:10px;font-size:18px;"></center>
</form>
*.ajax.php from my plugin
defined('SED_CODE') or die('Wrong URL');
$text = sed_import('sendmessage', 'P', 'TXT');
sed_sendheaders();
echo sed_post_parse(sed_parse($text));
ob_end_flush();
i simply dont get it to work. am i stupid or what? is there anyway where i can define the output div for the answer send back from the ajax.php part? (yes there are asome unused variables, iam just testing here so ignore them.) i simply want a form submit into a pre specified div box. the content should appear right after i pressed submit. any ideas? Added 52 seconds later: the ajax part seems to work well, it just dont show up in my "main" page div URL shortener: <a href="http://bbm.li/!7AD5C7">http://bbm.li/!7AD5C7</a>
|