spacer
Web Development Blog
 Developer Newsletter

Webmaster Blogs
Content & Blogging
Design
Photoshop
General
JavaScript
PHP
PHP Functions
Web
WordPress
Website Promotion

Blog Archives


Developer Tutorials
AJAX
ASP
CGI & Perl
CSS
Flash
HTML
Illustrator
Java
JavaScript
Linux
MySQL
PHP
Photoshop
Python
Wireless
XML
Miscellaneous

Scripts Directory
AJAX Scripts
ASP Scripts
ASP.NET Scripts
CGI & Perl Scripts
Flash Scripts
Java Scripts
JavaScript Scripts
PHP Scripts
Python Scripts
Remotely Hosted Scripts
Tools & Utilities Scripts
XML Scripts

Web Hosting Directory
ASP.NET
Budget
Dedicated Servers
Ecommerce
Linux
Resellers
Shared
Small Business
Windows

Webmaster Blog

Creating facebook like popup dialog in your web app

If you are a Facebook application developer, you are certainly familiar with the dialog tool they provide for you. You can display HTML contents, a HTML block and set callback functions for default buttons. It is really very easy and enjoying to use the dialog component. But what if you want to use it in your local web application? There is no way you can import that component for your web app. So all you have to do is to create one from scratch.

But wait, there are some good people over there who already feel the pain and developed a facebook like dialog component for you. This component comes as a plugin of jQuery and works really cool. You can display static HTML contents as well as load external content via AJAX. You can find this component named “Facebox” by clicking here

Integrating Facebox with your site is easy. Just include the javascript file of jquery and facebox. And add the following script at the end of your page.

<script>
$(document).ready(function(){
$('a[@rel*=facebox]').facebox();
});
</script>

Lets have a look at the following example

1. To load an external page

<a href="http://www.google.com/logos/spring08.gif" rel="facebox">text</a>

2. To display static content

jquery.facebox("Here is some <b>static content</b>");

or

$.facebox("Here is some <b>static content</b>");

Thats it! you got a nice dialog component for your web application.


Related Posts
» Unexpected return value from Facebook FQL.query
» Open Source Social Networking Server: Built on LAMP!
» Designing and Coding a Wordpress Theme From Scratch (Part 6)
» Designing and Coding a Wordpress Theme From Scratch (Part 10)
» Understanding Scripting in Photoshop
 


Leave a Reply





About the NetVisits, Inc Network | Write For Us | Advertise
Copyright ©2007 NetVisits, Inc Network. All Rights Reserved. Privacy Policy.
Visit other NetVisits, Inc. sites: