30 noviembre 2008

Imprimir o guardar página como PDF.


<a href="javascript:window.print()"><img src="http://img229.imageshack.us/im


<a href="http://savepageaspdf.pdfonline.com/pdfonline/pdfonline.asp?cURL=http

Otro cuadro de texto

Esta es otra presentación de cuadro de texto. Podrás obtener el código y a continuación el respectivo ejemplo.



<textarea
rows="5"
cols="50"
style="background-color: #ffffff; color: rgb(0, 0, 0);"
wrap="soft">ESCRIBIR AQUÍ EL TEXTO</textarea>






Este es el ejemplo:






29 noviembre 2008

Botón "REFRESCAR PÁGINA"

Con éste código podrás colocar un boton, como el que aparece en tu navegador, para refrescar ó actualizar tu página.


<a href="javascript:history.go(0)"><center>
<img src="http://i391.photobucket.com/albums/oo355/carjavi/refresh.png" alt="Photobucket - Video and Imagehosting"><br><br></center></a>





La parte donde dice "REFRESCAR PÁGINA" puedes sustituírla por una imágen. De todas maneras, en el código ya está uncluída y sólo tienes que hacer "copy-paste" y colocarla en tu página. De seguidas el ejemplo:



Photobucket - Video and Image Hosting






Convertidor de códigos RGB a Hexadecimal

