May
6

Facebook Style TextArea with Wall Posting Script using jQuery PHP and Ajax.

Author ZeeShaN    Category AJAX, Facebook, JQuery, PHP, Web Development     Tags

Here is a script for you to create facebook wall style post inserting techniques and expandable text area like facebook. I have used jquery-elastic
and watermarking plugin of jquery to create this awesome effects.

Fresh and more enhanced facebook style posting and comments system

Basically, i here is a simple text area example with ajax posting in facebook style.

Table Structure:

CREATE TABLE `facebook_posting` (
  `p_id` int(11) NOT NULL auto_increment,
  `f_name` varchar(50) NOT NULL,
  `post` varchar(255) NOT NULL,
  `f_image` varchar(50) NOT NULL,
  `date-created` datetime NOT NULL,
  PRIMARY KEY  (`p_id`)
)

Javascript Code: Ajax Call with Watermarking Text Area

$(document).ready(function(){	
 
	$('#shareButton').click(function(){
		var a = $("#watermark").val();
		$.post("posts.php?value="+a, {
		}, function(response){
			$('#emailInfo').fadeOut();
			$('#posting').html(unescape(response));
			$('#posting').fadeIn();
		});
	});
	$('textarea').elastic();
 
	jQuery(function($){
	   $("#watermark").Watermark("What's on your mind?");
	});
	jQuery(function($){
	   $("#watermark").Watermark("watermark","#369");
	});
	function UseData(){
	   $.Watermark.HideAll();
	   //Do Stuff
	   $.Watermark.ShowAll();
	}
});

Text Area HTML:

<form method="post">
<div class="UIComposer_Box">
	<span class="w">
		<textarea id="watermark" class="input" cols="60" name="watermark"></textarea>
	</span>
<div style="padding: 10px; height: 30px;">
			<label id="shareButton" class="uiButtonLarge uiButtonShare"> Share</label></div>
</div>
</form>

Add To Facebook Stumble This Digg This Add To Del.icio.us Add To Reddit Add To Yahoo Add To Twitter


Written by ZeeShaN

ZeeShaN RasooL is a web developer who loves to work in latest technologies to create more interactive dynamic and beautiful web pages.







Enter your Email:

Click Here for Popular

Who I Am

Zeeshan Rasool

Software Engineer - PHP
Lahore - Pakistan

zeeshan(@)99points.info
Skype: zeeshan-rasool
gTalk: zishan.rasool85

Categories

Tags

Comments