>All Tutorials 
Ajax and .NET Ajax and .NET RSS XML
Ajax and ColdFusion Ajax and ColdFusion RSS XML
Ajax and Java Ajax and Java RSS XML
Ajax and PHP Ajax and PHP RSS XML
Ajax and SOA Ajax and SOA RSS XML
Ajax Goodies Ajax Goodies RSS XML
Ajax Tool Ajax Tool RSS XML
Facebook MockAjax Facebook MockAjax RSS XML
Google Web Toolkit Google Web Toolkit RSS XML
JavaScript Framework JavaScript Framework RSS XML
Ruby on Rails Ruby on Rails RSS XML
Technique Introduction Technique Introduction RSS XML
Without XMLHttpRequest Without XMLHttpRequest RSS XML
Yahoo! UI Yahoo! UI RSS XML

How to dynamically create widgets using the DOM - widget part div widgets width function title font

 
Registered tutorials: 501
Registered Users: 29884



Rating: 0 out of 0 votes cast


  
Category: JavaScript Framework

How to dynamically create widgets using the DOM

Digg this   Post to del.icio.us

Abstract: Shows how create a widget dynamically from javascript

The HTML code is simple:
<style>
.widget{
	width: 250px;
	min-height: 50px;
	border: 1px solid #CACACA;
	background-color: #FFFFEA;
</style>
...
<body>
<div id='id1' class='widget' style='width: 250px;'>
	<div id='wdrag' style='width: 100%; height: 16; background-color: #CCCCFF; border-bottom: 1px solid #CACACA;'>
		<table id='d' style='font-family: arial; font-size: 8pt;' width=100% cellpadding=0 cellspacing=0 border=0>

			<tr>
				<td align=left><span id='id1_title' style='padding-left: 5px;'>Widget Title Bar</span></td>
				<td align=right> <span style='padding-right: 5px;'>
				<a href='#' style='text-decoration: none;'><b>X</b></a></span></td>

			</tr>
		</table>
	</div>
	<div id='id1_content' style='padding: 5px; font-family: arial; font-size: 8pt; width: 100%'>
	Widget Body (this is where the widget content is going to be placed)</div>
</div>

Our widgets have two parts, the title bar and the body. The title bar contains an HREF ('X') that we will soon use to trigger the closing of the widget.

Read Full Tutorial...



Reviews:

Rate and Review This Site

No reviews yet


Statistic Information About this Resource:


Total Hits: 55
Unique Hits: 46


  Daily Weekly Monthly
  Unique Total Unique Total Unique Total
Average 0.1 0.1 0.2 0.2 0.8 1.1
Current 0 0 0 0 1 1
Previous 0 0 1 1 0 0
Oct 13 0 0 0 0 1 1
Oct 12 0 0 0 0 2 3
Oct 11 1 1 0 0 2 3
Oct 10 0 0 0 0 0 0
Oct 9 0 0 0 0 0 0
Oct 8 0 0 1 1 1 1
Oct 7 0 0 0 0 1 2
Oct 6 0 0 0 0 0 0
Highest 2 2 3 5 7 8


Script Execution Time: 0.69286 | SQL Queries: 10 | Members: 501
Ajax Tutorial Top List - Powered by Aardvark Topsites PHP 5.1.2