Con éste código podrás colocar en tu página un convertidor de códigos RGB en código HTML hexadecimal. De ésta manera podrás mantener los mismos colores en tu página y en tus gráficos. Debe ser colocado entre las etiqueta <head> y </head>.
!-- Begin
function showRGB(f) {

red = f.red.value;

green = f.green.value;

blue = f.blue.value;

var hexarray= new Array(256);

hexarray[0]="00"; hexarray[1]="01"; hexarray[2]="02";

hexarray[3]="03"; hexarray[4]="04"; hexarray[5]="05";

hexarray[6]="06"; hexarray[7]="07"; hexarray[8]="08";

hexarray[9]="09"; hexarray[10]="0A"; hexarray[11]="0B";

hexarray[12]="0C"; hexarray[13]="0D"; hexarray[14]="0E";

hexarray[15]="0F"; hexarray[16]="10"; hexarray[17]="11";

hexarray[18]="12"; hexarray[19]="13"; hexarray[20]="14";

hexarray[21]="15"; hexarray[22]="16"; hexarray[23]="17";

hexarray[24]="18"; hexarray[25]="19"; hexarray[26]="1A";

hexarray[27]="1B"; hexarray[28]="1C"; hexarray[29]="1D";

hexarray[30]="1E"; hexarray[31]="1F"; hexarray[32]="20";

hexarray[33]="21"; hexarray[34]="22"; hexarray[35]="23";

hexarray[36]="24"; hexarray[37]="25"; hexarray[38]="26";

hexarray[39]="27"; hexarray[40]="28"; hexarray[41]="29";

hexarray[42]="2A"; hexarray[43]="2B"; hexarray[44]="2C";

hexarray[45]="2D"; hexarray[46]="2E"; hexarray[47]="2F";

hexarray[48]="30"; hexarray[49]="31"; hexarray[50]="32";

hexarray[51]="33"; hexarray[52]="34"; hexarray[53]="35";

hexarray[54]="36"; hexarray[55]="37"; hexarray[56]="38";

hexarray[57]="39"; hexarray[58]="3A"; hexarray[59]="3B";

hexarray[60]="3C"; hexarray[61]="3D"; hexarray[62]="3E";

hexarray[63]="3F"; hexarray[64]="40"; hexarray[65]="41";

hexarray[66]="42"; hexarray[67]="43"; hexarray[68]="44";

hexarray[69]="45"; hexarray[70]="46"; hexarray[71]="47";

hexarray[72]="48"; hexarray[73]="49"; hexarray[74]="4A";

hexarray[75]="4B"; hexarray[76]="4C"; hexarray[77]="4D";

hexarray[78]="4E"; hexarray[79]="4F"; hexarray[80]="50";

hexarray[81]="51"; hexarray[82]="52"; hexarray[83]="53";

hexarray[84]="54"; hexarray[85]="55"; hexarray[86]="56";

hexarray[87]="57"; hexarray[88]="58"; hexarray[89]="59";

hexarray[90]="5A"; hexarray[91]="5B"; hexarray[92]="5C";

hexarray[93]="5D"; hexarray[94]="5E"; hexarray[95]="6F";

hexarray[96]="60"; hexarray[97]="61"; hexarray[98]="62";

hexarray[99]="63"; hexarray[100]="64"; hexarray[101]="65";

hexarray[102]="66"; hexarray[103]="67"; hexarray[104]="68";

hexarray[105]="69"; hexarray[106]="6A"; hexarray[107]="6B";

hexarray[108]="6C"; hexarray[109]="6D"; hexarray[110]="6E";

hexarray[111]="6F"; hexarray[112]="70"; hexarray[113]="71";

hexarray[114]="72"; hexarray[115]="73"; hexarray[116]="74";

hexarray[117]="75"; hexarray[118]="76"; hexarray[119]="77";

hexarray[120]="78"; hexarray[121]="79"; hexarray[122]="7A";

hexarray[123]="7B"; hexarray[124]="7C"; hexarray[125]="7D";

hexarray[126]="7E"; hexarray[127]="7F"; hexarray[128]="80";

hexarray[129]="81"; hexarray[130]="82"; hexarray[131]="83";

hexarray[132]="84"; hexarray[133]="85"; hexarray[134]="86";

hexarray[135]="87"; hexarray[136]="88"; hexarray[137]="89";

hexarray[138]="8A"; hexarray[139]="8B"; hexarray[140]="8C";

hexarray[141]="8D"; hexarray[142]="8E"; hexarray[143]="8F";

hexarray[144]="90"; hexarray[145]="91"; hexarray[146]="92";

hexarray[147]="93"; hexarray[148]="94"; hexarray[149]="95";

hexarray[150]="96"; hexarray[151]="97"; hexarray[152]="98";

hexarray[153]="99"; hexarray[154]="9A"; hexarray[155]="9B";

hexarray[156]="9C"; hexarray[157]="9D"; hexarray[158]="9E";

hexarray[159]="9F"; hexarray[160]="A0"; hexarray[161]="A1";

hexarray[162]="A2"; hexarray[163]="A3"; hexarray[164]="A4";

hexarray[165]="A5"; hexarray[166]="A6"; hexarray[167]="A7";

hexarray[168]="A8"; hexarray[169]="A9"; hexarray[170]="AA";

hexarray[171]="AB"; hexarray[172]="AC"; hexarray[173]="AD";

hexarray[174]="AE"; hexarray[175]="AF"; hexarray[176]="B0";

hexarray[177]="B1"; hexarray[178]="B2"; hexarray[179]="B3";

hexarray[180]="B4"; hexarray[181]="B5"; hexarray[182]="B6";

hexarray[183]="B7"; hexarray[184]="B8"; hexarray[185]="B9";

hexarray[186]="BA"; hexarray[187]="BB"; hexarray[188]="BC";

hexarray[189]="BD"; hexarray[190]="BE"; hexarray[191]="BF";

hexarray[192]="C0"; hexarray[193]="C1"; hexarray[194]="C2";

hexarray[195]="C3"; hexarray[196]="C4"; hexarray[197]="C5";

hexarray[198]="C6"; hexarray[199]="C7"; hexarray[200]="C8";

hexarray[201]="C9"; hexarray[202]="CA"; hexarray[203]="CB";

hexarray[204]="CC"; hexarray[205]="CD"; hexarray[206]="CE";

hexarray[207]="CF"; hexarray[208]="D0"; hexarray[209]="D1";

hexarray[210]="D2"; hexarray[211]="D3"; hexarray[212]="D4";

hexarray[213]="D5"; hexarray[214]="D6"; hexarray[215]="D7";

hexarray[216]="D8"; hexarray[217]="D9"; hexarray[218]="DA";

hexarray[219]="DB"; hexarray[220]="DC"; hexarray[221]="DD";

hexarray[222]="DE"; hexarray[223]="DF"; hexarray[224]="E0";

hexarray[225]="E1"; hexarray[226]="E2"; hexarray[227]="E3";

hexarray[228]="E4"; hexarray[229]="E5"; hexarray[230]="E6";

hexarray[231]="E7"; hexarray[232]="E8"; hexarray[233]="E9";

hexarray[234]="EA"; hexarray[235]="EB"; hexarray[236]="EC";

hexarray[237]="ED"; hexarray[238]="EE"; hexarray[239]="EF";

hexarray[240]="F0"; hexarray[241]="F1"; hexarray[242]="F2";

hexarray[243]="F3"; hexarray[244]="F4"; hexarray[245]="F5";

hexarray[246]="F6"; hexarray[247]="F7"; hexarray[248]="F8";

hexarray[249]="F9"; hexarray[250]="FA"; hexarray[251]="FB";

hexarray[252]="FC"; hexarray[253]="FD"; hexarray[254]="FE";

hexarray[255]="FF";

hexcode = "#" + hexarray[red] + hexarray[green] + hexarray[blue];

document.bgColor = f.hexval.value = hexcode;
}
// End -->

















