Vota por nosotros en el ranking web que participamos

Curso Hacker
Bienvenido(a), Visitante. Favor de ingresar o registrarse.
¿Perdiste tu email de activación? - Octubre 07, 2008, 08:53:02
Inicio Ayuda Ingresar Registrarse
Visita: Articulos - Juegos Gratis - Da Foros

Comunidad Underground Hispana  |  Programacion  |  Programacion para webmasters  |  Consultas Generales (Moderadores: rOnNyLdInHo™, SaTeLuCo)  |  Tema: Contador,404, y otras cosas en HTML?? 0 Usuarios y 1 Visitante están viendo este tema. « anterior próximo »
Páginas: [1] Ir Abajo Imprimir
Autor Tema: Contador,404, y otras cosas en HTML??  (Leído 437 veces)
Seth
Visitante
« en: Mayo 10, 2003, 08:57:04 »

En línea
ULT3R10R
Visitante
« Respuesta #1 en: Mayo 10, 2003, 12:31:28 »

En línea
owned
Visitante


Email
« Respuesta #2 en: Mayo 10, 2003, 06:38:00 »

creo que se refiere a no utilizar mas que javay html, es decir, sin php ni sql ni asp.

Bueno, si los hay por que no vas a google.com y buscas "contador+javascript" ?

Y las el manejo de los errores, depende mucho del servidor. Puedes checar si tu servidor lo permite (lee un FAQ de tu server) si no, pues igual puedes hacerlo pero necesitas PHP.

chido
En línea
root
Visitante


Email
« Respuesta #3 en: Mayo 10, 2003, 07:21:09 »

En html no creo que puedas hacer mucho.

con php si.. con java por mas que le busques (aunque sea dificil) encontraras. lo que buscas.

En línea
owned
Visitante


Email
« Respuesta #4 en: Mayo 10, 2003, 08:11:54 »

"En html no creo que puedas hacer mucho. ", correccion, en HTML no puedes hacer nada...

Debes buscar un lenguaje dinamico y de lado del servidor, para asrgurarte que siempre funcione.
En línea
root
Visitante


Email
« Respuesta #5 en: Mayo 11, 2003, 12:11:26 »

En línea
el chute
Visitante
« Respuesta #6 en: Mayo 11, 2003, 01:18:40 »

intenta con este

<script language=JavaScript>
<!--
// Boolean variable specified if alert should be displayed if cookie exceeds 4KB
var caution = false

// name - name of the cookie
// value - value of the cookie
// [expires] - expiration date of the cookie (defaults to end of current session)
// [path] - path for which the cookie is valid (defaults to path of calling document)
// [domain] - domain for which the cookie is valid (defaults to domain of calling document)
// [secure] - Boolean value indicating if the cookie transmission requires a secure transmission
// * an argument defaults when it is assigned null as a placeholder
// * a null placeholder is not required for trailing omitted arguments
function setCookie(name, value, expires, path, domain, secure) {
        var curCookie = name + "=" + escape(value) +
                ((expires) ? "; expires=" + expires.toGMTString() : "") +
                ((path) ? "; path=" + path : "") +
                ((domain) ? "; domain=" + domain : "") +
                ((secure) ? "; secure" : "")
        if (!caution || (name + "=" + escape(value)).length <= 4000)
                document.cookie = curCookie
        else
                if (confirm("Cookie exceeds 4KB and will be cut!"))
                        document.cookie = curCookie
}

// name - name of the desired cookie
// * return string containing value of specified cookie or null if cookie does not exist
function getCookie(name) {
        var prefix = name + "="
        var cookieStartIndex = document.cookie.indexOf(prefix)
        if (cookieStartIndex == -1)
                return null
        var cookieEndIndex = document.cookie.indexOf(";", cookieStartIndex + prefix.length)
        if (cookieEndIndex == -1)
                cookieEndIndex = document.cookie.length
        return unescape(document.cookie.substring(cookieStartIndex + prefix.length, cookieEndIndex))
}

// name - name of the cookie
// [path] - path of the cookie (must be same as path used to create cookie)
// [domain] - doma??in of the cookie (must be same as domain used to create cookie)
// * path and domain default if assigned null or omitted if no explicit argument proceeds
function deleteCookie(name, path, domain) {
        if (getCookie(name)) {
                document.cookie = name + "=" +
                ((path) ? "; path=" + path : "") +
                ((domain) ? "; domain=" + domain : "") +
                "; expires=Thu, 01-Jan-70 00:00:01 GMT"
        }
}

// date - any instance of the Date object
// * you should hand all instances of the Date object to this function for "repairs"
// * this function is taken from Chapter 14, "Time and Date in JavaScript", in "Learn Advanced JavaScript Programming"
function fixDate(date) {
        var base = new Date(0)
        var skew = base.getTime()
        if (skew > 0)
                date.setTime(date.getTime() - skew)
}

var now = new Date()
fixDate(now)
now.setTime(now.getTime() + 365 * 24 * 60 * 60 * 1000)
var visits = getCookie("counter")
if (!visits)
        visits = 0
else
        visits = parseInt(visits) + 1
setCookie("counter", visits, now)
document.write(" " + visits)

// -->
</script>
En línea
Páginas: [1] Ir Arriba Imprimir 
Comunidad Underground Hispana  |  Programacion  |  Programacion para webmasters  |  Consultas Generales (Moderadores: rOnNyLdInHo™, SaTeLuCo)  |  Tema: Contador,404, y otras cosas en HTML?? « anterior próximo »
Ir a:  


Ranking-Hits
Powered by SMF 1.1.6 | SMF © 2006-2007, Simple Machines LLC