Résolu Enlever l'espace entre deux éléments.

Statut
N'est pas ouverte pour d'autres réponses.

LapiinusMagix

Membre
Inscription
2 Septembre 2014
Messages
68
Réactions
1
Points
85
RGCoins
25
Bonsoir ( ou bonjour :D) !
Je voulais vous demander si il y a quelqu'un parmi vous qui serai m'aider...
En gros, je code mon site en HTML et et CSS et jusqu'a maintenant tout allaient bien, mais j'ai un problème...
J'ai un GRAND espacement entre 2 éléments: un bouton et un inputbox. Je voudrais enlever cette espacement en le mettant plus petit.
HTML:
Code:
<?
//atoChat script
//Version: 0.5
//Author: atomiku (http://atomiku.com/)
    include("config.php");
?>
<html>
    <head>
    <title>TheOwnerAnonyme</title>
<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon">
<link rel="icon" href="/favicon.ico" type="image/x-icon">
    <link rel="stylesheet" type="text/css" href="themes/style_<? echo $theme; ?>.css">
    </head>

<center><img src="titre.gif"></center>

    <body onbeforeunload="quit();">
        <table style="width:100%;height:100%;" cellspacing="0" cellpadding="0"><tr><td align="center" valign="middle">
            <table style="width:1px;height:1px;" cellspacing="0" cellpadding="2">
                <tr>

                    <td colspan="2" style="width:590px;">
                        <p id="chat" style="width:590px;height:300px;<? echo $chatscrollbar ? "overflow-y:auto;" : "overflow-y:hidden;"; ?>overflow-x:hidden;">
                        <table id="enternamecontainer" style="width:100%;height:100%;" cellspacing="0" cellpadding="0"><tr><td align="center" valign="middle">
                            <table id="entername" cellspacing="0" cellpadding="2" style="width:10px;height:10px;">
                                <tr>
                                    <td colspan="2" style="text-align:center;">
                                        <B>Entrez votre pseudo:</B>
                                    </td>
                                </tr>

                                <tr>
                                    <td colspan="2" style="width:300px;">
                                        <input id="n" style="width:300px;" maxlength="9">
                                    </td>
                                </tr>
                               
                                <tr>
                                    <td colspan="2" id="passtd" style="width:300px;display:none;text-align:center;">
                                                                                         <B>Entrer votre mot de passe:</B>
                                        <input id="p" style="width:300px;" type="password">
                                    </td>
                                </tr>
                               
                                <tr>

                                    <td style="width:100px;text-align:center;">
                                        <select id="c" style="width:100px;height:36px;">
                                            <option value="1" class="name_blue">Bleu</option>
                                            <option value="2" class="name_pink">Rose</option>
                                            <option value="3" class="name_green">Vert</option>
                                            <option value="4" class="name_purple">Violet</option>
                                            <option value="5" class="name_orange">Orange</option>

                                        </select>
                                    </td>
                                    <td style="width:80px;">
                                        <input id="loginbutton" type="button" onclick="javascript:activatechat();" style="width:80px;" value="Entrer">
                                    </td>
                                </tr>
                                <tr>
                                    <td id="errortd" colspan="2" style="display:none;text-align:center;width:150px;">
                                        <span id="errormsg" class="name_red" style="font-weight:bold;"></span>
                                    </td>
                                </tr>
                            </table>

                        </td></tr></table>
                        <table id="chattable" cellspacing="0" cellpadding="2" style="display:none;width:100%;">
                            <tbody>
                            </tbody>
                        </table>
                        </p>
                    </td>
                    <td valign="top">
                        <p id="nicklist" style="height:300px;width:100px;overflow-y:auto;overflow-x:hidden;text-align:left;">

                        </p>
                    </td>
                </tr>
                <tr>
                    <td colspan="2" style="width:590px;height:1px;">
                        <input id="m" style="width:100%;" maxlength="140" onkeydown="keydown(event.keyCode);" onkeyup="keyup(event.keyCode);" disabled="true" autocomplete="off">
                    </td>
                    <td align="center" valign="middle">
                        <a class="helplink" href="javascript:popuphelp();"><B>Aide</B></a>
                    </td>
                </tr>
            </table>
        </td></tr></table>
<script type="text/javascript">
/////////////////////////////////////
//atoChat
//Version: 0.5
//Author: atomiku (http://atomiku.com/)
/////////////////////////////////////

var waittime = 500;
var xmlHttp1;
var xmlHttp2;
var xmlHttp4;
var nick;
var color;
var pass;
var candie = 0;
var flood = 0;

var history_lines=new Array();
var history_now=-1;