Detalles del usuario

Con éste código los visitantes (usuarios ) de tu página, podrán observar todos los detalles, desde el Navegador hasta la resolución de la pantalla de su ordenador. Este código debes insertarlo entre las etiquetas <body> y </body>



<!--start

var xy = navigator.appVersion;
xz = xy.substring(0,4);
document.write("<br><center><table border=1 cellpadding=2><tr><td>")
document.write("<center><b>", navigator.appName,"</b>")
document.write("</td></tr><tr><td>")
document.write("<center><table border=1 cellpadding=2><tr><td>Código: </td><td><center><b>", navigator.appCodeName,"</td></tr>")
document.write("<tr><td>Versión: </td><td><center><b>",xz,"</td></tr>")
document.write("<tr><td>Plataforma: </td><td><center><b>", navigator.platform,"</td></tr>")
document.write("<tr><td>Plugins: </td><td><center><b>", navigator.plugins," </td></tr>")document.write("<tr><td>Java activado: </td><td><center><b>")
if (navigator.javaEnabled()) document.write("Si</td></tr>"); else document.write("No</td></tr>")
document.write("<tr><td>Resolución de pantalla: </td><td><center><b>",screen.width," x ",screen.height,"</td></tr>")
document.write("</table></tr></td></table></center>")
//-->

28 noviembre 2008

Ultima actualización de la página

Con éste código podrás visualizar en tu página la última actualización de la misma. En ella se te indica dia y fecha del evento. El ejemplo lo podrás observar en la parte superior derecha de la sidebar. Este es el código:



<!-- Begin

var days = new Array(8);
days[1] = "Domingo";
days[2] = "Lunes";
days[3] = "Martes";
days[4] = "Miercoles";
days[5] = "Jueves";
days[6] = "Viernes";
days[7] = "Sabado";
var months = new Array(13);
months[1] = "Enero";
months[2] = "Febrero";
months[3] = "Marzo";
months[4] = "Abril";
months[5] = "Mayo";
months[6] = "Junio";
months[7] = "Julio";
months[8] = "Agosto";
months[9] = "Septiembre";
months[10] = "Octubre";
months[11] = "Noviembre";
months[12] = "Diciembre";
var dateObj = new Date(document.lastModified)
var wday = days[dateObj.getDay() + 1]
var lmonth = months[dateObj.getMonth() + 1]
var date = dateObj.getDate()
var fyear = dateObj.getYear()
if (fyear < 2000)
fyear = fyear + 1900
document.write(wday + ", " + lmonth + " " + date + ", " + fyear)
// End -->
</SCRIPT>

27 noviembre 2008

Hacer una celda

Código para hacer un FIELSET (Celda). Este es el ejemplo:

Esto es sólo un ejemplo

Este es el código:


<fieldset>AQUI EL EJEMPLO</fieldset




Dimensionar textarea

Vamos a colocar primero el código para su implementación y seguidamente el ejemplo respectivo.


