Messaggio predefinito in TagBoard V.2.0

« Older   Newer »
 
  Share  
.
  1. Niccolo`
         
     
    .
    Avatar

    Senior Member

    Group
    Member
    Posts
    10,982
    Activity Level
    0

    Status
    Anonymous
    Ciobo, eccolo qua:
    SPOILER (click to view)
    HTML
    <script type="text/javascript"><!--
    //By DarkStyle ©
    tagMessage = "Testo, esempio : non spammate in tag! Leggete il regolamento, ecc.";
    tagTextInput = document.tagboard ? document.tagboard.ffmsg : 0;
    tagInput = document.tagboard ? document.tagboard.elements : 0;

    if(tagTextInput && tagMessage!="") {
    function modifyvalue() {
    if (tagTextInput.value == "") {
    tagTextInput.value = tagMessage;
    tagTextInput.style.fontStyle = "italic";
    tagTextInput.style.color = "808080";
    } }

    function resetvalue() {
    if (tagTextInput.value == tagMessage) {
    tagTextInput.value = "";
    tagTextInput.style.fontStyle = "normal";
    tagTextInput.style.color = "000000";
    } }

    tagTextInput.onmouseover = modifyvalue;
    tagTextInput.onmouseout = resetvalue;
    tagTextInput.onfocus = resetvalue;
    tagTextInput.onblur = resetvalue;
    for(i = 0; i <= tagInput.length; i++) { if(tagInput.item(i).className == 'codebuttons' && tagInput.item(i).type != 'submit') {tagInput.item(i).onfocus = resetvalue;} }
    for(j = 0; j <= tagInput.length; j++) {if(tagInput.item(j).type == 'submit' && tagInput.item(j).value != 'Aggiorna') {tagInput.item(j).onclick = function() {if(tagTextInput.value == tagMessage) return false} } }
    }
    // -->
    </script>

    Spero di aver capito ciņ che intendessi :fifi:
     
    Top
    .
52 replies since 30/4/2009, 14:04   7096 views
  Share  
.
Top