function URLEncode (clearString) {
  var output = '';
  var x = 0;
  clearString = clearString.toString();
  var regex = /(^[a-zA-Z0-9_.]*)/;
  while (x < clearString.length) {
    var match = regex.exec(clearString.substr(x));
    if (match != null && match.length > 1 && match[1] != '') {
        output += match[1];
      x += match[1].length;
    } else {
      if (clearString[x] == ' ')
        output += '+';
      else {
        var charCode = clearString.charCodeAt(x);
        var hexVal = charCode.toString(16);
        output += '%' + hexVal.toUpperCase();
      }
      x++;
    }
  }
  return output;
}

function trim(s) {
    var l=0; var r=s.length -1;
    while(l < s.length && s[l] == ' ')
    {    l++; }
    while(r > l && s[r] == ' ')
    {    r-=1;    }
    return s.substring(l, r+1);
}

function ajaxrecv(url) {
    xmlHttp1 = new GetXmlHttpObject();
    if (xmlHttp1 == null) {
        //alert ("Your browser does not support AJAX!");
        return;
    }
    xmlHttp1.onreadystatechange=handlerecv;
    xmlHttp1.open("GET",url,true);
    xmlHttp1.send(null);
}

function ajaxsend(url) {
    xmlHttp2 = new GetXmlHttpObject();
    if (xmlHttp2 == null) {
        //alert ("Your browser does not support AJAX!");
        return;
    }
    xmlHttp2.open("GET",url,true);
    xmlHttp2.send(null);
}

function quit() {
    xmlHttp4 = new GetXmlHttpObject();
    if (xmlHttp4 == null) {
        //alert ("Your browser does not support AJAX!");
        return;
    }
    xmlHttp4.open("GET","chat.php?z=endsession",true);
    xmlHttp4.send(null);
}

function ajaxchecknick() {
    document.getElementById("loginbutton").disabled=true;
    xmlHttp4 = new GetXmlHttpObject();
    if (xmlHttp4 == null) {
        //alert ("Your browser does not support AJAX!");
        return;
    }
    xmlHttp4.onreadystatechange=handlenickcheck;
    xmlHttp4.open("GET","chat.php?z=checknick&n=" + nick + "&c=" + color + "&p=" + pass,true);
    xmlHttp4.send(null);
}

function chat() {
    ajaxrecv("chat.php?z=read");
}

function handlerecv() {
    if (candie == 1) {
        return;
    }
    if (xmlHttp1.readyState == 4) {
        //This segment is from XHTML live chat by alexander kohlhofer
        results = xmlHttp1.responseText.split(String.fromCharCode(1));
        if (results.length > 4) {
            for(i=0;i < (results.length-1);i=i+5) { //goes through the result one message at a time
                if (results[i+2] == "<i>COMMAND</i>") {
                    if (results[i+4] == "KICK") {
                        reset();
                        alert("Vous vous etes fait expulse.");
                    }
                    else if (results[i+4] == "BAN") {
                        reset();
                        alert("Vous etes banni.");
                    }
                    else if (results[i+4] == "MUTE") {
                        document.getElementById("m").disabled=true;
                    }
                    else if (results[i+4] == "UNMUTE") {
                        document.getElementById("m").disabled=false;
                    }
                    else {
                        var splitdata = results[i+4].split("|");
                        if (splitdata[0] == "LIST") {
                            var nickbuffer = "";
                            for(z=1;z < (splitdata.length -1);z=z+2) {
                                nickbuffer = nickbuffer + "<span class='" + splitdata[z] + "'>" + splitdata[z+1] + "</span><br>";
                            }       
                            document.getElementById("nicklist").innerHTML = nickbuffer;
                        }
                    }
                }
                else {
                    if (results[i] == "PM") {
                        insertNewLine(results[i+1],results[i+2],results[i+3],results[i+4]); //inserts the new content into the page
                    }
                    else {
                        insertNewLine(results[i+1],results[i+2],results[i+3],results[i+4]); //inserts the new content into the page
                    }
                }
            }
        }
        //End segment
        setTimeout("chat()", waittime);
    }
}

function reset() {
    candie = 1;
    document.getElementById("errormsg").innerHTML = "";
    document.getElementById("errortd").style.display = "none";
    document.getElementById("enternamecontainer").style.display = "table";
    document.getElementById("chattable").style.display = "none";
    document.getElementById("nicklist").innerHTML = "";
    document.getElementById("chattable").innerHTML = "<tbody></tbody>";
    document.getElementById("m").disabled=true;
}