<textarea rows="?" cols="?"></textarea>




25 noviembre 2008

Otra caja más

Para ello vamos a utilizar el atributo FIELDSET, y éste es el ejemplo:

Con Internet, y los blogs de ayuda, es mucho lo que aprendemos

24 noviembre 2008

Otra caja de texto

Otra forma de colocar un texto dentro de una caja contenedora es utilizando el siguiente código con su ejemplo respectivo.

Este es el ejemplo:




<textarea>Aquí el texto</textarea>

23 noviembre 2008

Caja contenedora de texto con Scroll

Script con el cual podrás colocar, en tu blog, una caja contenedora de códigos para que los mismos tengan una mejor presentación ante los visitantes de tu página.



/* Caja de código */
pre {
background:transparent url(aquí la url de una imagen) no-repeat 0 0; /* Imagen Superior, si deseas cambiarla modifica lo que se encuentra dentro de url(AQUI) */
padding-top:22px; /* Relleno - para ajustar Fondo */
}

pre code {
overflow:auto; /* Determina si es necesario agregar barras de Scroll */
background-color:#E9E9E9; /* Color de Fondo en Hex */
border:1px solid #999999; /* Color de Borde en Hex */
color:#990000; /* Color de letra en Hex */
display:block; /* No tocar */
padding:8px; /* Relleno del cuadro */
white-space:pre; /* No tocar */
text-align:left; /* Alineacion del Texto , left=izquierda, center= centrado, right=derecha */su
min-height:63px; /* Altura minima del Cuadro */
}

/* Cuando pase el Mouse sobre la caja ocurrirá lo siguiente: */
code:hover {
background-color:##ffffff; /* Color de Fondo en Hex */
border:1px solid ##666666;/* Color de Borde en Hex */le
}
/* FIN Caja de código */

Un buscador mas

Script para colocar otro modelo de buscador en tu blog:


<script type="text/javascript">

/* This script and many more are available free online at

JavaScripts.com http://javascripts.com

Created by: Robin Winslow | http://www.robinwinslow.me.uk */



// Find and select all text in the document that matches the "value" of the element passed

// If no element if passed, it will attempt to use the value of "this"

// Only works in a browser that supports the "window.getSelection" method, as other selection methods don't support multiple selectionsz

function performMultiSearch(elem,searchElem) {

    // set up variables

    var searchString; // Will hold the text to search for

    var theSelection; // Will hold the document's selection object

    var textNodes; // Will hold all the text nodes in the document

    

    // Set it to search the entire document if we haven't been given an element to search

    if(!searchElem || typeof(searchElem) == 'undefined') searchElem = document.body;

    

    // Get the string to search for

    if(elem && elem.value) searchString = elem.value;

    else if(this && this.value) searchString = this.value;

    

    // Get all the text nodes in the document

    textNodes = findTypeNodes(searchElem,3);

    

    // Get the selection object

    if(window.getSelection) theSelection = window.getSelection(); // firefox

    else { // some other browser - doesn't support multiple selections at once

        alert("sorry this searching method isn't supported by your browser");

        return;

    }

    

    // Empty the selection

    theSelection.removeAllRanges(); // We want to empty the selection regardless of whether we're selecting anything

    

    if(searchString.length > 0) { // make sure the string isn't empty, or it'll crash.

        // Search all text nodes

        for(var i = 0; i < textNodes.length; i++) {

            // Create a regular expression object to do the searching

            var reSearch = new RegExp(searchString,'gmi'); // Set it to 'g' - global (finds all instances), 'm' - multiline (searches more than one line), 'i' - case insensitive

            var stringToSearch = textNodes[i].textContent;

            while(reSearch(stringToSearch)) { // While there are occurrences of the searchString

                // Add the new selection range

                var thisRange = document.createRange();

                thisRange.setStart(textNodes[i],reSearch.lastIndex - searchString.length); // Start node and index of the selection range

                thisRange.setEnd(textNodes[i],reSearch.lastIndex); //  End node and index of the selection

                theSelection.addRange(thisRange); // Add the node to the document's current selection

            }

        }

    }

    

    return;

}



