Foros del Web » Programando para Internet » Javascript »

string is not a function

Estas en el tema de string is not a function en el foro de Javascript en Foros del Web. Hola, tengo 3 funciones que los he puesto que carguen con el evento onLoad de body. Las funciones funcionan bien solo cuando el raton no ...
  #1 (permalink)  
Antiguo 30/08/2012, 02:36
Avatar de patilanz  
Fecha de Ingreso: enero-2012
Mensajes: 880
Antigüedad: 12 años, 3 meses
Puntos: 29
string is not a function

Hola, tengo 3 funciones que los he puesto que carguen con el evento onLoad de body. Las funciones funcionan bien solo cuando el raton no se esta sobre una div que esta programada que haga algo con el evento onmouseover pero al contrario si lo estas moviendo cuando todabia no an empezado las funciones las 3 fallan y no hacen nada y se produce el error de : string is not a function en la linea del body.

Alguien sabe como solucionar lo ??

Gracias :)
  #2 (permalink)  
Antiguo 30/08/2012, 07:32
Avatar de maycolalvarez
Colaborador
 
Fecha de Ingreso: julio-2008
Ubicación: Caracas
Mensajes: 12.120
Antigüedad: 15 años, 8 meses
Puntos: 1532
Respuesta: string is not a function

¿y como si no muestras ni el código o el link para verlo?
__________________
¡Por favor!: usa el highlight para mostrar código
El que busca, encuentra...
  #3 (permalink)  
Antiguo 30/08/2012, 07:59
Avatar de patilanz  
Fecha de Ingreso: enero-2012
Mensajes: 880
Antigüedad: 12 años, 3 meses
Puntos: 29
Respuesta: string is not a function

Gracias por tu respuesta .

Poes en el evento onLoad primero tengo esta :

Código HTML:
Ver original
  1. onload="navegador(); mover_mensaje(); mostrar_restaurante();"

Y luego en las funciones :

navegador() :

Código Javascript:
Ver original
  1. var user = navigator.userAgent.toLowerCase();
  2.     if(user.indexOf('msie') != -1) {
  3.         document.getElementById('restorant').style.fontFamily = 'Verdana, Geneva, sans-serif';
  4.         document.getElementById('apDiv1').style.left = '-2px';
  5.         document.getElementById('cuerpo').style.left = '180px';
  6.         document.getElementById('galeria').style.fontFamily = 'Verdana, Geneva, sans-serif';
  7.         document.getElementById('menu').style.fontFamily = 'Verdana, Geneva, sans-serif';
  8.         document.getElementById('contacto').style.fontFamily = 'Verdana, Geneva, sans-serif';
  9.     }
  10.     var infor = 'texto';
  11.     var p = 0;
  12.     var intervaloo = setInterval(function() {
  13.         if(p < infor.length) {
  14.         document.getElementById('informacion').innerHTML = infor.substr(0,p+1);
  15.     } else {clearInterval(intervaloo);}
  16.     p ++;
  17.     },50);
  18.     setTimeout(function() {
  19.         l.innerHTML += '<a id="mail2" href="mailto:email">email</a>';      
  20.     },3200);
  21.     var l = document.getElementById('informacion');
  22.     l.style.width = '500px';
  23.     l.style.visibility = 'visible';

mover_mensaje() :

Código Javascript:
Ver original
  1. setTimeout('mover2_mensaje()',10000);

y mostrar_restaunrate() :

Código Javascript:
Ver original
  1. var titulo = 'titulo';
  2.     var i = 0;
  3.     clearInterval(window.elintervalo);
  4.     clearTimeout(window.time_restaurante);
  5.     var texto = 'texto.';
  6.     var i = 0;
  7.         window.elintervalo = setInterval(function() {
  8.         if(i<texto.length) {
  9.             document.getElementById('contenido').innerHTML = texto.substr(0,i+1);  
  10.         } else {
  11.             clearInterval(window.elintervalo); 
  12.         }
  13.         i ++;
  14.        
  15.     },30);
  16.    
  17.    
  18.     document.getElementById('cuerpo').style.width = '505px';
  19.     document.getElementById('cuerpo').style.height = '570px';
  20.     document.getElementById('apDiv1').style.height = '570px';
  21.    
  22.     document.getElementById('titulo').lastChild.nodeValue = titulo;
  23.     quitar_errores();
  24.    
  25.     window.time_restaurante = setTimeout(function() {
  26.         document.getElementById('fotos').style.visibility = 'visible';},texto.length * 40)
  27.     document.getElementById('imagen').style.visibility = 'hidden';


Pero las funciones funciones si el raton no se mueve sobre lo que cambian.

Gracias :)
  #4 (permalink)  
Antiguo 01/09/2012, 02:06
Avatar de patilanz  
Fecha de Ingreso: enero-2012
Mensajes: 880
Antigüedad: 12 años, 3 meses
Puntos: 29
Respuesta: string is not a function

Ya lo solucione usando query: $(document).ready(function() {... })
  #5 (permalink)  
Antiguo 02/09/2012, 00:30
Avatar de patilanz  
Fecha de Ingreso: enero-2012
Mensajes: 880
Antigüedad: 12 años, 3 meses
Puntos: 29
Respuesta: ZSDGASDSDGASD Today, I helped an old man SDGSDADFGASDGDFHAD

Cita:
Iniciado por essexdypE Ver Mensaje
Loads of people [url=http://www.christianlouboutinza.com][b]Christian Louboutin outlet[/b][/url] today assume that generating cash on the web includes scams and all of the non-legit means to get paid income. Although the factor is the fact that you will discover several reputable signifies to get paid some cash when going on the web. The good issue about generating dollars more than the web is that one particular can do it anytime he or she could wish, with no interfering together with the other daily actions he or she could engage in. For example, the Cash-me gives an selection for those who desires to generate some added cash. And truly, who would not want that? When the present may sound a little as well very good to be correct, it in fact is true.


There are several those who have some money to the aspect and don't know the way to transform that revenue into much more income. It is said that simplest technique to generate income from money will be to make investments it into shares, although not lots of men and women let you know that stocks can very easily turn from you and you can shed more cash than you at first invested.

To learn some of the greatest ways on ways to convert your cash into additional income read the following write-up, but much more that that, do your very own investigation on obtainable possibilities for [url=http://www.christianlouboutinzh.com][b]Christian Louboutin[/b][/url] the reason that there is certainly likely greater than a single million techniques you could generate income with revenue and never all solutions fit all people exactly the same. Following are a few of the very best approaches it is possible to make some funds so attempt them out and find out if these solutions are for you personally
Hola, que tiene que ver esto con el tema???

Etiquetas: string_is-not_a_function
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 02:25.