function handlenickcheck() {
    var nickbuffer = "";
    if (xmlHttp4.readyState == 4) {
        document.getElementById("loginbutton").disabled=false;
        results = xmlHttp4.responseText;
        if (results == "1") {
            document.getElementById("errormsg").innerHTML = "Le pseudo est utilise.";
            document.getElementById("errortd").style.display = "";
            document.getElementById("passtd").style.display = "none";
        }
        else if (results == "2") {
            document.getElementById("errormsg").innerHTML = "Vous etes deja connecte.";
            document.getElementById("errortd").style.display = "";
            document.getElementById("passtd").style.display = "none";
        }
        else if (results == "3") {
            document.getElementById("errormsg").innerHTML = "Vous etes banni.";
            document.getElementById("errortd").style.display = "";
            document.getElementById("passtd").style.display = "none";
        }
        else if (results == "4") {
            document.getElementById("errormsg").innerHTML = "Pseudo invalide.";
            document.getElementById("errortd").style.display = "";
            document.getElementById("passtd").style.display = "none";
        }
        else if (results == "5") {
            document.getElementById("errormsg").innerHTML = "Les gros mots ne sont pas autorise dans votre pseudo.";
            document.getElementById("errortd").style.display = "";
            document.getElementById("passtd").style.display = "none";
        }
        else if (results == "7") {
            document.getElementById("errormsg").innerHTML = "Mauvais mot de passe.";
            document.getElementById("errortd").style.display = "";
            document.getElementById("passtd").style.display = "";
        }
        else if (results == "8") {
            document.getElementById("errormsg").innerHTML = "Le pseudo est enregistre, veuillez entrer votre mot de passe.";
            document.getElementById("errortd").style.display = "";
            document.getElementById("passtd").style.display = "";
        }
        else if (results == "9") {
            document.getElementById("errormsg").innerHTML = "Couleur invalide.";
            document.getElementById("errortd").style.display = "";
        }
        else if (results == "10") {
            candie = 0;
            document.getElementById("enternamecontainer").style.display = "none";
            document.getElementById("chattable").style.display = "block";
            document.getElementById("m").disabled=false;
            //insertNewLine("System","name_red","Chargement...");
            chat();
        }
    }
}

function insertNewLine(time,name,color,message) {
    var tbody = document.getElementById("chattable").getElementsByTagName("tbody")[0];
    var row = document.createElement("TR");
    var timecell = document.createElement("TD");

    var currentTime = new Date()
    var hours = currentTime.getHours()
    var minutes = currentTime.getMinutes()
    var seconds = currentTime.getSeconds()
    if (hours < 10)
    hours = "0" + hours
    if (minutes < 10)
    minutes = "0" + minutes
    if (seconds < 10)
    seconds = "0" + seconds
   
    time = hours + ":" + minutes + ":" + seconds
   
    timecell.innerHTML = "<span class='time'>" + time + "</span>";
    timecell.style.width = "1px";
    var cell1 = document.createElement("TD");
    cell1.innerHTML = "<span class='" + color + "'>" + name + "</span>";
    cell1.style.width = "1px";
    cell1.style.textAlign = "right";
    var cell2 = document.createElement("TD");
    cell2.innerHTML = "<div style='width:100%;overflow-x:hidden;'>" + message + "</div>";
    <? if ($timestamps) { ?>
        row.appendChild(timecell);
    <? } ?>
    row.appendChild(cell1);
    row.appendChild(cell2);
    tbody.appendChild(row);
    document.getElementById("chat").scrollTop = document.getElementById("chat").scrollHeight;
}

function GetXmlHttpObject() {
    var xmlHttp = null;
    try {
      // Firefox, Opera 8.0+, Safari
      xmlHttp = new XMLHttpRequest();
    }
    catch (e) {
        // Internet Explorer
        try {
            xmlHttp = new ActiveXObject("Msxml2.XMLHTTP");
        }
        catch (e) {
            xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
        }
    }
    return xmlHttp;
}

function floodcontrol() {
    flood = 1;
    setTimeout("flood = 0", 3000);
}

function addMsg() {
    msg = trim(document.getElementById("m").value);
   
    if (msg == "") {
        return;
    }
   
    if (flood == 1) {
        insertNewLine("","System","name_red","Vous pouvez envoyer un message toute les 3 secondes !")
        return;
    }
   
    history_lines.push(msg);
    history_now=-1;
   
    <? if ($floodcontrol) { ?>
    floodcontrol();
    <? } ?>
   
    msg = msg.replace(/\+/g, '%2B')
    msg = URLEncode(msg);
   
    document.getElementById("m").value = "";
    ajaxsend("chat.php?z=addmsg&m=" + msg);
}