// Will find and select the first instance of the value of the passed element, then when called again will moves on to the next instance

// If no element passed it will try to get the value from "this"

function performSingleSearch(elem,searchElem) {

    // set up variables

    var searchString; // Will hold the text to search for

    var theSelection; // Will hold the document's selection object

    var textNodes; // Will hold all the text nodes in the document

    

    // Set it to search the entire document if we haven't been given an element to search

    if(!searchElem || typeof(searchElem) == 'undefined') searchElem = document.body;

    

    // Get the string to search for

    if(elem && elem.value) searchString = elem.value;

    else if(this && this.value) searchString = this.value;

    

    if(searchString && searchString.length > 0) { // make sure the string isn't empty, or it'll crash.

        if(window.getSelection) { // Firefox

            // Get the selection

            theSelection = window.getSelection();

    

            // Get all the text nodes in the document

            textNodes = findTypeNodes(searchElem,3);

            

            // If there's already a selection, and it's the string we're searching for

            var searchMatch = new RegExp(searchString,'i');

            if(theSelection.rangeCount == 1 && searchMatch(theSelection.getRangeAt(0).toString())) {

                var currentRange = theSelection.getRangeAt(0);

                theSelection.removeAllRanges();

                

                var newRange = null;

                

                // Move on to the next occurrence of it by iterating through text nodes...:

                for(var i = 0; i < textNodes.length; i++) {

                    // If this text node is before the currentRange, ignore it and carry on to the next one

                    if(currentRange.comparePoint(textNodes[i],0) == -1 && currentRange.startContainer != textNodes[i]) continue;

                    // If this text node is the same as the currentRange, find the point in the currentRange

                    else if((currentRange.comparePoint(textNodes[i],0) == -1 && currentRange.startContainer == textNodes[i]) || (currentRange.comparePoint(textNodes[i],0) == 0)) {

                        // Create a regular expression object to do the searching

                        var reSearch = new RegExp(searchString,'gmi'); // Set it to 'g' - global (finds all instances), 'm' - multiline (searches more than one line), 'i' - case insensitive

                        var stringToSearch = textNodes[i].textContent;

                        while(reSearch(stringToSearch)) { // While there are occurrences of the searchString

                            // Test if the index is after the currentRange's position

                            if(reSearch.lastIndex - searchString.length > currentRange.startOffset) {

                                // This is the new search position - empty the old selection and add the new selection range

                                theSelection.removeAllRanges();

                                newRange = document.createRange();

                                newRange.setStart(textNodes[i],reSearch.lastIndex - searchString.length); // Start node and index of the selection range

                                newRange.setEnd(textNodes[i],reSearch.lastIndex); //  End node and index of the selection

                                break; // We're not interested in the other results, so break out of this while loop.

                            }

                        }

                        if(newRange) break; // If we found a new range, break out of this for loop, cos there's nothing more to do.

                        else continue; // Otherwise continue

                    }

                    // If this text node is after the current one, search to see if it has any occurrences of the searchString

                    else if(currentRange.comparePoint(textNodes[i],0) == 1) {

                        // Create a regular expression object to do the searching

                        var reSearch = new RegExp(searchString,'gmi'); // Set it to 'g' - global (finds all instances), 'm' - multiline (searches more than one line), 'i' - case insensitive

                        var stringToSearch = textNodes[i].textContent;

                        // If we had a find, use it

                        if(reSearch(stringToSearch)) {

                            // This is the new search position - empty the old selection and add the new selection range

                            theSelection.removeAllRanges();

                            newRange = document.createRange();

                            newRange.setStart(textNodes[i],reSearch.lastIndex - searchString.length); // Start node and index of the selection range

                            newRange.setEnd(textNodes[i],reSearch.lastIndex); //  End node and index of the selection

                            break; // We're not interested in the other results, so break out of this while loop.

                        } else continue;

                    }

                }

                

                if(newRange) {

                    theSelection.addRange(newRange); // Add the node to the document's current selection

                    // Make the new range visible

                    newRange.startContainer.parentNode.scrollIntoView(false);

                    return;

                } else performSingleSearch(elem,searchElem);

            }

            

            // If we don't already have a selection, just find the first instance

            else {

                // Search all text nodes

                for(var i = 0; i < textNodes.length; i++) {

                    // Create a regular expression object to do the searching

                    var reSearch = new RegExp(searchString,'gmi'); // Set it to 'g' - global (finds all instances), 'm' - multiline (searches more than one line), 'i' - case insensitive

                    var stringToSearch = textNodes[i].textContent;

                    if(reSearch(stringToSearch)) { // If there are occurrences of the searchString

                        // This is the new search position - empty the old selection and add the new selection range

                        theSelection.removeAllRanges();

                        // Add the new selection range

                        var thisRange = document.createRange();

                        thisRange.setStart(textNodes[i],reSearch.lastIndex - searchString.length); // Start node and index of the selection range

                        thisRange.setEnd(textNodes[i],reSearch.lastIndex); //  End node and index of the selection

                        theSelection.addRange(thisRange); // Add the node to the document's current selection

                        thisRange.startContainer.parentNode.scrollIntoView(false);

                        break; // We're done

                    }

                }

            }

        }

        else if(document.selection) { // Internet Explorer

            theSelection = document.selection;

            var currentRange = theSelection.createRange();

            

            // Create text range to cover the whole of the searchElem

            var searchRange = document.body.createTextRange();

            searchRange.moveToElementText(searchElem);

            

            // Empty the current selection

            theSelection.empty();

            // If this text is already selected, find the next selection

            if(currentRange && currentRange.text && currentRange.text.match(eval('/'+searchString+'/i'))) {

                // Move start position of range past this word

                currentRange.moveStart('character');

                // Move end position to end of the search element

                currentRange.setEndPoint('EndToEnd',searchRange);

                // Search again

                if(currentRange.findText(searchString)) {

                    // We have found another instance

                    currentRange.select();

                    // Set the key press event, keeping the functionality of the old one as well

                    // This is so that IE will cycle on to the next search result when you press enter, something that Firefox did already

                    var currentkeypress = document.body.onkeypress;

                    window.setTimeout(function() {

                        document.body.onkeypress = function(evt) {

                            if(!evt) evt = window.event; // for internet explorer

                            

                            // If the selection is still what we thought it was

                            var nowRange = document.selection.createRange();

                            if(nowRange.htmlText == currentRange.htmlText) {

                                if(evt.keyCode == 13) { // If enter key pressed

                                    // Set the onkeypress back to what it was

                                    document.body.onkeypress = currentkeypress;

                                    // Perform the search

                                    performSingleSearch(elem,searchElem);

                                }

                            } else {

                                // If the selection isn't what we though, set the onkeypress back to what it was

                                document.body.onkeypress = currentkeypress;

                            }

                            // Either way, perform old onkeypress event as well

                            if(currentkeypress) currentkeypress(evt);

                        }

                    },30);

                    return true;

                } else performSingleSearch(elem,searchElem);

            } else {

                // Find the first occurrence of the searchString

                if(searchRange.findText(searchString)) {

                    // If we've found something, select it

                    searchRange.select();

                    // Set the key press event, keeping the functionality of the old one as well

                    // This is so that IE will cycle on to the next search result when you press enter, something that Firefox did already

                    var currentkeypress = document.body.onkeypress;

                    window.setTimeout(function() {

                        document.body.onkeypress = function(evt) {

                            if(!evt) evt = window.event; // for internet explorer

                            

                            // If the selection is still what we thought it was

                            var nowRange = document.selection.createRange();

                            if(nowRange.htmlText == searchRange.htmlText) {

                                if(evt.keyCode == 13) { // If enter key pressed

                                    // Set the onkeypress back to what it was

                                    document.body.onkeypress = currentkeypress;

                                    // Perform the search

                                    performSingleSearch(elem,searchElem);

                                }

                            } else {

                                // If the selection isn't what we though, set the onkeypress back to what it was

                                document.body.onkeypress = currentkeypress;

                            }

                            // Either way, perform old onkeypress event as well

                            if(currentkeypress) currentkeypress(evt);

                        }

                    },30);

                    

                    return true;

                } else {

                    return false;

                }

            }

        } else alert("Sorry your browser doesn't support a supported selection object");

    }

}



