|
|
Registered tutorials: 501 Registered Users: 29884
|
|
Rating: 0 out of 0 votes cast
Category: JavaScript Framework
|
How to dynamically create widgets using the DOM
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.
|
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
|