Allright, so i got index html, and on the head of the document i got jquery already, and what i got is a form, and what i want it to do is that once the input is sumbmited, to post it on a list. BUt something is missing here or maybe im doing it wrong, i need some guidance plz.
here is my table:
and heres is the function that i have on the head, where what i try is to make it post on the list:
But is just not working :S .... any ideas/guidance? xD .
Btw, on the body, theres only that table above, and a " <ul id="wall"></ul> " , wich is where im trying the content to be posted on.
Any ideas where the flaw is ? =\
here is my table:
Code:
<form name="postbar_add_post" id="postbar_add_post" method="post"> <fieldset> <legend>Write text here ...</legend> <input type="text" name="addcontentbox" id="addcontentbox" /> <input type="button" name="addpost" value="Submit" class="submit" /> </fieldset> </form>
Code:
<script type="text/javascript"> $(document).ready(function(){ $("form#postbar_add_post").submit(function() { var message_wall = $('#addcontentbox').attr('value'); $.ajax({ type: "POST", data:"addcontentbox="+ addcontentbox, success: function(){ $("ul#wall").prepend("<li>"+addcontentbox+"</li>"); $("ul#wall li:first").fadeIn(); } }); return false; }); }); </script>
But is just not working :S .... any ideas/guidance? xD .
Btw, on the body, theres only that table above, and a " <ul id="wall"></ul> " , wich is where im trying the content to be posted on.
Any ideas where the flaw is ? =\
Comment