// Recursively find all text nodes within an element

function findTypeNodes(elem,type) {

    // Remove superfluous text nodes and merge adjacent text nodes

    elem.normalize();

    

    var typeNodes = new Array();

    // Search all children of this element to see which ones are the right type of node

    for(var nodeI = 0; nodeI < elem.childNodes.length; nodeI++) {

        if(elem.childNodes[nodeI].nodeType == type) typeNodes.push(elem.childNodes[nodeI]); // If it is a the right type of node, add it to the array

        else {

            // If not a the right type of node, search it in turn

            typeNodes = typeNodes.concat(findTypeNodes(elem.childNodes[nodeI],type));

        }

    }

    return typeNodes; // return the array

}



// Multiple onload function created by: Simon Willison

// http://simon.incutio.com/archive/2004/05/26/addLoadEvent

function addLoadEvent(func) {

  var oldonload = window.onload;

  if (typeof window.onload != 'function') {

    window.onload = func;

  } else {

    window.onload = function() {

      if (oldonload) {

        oldonload();

      }

      func();

    }

  }

}



addLoadEvent(function() {

  // Create a button

  var theInput = document.getElementById('searchInput');

  var theButton = document.getElementById('performSearch');

  var elementToSearch = document.body; // Use getElementById('yourIDName') to only allow search for a specific id.

  theButton.onclick = function() { // Set the onclick function

    performSingleSearch(theInput,elementToSearch);

  }

  // Also perform search on enter press

  theInput.onkeypress = function(evt) {

    if(!evt) evt = window.event; // for internet explorer

    if(evt.keyCode == 13) performSingleSearch(theInput,elementToSearch);

  }

});