function keyup(key) {
    if (key == 13) addMsg();
}
function keydown(key) {
    if (history_now != -1 && key == 40) {
        if (history_now >= history_lines.length-1) document.getElementById('m').value='';
        else { history_now++; document.getElementById('m').value=history_lines[history_now]; }
    }
    else if (key == 38) {
        if (history_now == -1) {history_now=history_lines.length-1; document.getElementById('m').value=history_lines[history_now];}
        else if (history_now > 0) { history_now--; document.getElementById('m').value=history_lines[history_now]; }
    }
}

function addsmiley(smiley) {
    document.getElementById("m").value = document.getElementById("m").value + smiley;
}

function popuphelp() {
    var helpwindow = window.open('help.php','smilies','resizable=no,scrollbars=yes,width=350,height=400');
}

function activatechat() {
    nick = document.getElementById("n").value;
    var dropdownIndex = document.getElementById('c').selectedIndex;
    color = document.getElementById('c')[dropdownIndex].value;
    pass = document.getElementById("p").value;
   
    if (nick == "") {
        alert("Entez un pseudo.");
        return;
    }
    if (color == "") {
        alert("Entrer une couleur.");
        return;
    }
   
    ajaxchecknick();
}
</script>

<center><input type="button" style="width:500;height:50;font-size:20px;font-weight:blink;text-decoration: blink; name="lien" value="Clique pour aller à la page des Lobbys !"
onclick="window.open('http://www.hakunaslobby.weebly.com')"onclick></center>


<center><h5><img src="modo.gif"></h5></center>

   
<center><a href="https://ws.youpass.com/box/y7rvnEbUpA/6DcXxWD2Hm" _target="blank"><img src="https://static.youpass.com/frontend/images/payment-button/payment-button-white-big.png" alt="page"></a></center>

<h7>&nbsp;</h7>
<hr width="25%" color="white">

<h8>&nbsp;</h8>

<center><a href="http://www.facebook.com/theowneranonyme"><img src="http://www.facebook.com/images/fb_icon_325x325.png" height="50" width="50" alt= "facebook"></a></center>

<center><h6><img src="by.gif"></h6></center>

    </body>
</html>

