javascript - Ajax Add/Delete Database Store string -


http://snipt.org/zime8 | http://snipt.org/zimg1

i wrote basic add string app in ajax. i'm having hard time it.

what i'm trying able delete string if add one. how can wire submit button able delete string text?

is possible post string , have stored when refresh page stays on page?

html

<html>     <head>     <script type="text/javascript" src="http://code.jquery.com/jquery-latest.min.js"></script>     <script type="text/javascript" src="database.js"></script>     <style type="text/css">         label { text-align:center; }         body { background:#fff; font-size:18px; font-family:georgia;}         #datanumber { float:right; width:300px; margin:0 200px 0 0; }         ul { margin: 15px 0 0 100px; font-style:italic; font-decoration:underline; }         li { padding:10px;}     </style>     </head> <body>     <div id="datanumber">         <input type="text" id="message_wall" name="message_wall" />         <button id="submitbtn" type="submit">add new task</button>     </div>     <ul id="wall">          </ul>     <body> </html> 

jquery

$(document).ready(function(){    $('#submitbtn').click(function() {      var message_wall = $('#message_wall').val();     var $d=$("<li>"+message_wall+"</li>").fadein(500,function() {         $('#message_wall').val('');     });     $("ul#wall").prepend($d);    }); }); 

if me, appreciate it.

thank you


Comments

Popular posts from this blog

android - getbluetoothservice() called with no bluetoothmanagercallback -

sql - ASP.NET SqlDataSource, like on SelectCommand -

ios - Undefined symbols for architecture armv7: "_OBJC_CLASS_$_SSZipArchive" -