</script>





<center>

<fieldset style="width: 216px;">

  <legend>Buscar página</legend>

  <input id="searchInput" type="text"/><button id="performSearch">BUSCA</button>

</fieldset>

<br/>

<br/>

</center>





Este es el ejemplo:






Buscar página



















Otro buscador

Script para colocar un buscador Google en tu blog:


<!-- Search Google -->

<center>
<FORM method=GET action="http://www.google.com/search">
<input type=hidden name=ie value=UTF-8>
<input type=hidden name=oe value=UTF-8>
<TABLE bgcolor="#FFFFFF"><tr><td>
<A HREF="http://www.google.com/">
<IMG SRC="http://www.google.com/logos/Logo_40wht.gif"
border="0" ALT="Google" align="absmiddle"></A>
<INPUT TYPE=text name=q size=
40 maxlength=255 value="">
<INPUT type=submit name=btnG VALUE="Google Search">
</td></tr></TABLE>
</FORM>
</center>

<!-- Search Google -->



Este es el ejemplo:














NOTA: Donde aparece " 40 " puede ser cambiado el valor para darle más amplitud a la CAJA DE BÚSQUEDA.




22 noviembre 2008

Buscador Dual

Script para colocar en tu blog una caja de búsqueda, que te da la opción de buscar tanto en la Web como en tu página:


!-- SiteSearch Google --> <FORM method=GET action="http://www.google.com/search"> <input type=hidden name=ie value=UTF-8> <input type=hidden name=oe value=UTF-8> <TABLE bgcolor="#FFFFFF"><tr><td> <A HREF="http://www.google.com/"> <IMG SRC="http://www.google.com/logos/Logo_40wht.gif" border="0" ALT="Google"></A> </td> <td> <INPUT TYPE=text name=q size=31 maxlength=255 value=""> <INPUT type=submit name=btnG VALUE="Google Search"> <font size=-1> <input type=hidden name=domains value="YOUR DOMAIN NAME"><br><input type=radio name=sitesearch value=""> WWW <input type=radio name=sitesearch value="YOUR DOMAIN NAME" checked> YOUR DOMAIN NAME <br> </font> </td></tr></TABLE> </FORM> <!-- SiteSearch Google --></span> <! - SiteSearch Google -> <FORM method=GET action="http://www.google.com/search"> <input type=hidden name=ie value=UTF-8> <input type = oculto nombre = valor oe = UTF-8> <TABLE bgcolor="#FFFFFF"> <tr> <td> <a href="http://www.google.com/"> <IMG SRC = "http://www .google.com/logos/Logo_40wht.gif "border =" 0 "alt =" Google "> </ A> </ td> <td> <input type = texto name = q = 31 tamaño maxlength = 255 = valor" "> <INPUT Type=submit name=btnG VALUE="Google Search"> <font size=-1> <input type=hidden name=domains value="YOUR DOMINIO NAME"> <br> <input type = radio name = sitesearch value = ""> WWW <input type=radio name=sitesearch value="YOUR DOMINIO NAME" checked> SU NOMBRE DE DOMINIO <br> </ font> </ td> </ tr> </ TABLE> </ FORM> <! - SiteSearch Google -></span>


Este es el ejemplo:

Google
Web Misitiodepruebas

18 noviembre 2008

Fecha a través de un click

Código para implementar un boton en tu blog, que al hacer "CLICK" sobre él, tendrás la fecha actual en una ventana emergente o pop-up.


CÓDIGO:


<SCRIPT LANGUAGE="JavaScript">

var mes = new Array();
mes[0] = "enero";
mes[1] = "febrero";
mes[2] = "marzo";
mes[3] = "abril";
mes[4] = "mayo";
mes[5] = "junio";
mes[6] = "julio";
mes[7] = "agosto";
mes[8] = "septiembre";
mes[9] = "octubre";
mes[10]= "noviembre";
mes[11]= "diciembre";
var hoy = new Date();
var dia = hoy.getDate();
var month = mes[hoy.getMonth()];
var anno = 1900 + hoy.getYear();
var fecha = dia + " de " + month + " de " + anno;
document.write(fecha);
</SCRIPT>




EJEMPLO:


Lo puedes observar en la parte superior derecha de la SIDEBAR.

17 noviembre 2008

Paleta de Colores

Código para colocar una paleta de colores en tu blog;

16 noviembre 2008

Otra caja de busqueda

Código para implementar caja de búsqueda Pico Search.


<!-- Begin PicoSearch Code -->

<table bgcolor="white" cellspacing="0" cellpadding="0" border="0"><tr><td>

<form method="get" style="margin:0;" action="http://www.picosearch.com/cgi-bin/ts.pl">

<input type="hidden" name="index" value="453210" />

<table bgcolor="white" cellspacing="2" cellpadding="0" border="0">

<tr><td><a href="http://www.picosearch.com/">

<img style="border:0" src="http://www.picosearch.com/picosmall.gif" alt="Search this Site with PicoSearch" /></a></td>

<td><input type="text" name="query" value="" size="20" /></td>

<td><input type="submit" value="Search" /></td></tr>

</table></form></td></tr></table>

<!-- End PicoSearch Code -->


Este es el ejemplo:










Search this Site with PicoSearch






02 noviembre 2008

Caja de búsqueda de entradas del blog.

Código para colocar una Caja de búsqueda de las entradas de nuestro blog:


<form id="searchthis" action="/search" style="display: inline;" method="get">

<input id="search-box" name="q" type="text"/>

<input border="0" alt="Buscar" src="http://upload.wikimedia.org/wikipedia/commons/thumb/e/ef/Crystal_Clear_app_xmag.png/32px-Crystal_Clear_app_xmag.png" type="image"/></form>


EJEMPLO:





NOTA: No sé el porque la imágen (lupa) está colocada en la parte donde aparece. Si colocamos el código en la sidebar aparecerá al lado derecho del cuadro de búsqueda.

Tablas

Script para colocar tablas en tu blog:

Tabla de 2 columnas.-


<table border=0><td>Objeto 1</td>Objeto 2</fd></table>


Ejemplos.-

BlogESfera Directorio de Blogs Hispanos - Agrega tu BlogImage Hosted by ImageShack.us/


Si quieres agregar más columnas sólo tienes, que al código anterior, colocarle una línea igual.