CSS:
Code:
body{
background-repeat:no-repeat;
background-position:center;
background-image:url(http://image.noelshack.com/fichiers/2015/11/1425923688-back.jpg);
margin:1px;
padding:1px;}

input,p,select,.helplink,.divbox{
background-color:#FFF;
border:2px solid #000;
border-radius: 7px;
padding:1;
margin:1;
background-attachment: fixed}

body,input,p,td,select,.helplink{
font-family:Verdana;
font-size:15px;
color:#000000;
border-radius: 7px;
padding:1;
margin:1;
background-attachment: fixed}

input,select{
height:36px;
border-radius: 7px;
padding:1;
margin:1;
background-attachment: fixed}

h1{
color:#00FFEF;
font-size:15px;
border-bottom:1px #CCC solid;
font-weight:700;
background-attachment: fixed}

h2{
color:#00FFEF;
font-size:13px;
font-weight:700;
margin:0;
background-attachment: fixed}

.helplink{
display:block;
width:100px;
height:30px;
border-radius: 7px;
padding:0;
margin:0;
text-align: center;
background-attachment: fixed}

.name_blue{
color:#06C;}

.name_pink{
color:#ff49b8;}
.name_green{
color:#0db600;}
.name_purple{
color:#7501b1;}
.name_orange{
color:#ff921e;}
.name_red{
color:#ff0000;}
.name_gray{
color:#CCCCCC;}
a,a:visited{
color:#06C;

text-decoration:none;}
a:hover{
color:#08F;
background-attachment: fixed}

.time{
color:#CCCCCC;
background-attachment: fixed}

.lien {
border-radius: 7px;
margin-bottom: 10px;
margin:0px;
padding:0px;
display: inline-block;}


h5{
font-family:Verdana;
color:#00FFEF;
font-size:20px;
background-attachment: fixed;
margin-top: 100px;
margin: 10;
padding: 10;}

h6{
font-family:Verdana;
color:#00FFEF;
font-size:30px;
background-attachment: fixed;
margin: 10;
padding: 10;}


.page{
background-attachment: fixed;
margin-bottom: 10px;
margin: 10;
padding: 10;}

padding:5;
margin:5;
float: top;
font-size: 2rem;
background-attachment: fixed;
display: inline-block;}

Le site:

1425930107-2.png

1425930107-1.png


Merci à celui qui m'aidera...
Ciao :)
 
Salut,

J'ai une technique mais je ne sais pas si sa va marcher :/

Tu met --!>ligne de code<-- (fin de la ligne)

Et tout sa jusqu'à la fin du "groupe de code"
 
Salut,

Première c'est plutôt une mauvaise idée pour ta structure de faire avec des tableaux... ;)

Bonne soirée,
Grégory
 
Bonsoir ( ou bonjour :D) !
Je voulais vous demander si il y a quelqu'un parmi vous qui serai m'aider...
En gros, je code mon site en HTML et et CSS et jusqu'a maintenant tout allaient bien, mais j'ai un problème...
J'ai un GRAND espacement entre 2 éléments: un bouton et un inputbox. Je voudrais enlever cette espacement en le mettant plus petit.
HTML:
Code:
<?
//atoChat script
//Version: 0.5
//Author: atomiku (http://atomiku.com/)
    include("config.php");
?>
<html>
    <head>
    <title>TheOwnerAnonyme</title>
<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon">
<link rel="icon" href="/favicon.ico" type="image/x-icon">
    <link rel="stylesheet" type="text/css" href="themes/style_<? echo $theme; ?>.css">
    </head>

<center><img src="titre.gif"></center>

    <body onbeforeunload="quit();">
        <table style="width:100%;height:100%;" cellspacing="0" cellpadding="0"><tr><td align="center" valign="middle">
            <table style="width:1px;height:1px;" cellspacing="0" cellpadding="2">
                <tr>

                    <td colspan="2" style="width:590px;">
                        <p id="chat" style="width:590px;height:300px;<? echo $chatscrollbar ? "overflow-y:auto;" : "overflow-y:hidden;"; ?>overflow-x:hidden;">
                        <table id="enternamecontainer" style="width:100%;height:100%;" cellspacing="0" cellpadding="0"><tr><td align="center" valign="middle">
                            <table id="entername" cellspacing="0" cellpadding="2" style="width:10px;height:10px;">
                                <tr>
                                    <td colspan="2" style="text-align:center;">
                                        <B>Entrez votre pseudo:</B>
                                    </td>
                                </tr>

                                <tr>
                                    <td colspan="2" style="width:300px;">
                                        <input id="n" style="width:300px;" maxlength="9">
                                    </td>
                                </tr>
                              
                                <tr>
                                    <td colspan="2" id="passtd" style="width:300px;display:none;text-align:center;">
                                                                                         <B>Entrer votre mot de passe:</B>
                                        <input id="p" style="width:300px;" type="password">
                                    </td>
                                </tr>
                              
                                <tr>

                                    <td style="width:100px;text-align:center;">
                                        <select id="c" style="width:100px;height:36px;">
                                            <option value="1" class="name_blue">Bleu</option>
                                            <option value="2" class="name_pink">Rose</option>
                                            <option value="3" class="name_green">Vert</option>
                                            <option value="4" class="name_purple">Violet</option>
                                            <option value="5" class="name_orange">Orange</option>

                                        </select>
                                    </td>
                                    <td style="width:80px;">
                                        <input id="loginbutton" type="button" onclick="javascript:activatechat();" style="width:80px;" value="Entrer">
                                    </td>
                                </tr>
                                <tr>
                                    <td id="errortd" colspan="2" style="display:none;text-align:center;width:150px;">
                                        <span id="errormsg" class="name_red" style="font-weight:bold;"></span>
                                    </td>
                                </tr>
                            </table>

                        </td></tr></table>
                        <table id="chattable" cellspacing="0" cellpadding="2" style="display:none;width:100%;">
                            <tbody>
                            </tbody>
                        </table>
                        </p>
                    </td>
                    <td valign="top">
                        <p id="nicklist" style="height:300px;width:100px;overflow-y:auto;overflow-x:hidden;text-align:left;">

                        </p>
                    </td>
                </tr>
                <tr>
                    <td colspan="2" style="width:590px;height:1px;">
                        <input id="m" style="width:100%;" maxlength="140" onkeydown="keydown(event.keyCode);" onkeyup="keyup(event.keyCode);" disabled="true" autocomplete="off">
                    </td>
                    <td align="center" valign="middle">
                        <a class="helplink" href="javascript:popuphelp();"><B>Aide</B></a>
                    </td>
                </tr>
            </table>
        </td></tr></table>
<script type="text/javascript">
/////////////////////////////////////
//atoChat
//Version: 0.5
//Author: atomiku (http://atomiku.com/)
/////////////////////////////////////

var waittime = 500;
var xmlHttp1;
var xmlHttp2;
var xmlHttp4;
var nick;
var color;
var pass;
var candie = 0;
var flood = 0;

var history_lines=new Array();
var history_now=-1;

function URLEncode (clearString) {
  var output = '';
  var x = 0;
  clearString = clearString.toString();
  var regex = /(^[a-zA-Z0-9_.]*)/;
  while (x < clearString.length) {
    var match = regex.exec(clearString.substr(x));
    if (match != null && match.length > 1 && match[1] != '') {
        output += match[1];
      x += match[1].length;
    } else {
      if (clearString[x] == ' ')
        output += '+';
      else {
        var charCode = clearString.charCodeAt(x);
        var hexVal = charCode.toString(16);
        output += '%' + hexVal.toUpperCase();
      }
      x++;
    }
  }
  return output;
}

function trim(s) {
    var l=0; var r=s.length -1;
    while(l < s.length && s[l] == ' ')
    {    l++; }
    while(r > l && s[r] == ' ')
    {    r-=1;    }
    return s.substring(l, r+1);
}

function ajaxrecv(url) {
    xmlHttp1 = new GetXmlHttpObject();
    if (xmlHttp1 == null) {
        //alert ("Your browser does not support AJAX!");
        return;
    }
    xmlHttp1.onreadystatechange=handlerecv;
    xmlHttp1.open("GET",url,true);
    xmlHttp1.send(null);
}

function ajaxsend(url) {
    xmlHttp2 = new GetXmlHttpObject();
    if (xmlHttp2 == null) {
        //alert ("Your browser does not support AJAX!");
        return;
    }
    xmlHttp2.open("GET",url,true);
    xmlHttp2.send(null);
}

function quit() {
    xmlHttp4 = new GetXmlHttpObject();
    if (xmlHttp4 == null) {
        //alert ("Your browser does not support AJAX!");
        return;
    }
    xmlHttp4.open("GET","chat.php?z=endsession",true);
    xmlHttp4.send(null);
}

function ajaxchecknick() {
    document.getElementById("loginbutton").disabled=true;
    xmlHttp4 = new GetXmlHttpObject();
    if (xmlHttp4 == null) {
        //alert ("Your browser does not support AJAX!");
        return;
    }
    xmlHttp4.onreadystatechange=handlenickcheck;
    xmlHttp4.open("GET","chat.php?z=checknick&n=" + nick + "&c=" + color + "&p=" + pass,true);
    xmlHttp4.send(null);
}

function chat() {
    ajaxrecv("chat.php?z=read");
}

function handlerecv() {
    if (candie == 1) {
        return;
    }
    if (xmlHttp1.readyState == 4) {
        //This segment is from XHTML live chat by alexander kohlhofer
        results = xmlHttp1.responseText.split(String.fromCharCode(1));
        if (results.length > 4) {
            for(i=0;i < (results.length-1);i=i+5) { //goes through the result one message at a time
                if (results[i+2] == "<i>COMMAND</i>") {
                    if (results[i+4] == "KICK") {
                        reset();
                        alert("Vous vous etes fait expulse.");
                    }
                    else if (results[i+4] == "BAN") {
                        reset();
                        alert("Vous etes banni.");
                    }
                    else if (results[i+4] == "MUTE") {
                        document.getElementById("m").disabled=true;
                    }
                    else if (results[i+4] == "UNMUTE") {
                        document.getElementById("m").disabled=false;
                    }
                    else {
                        var splitdata = results[i+4].split("|");
                        if (splitdata[0] == "LIST") {
                            var nickbuffer = "";
                            for(z=1;z < (splitdata.length -1);z=z+2) {
                                nickbuffer = nickbuffer + "<span class='" + splitdata[z] + "'>" + splitdata[z+1] + "</span><br>";
                            }      
                            document.getElementById("nicklist").innerHTML = nickbuffer;
                        }
                    }
                }
                else {
                    if (results[i] == "PM") {
                        insertNewLine(results[i+1],results[i+2],results[i+3],results[i+4]); //inserts the new content into the page
                    }
                    else {
                        insertNewLine(results[i+1],results[i+2],results[i+3],results[i+4]); //inserts the new content into the page
                    }
                }
            }
        }
        //End segment
        setTimeout("chat()", waittime);
    }
}

function reset() {
    candie = 1;
    document.getElementById("errormsg").innerHTML = "";
    document.getElementById("errortd").style.display = "none";
    document.getElementById("enternamecontainer").style.display = "table";
    document.getElementById("chattable").style.display = "none";
    document.getElementById("nicklist").innerHTML = "";
    document.getElementById("chattable").innerHTML = "<tbody></tbody>";
    document.getElementById("m").disabled=true;
}

function handlenickcheck() {
    var nickbuffer = "";
    if (xmlHttp4.readyState == 4) {
        document.getElementById("loginbutton").disabled=false;
        results = xmlHttp4.responseText;
        if (results == "1") {
            document.getElementById("errormsg").innerHTML = "Le pseudo est utilise.";
            document.getElementById("errortd").style.display = "";
            document.getElementById("passtd").style.display = "none";
        }
        else if (results == "2") {
            document.getElementById("errormsg").innerHTML = "Vous etes deja connecte.";
            document.getElementById("errortd").style.display = "";
            document.getElementById("passtd").style.display = "none";
        }
        else if (results == "3") {
            document.getElementById("errormsg").innerHTML = "Vous etes banni.";
            document.getElementById("errortd").style.display = "";
            document.getElementById("passtd").style.display = "none";
        }
        else if (results == "4") {
            document.getElementById("errormsg").innerHTML = "Pseudo invalide.";
            document.getElementById("errortd").style.display = "";
            document.getElementById("passtd").style.display = "none";
        }
        else if (results == "5") {
            document.getElementById("errormsg").innerHTML = "Les gros mots ne sont pas autorise dans votre pseudo.";
            document.getElementById("errortd").style.display = "";
            document.getElementById("passtd").style.display = "none";
        }
        else if (results == "7") {
            document.getElementById("errormsg").innerHTML = "Mauvais mot de passe.";
            document.getElementById("errortd").style.display = "";
            document.getElementById("passtd").style.display = "";
        }
        else if (results == "8") {
            document.getElementById("errormsg").innerHTML = "Le pseudo est enregistre, veuillez entrer votre mot de passe.";
            document.getElementById("errortd").style.display = "";
            document.getElementById("passtd").style.display = "";
        }
        else if (results == "9") {
            document.getElementById("errormsg").innerHTML = "Couleur invalide.";
            document.getElementById("errortd").style.display = "";
        }
        else if (results == "10") {
            candie = 0;
            document.getElementById("enternamecontainer").style.display = "none";
            document.getElementById("chattable").style.display = "block";
            document.getElementById("m").disabled=false;
            //insertNewLine("System","name_red","Chargement...");
            chat();
        }
    }
}

function insertNewLine(time,name,color,message) {
    var tbody = document.getElementById("chattable").getElementsByTagName("tbody")[0];
    var row = document.createElement("TR");
    var timecell = document.createElement("TD");

    var currentTime = new Date()
    var hours = currentTime.getHours()
    var minutes = currentTime.getMinutes()
    var seconds = currentTime.getSeconds()
    if (hours < 10)
    hours = "0" + hours
    if (minutes < 10)
    minutes = "0" + minutes
    if (seconds < 10)
    seconds = "0" + seconds
  
    time = hours + ":" + minutes + ":" + seconds
  
    timecell.innerHTML = "<span class='time'>" + time + "</span>";
    timecell.style.width = "1px";
    var cell1 = document.createElement("TD");
    cell1.innerHTML = "<span class='" + color + "'>" + name + "</span>";
    cell1.style.width = "1px";
    cell1.style.textAlign = "right";
    var cell2 = document.createElement("TD");
    cell2.innerHTML = "<div style='width:100%;overflow-x:hidden;'>" + message + "</div>";
    <? if ($timestamps) { ?>
        row.appendChild(timecell);
    <? } ?>
    row.appendChild(cell1);
    row.appendChild(cell2);
    tbody.appendChild(row);
    document.getElementById("chat").scrollTop = document.getElementById("chat").scrollHeight;
}

function GetXmlHttpObject() {
    var xmlHttp = null;
    try {
      // Firefox, Opera 8.0+, Safari
      xmlHttp = new XMLHttpRequest();
    }
    catch (e) {
        // Internet Explorer
        try {
            xmlHttp = new ActiveXObject("Msxml2.XMLHTTP");
        }
        catch (e) {
            xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
        }
    }
    return xmlHttp;
}

function floodcontrol() {
    flood = 1;
    setTimeout("flood = 0", 3000);
}

function addMsg() {
    msg = trim(document.getElementById("m").value);
  
    if (msg == "") {
        return;
    }
  
    if (flood == 1) {
        insertNewLine("","System","name_red","Vous pouvez envoyer un message toute les 3 secondes !")
        return;
    }
  
    history_lines.push(msg);
    history_now=-1;
  
    <? if ($floodcontrol) { ?>
    floodcontrol();
    <? } ?>
  
    msg = msg.replace(/\+/g, '%2B')
    msg = URLEncode(msg);
  
    document.getElementById("m").value = "";
    ajaxsend("chat.php?z=addmsg&m=" + msg);
}

function keyup(key) {
    if (key == 13) addMsg();
}
function keydown(key) {
    if (history_now != -1 && key == 40) {
        if (history_now >= history_lines.length-1) document.getElementById('m').value='';
        else { history_now++; document.getElementById('m').value=history_lines[history_now]; }
    }
    else if (key == 38) {
        if (history_now == -1) {history_now=history_lines.length-1; document.getElementById('m').value=history_lines[history_now];}
        else if (history_now > 0) { history_now--; document.getElementById('m').value=history_lines[history_now]; }
    }
}

function addsmiley(smiley) {
    document.getElementById("m").value = document.getElementById("m").value + smiley;
}

function popuphelp() {
    var helpwindow = window.open('help.php','smilies','resizable=no,scrollbars=yes,width=350,height=400');
}

function activatechat() {
    nick = document.getElementById("n").value;
    var dropdownIndex = document.getElementById('c').selectedIndex;
    color = document.getElementById('c')[dropdownIndex].value;
    pass = document.getElementById("p").value;
  
    if (nick == "") {
        alert("Entez un pseudo.");
        return;
    }
    if (color == "") {
        alert("Entrer une couleur.");
        return;
    }
  
    ajaxchecknick();
}
</script>

<center><input type="button" style="width:500;height:50;font-size:20px;font-weight:blink;text-decoration: blink; name="lien" value="Clique pour aller à la page des Lobbys !"
onclick="window.open('http://www.hakunaslobby.weebly.com')"onclick></center>


<center><h5><img src="modo.gif"></h5></center>

  
<center><a href="https://ws.youpass.com/box/y7rvnEbUpA/6DcXxWD2Hm" _target="blank"><img src="https://static.youpass.com/frontend/images/payment-button/payment-button-white-big.png" alt="page"></a></center>

<h7>&nbsp;</h7>
<hr width="25%" color="white">

<h8>&nbsp;</h8>

<center><a href="http://www.facebook.com/theowneranonyme"><img src="http://www.facebook.com/images/fb_icon_325x325.png" height="50" width="50" alt= "facebook"></a></center>

<center><h6><img src="by.gif"></h6></center>

    </body>
</html>

CSS:
Code:
body{
background-repeat:no-repeat;
background-position:center;
background-image:url(http://image.noelshack.com/fichiers/2015/11/1425923688-back.jpg);
margin:1px;
padding:1px;}

input,p,select,.helplink,.divbox{
background-color:#FFF;
border:2px solid #000;
border-radius: 7px;
padding:1;
margin:1;
background-attachment: fixed}

body,input,p,td,select,.helplink{
font-family:Verdana;
font-size:15px;
color:#000000;
border-radius: 7px;
padding:1;
margin:1;
background-attachment: fixed}

input,select{
height:36px;
border-radius: 7px;
padding:1;
margin:1;
background-attachment: fixed}

h1{
color:#00FFEF;
font-size:15px;
border-bottom:1px #CCC solid;
font-weight:700;
background-attachment: fixed}

h2{
color:#00FFEF;
font-size:13px;
font-weight:700;
margin:0;
background-attachment: fixed}

.helplink{
display:block;
width:100px;
height:30px;
border-radius: 7px;
padding:0;
margin:0;
text-align: center;
background-attachment: fixed}

.name_blue{
color:#06C;}

.name_pink{
color:#ff49b8;}
.name_green{
color:#0db600;}
.name_purple{
color:#7501b1;}
.name_orange{
color:#ff921e;}
.name_red{
color:#ff0000;}
.name_gray{
color:#CCCCCC;}
a,a:visited{
color:#06C;

text-decoration:none;}
a:hover{
color:#08F;
background-attachment: fixed}

.time{
color:#CCCCCC;
background-attachment: fixed}

.lien {
border-radius: 7px;
margin-bottom: 10px;
margin:0px;
padding:0px;
display: inline-block;}


h5{
font-family:Verdana;
color:#00FFEF;
font-size:20px;
background-attachment: fixed;
margin-top: 100px;
margin: 10;
padding: 10;}

h6{
font-family:Verdana;
color:#00FFEF;
font-size:30px;
background-attachment: fixed;
margin: 10;
padding: 10;}


.page{
background-attachment: fixed;
margin-bottom: 10px;
margin: 10;
padding: 10;}

padding:5;
margin:5;
float: top;
font-size: 2rem;
background-attachment: fixed;
display: inline-block;}

Le site:

1425930107-2.png

1425930107-1.png


Merci à celui qui m'aidera...
Ciao :)
C'est toi qui fais des lobby sur le site ?
 
Merci je test WhiiTe et Grégory: enfaite j'ai pris un chat sur internet deja tout fais j'ai juste rajouté mes truc personnelles et j'ai editer le chat en Français :)
 
Statut
N'est pas ouverte pour d'autres réponses.
Retour
Haut