Ver Mensaje Individual
  #1 (permalink)  
Antiguo 27/07/2009, 14:44
dscafati
(Desactivado)
 
Fecha de Ingreso: julio-2009
Mensajes: 174
Antigüedad: 14 años, 10 meses
Puntos: 3
Pregunta ¿Porque esto no anda en iexplorer?

este es mi codigo

Código HTML:
<script>
function inslink2(tag){
	var input = document.form1.contenido;		
if(typeof input.selectionStart != 'undefined'){
		var start = input.selectionStart;
		var end = input.selectionEnd;
		var insText = input.value.substring(start, end);
	 	 patron = /^[A-Za-z0-9_]+$/;
		if (patron.test(insText)){
			input.value = input.value.substr(0, start) +"[" + tag + "]" + insText + "[/" + tag + "]"+ input.value.substr(end);
			input.focus();
			input.setSelectionRange(start+2+tag.length+insText.length+3,start+2+tag.length+insText.length);
		}else{
			var my_link = prompt("Ingrese el id:","");
			if ((my_link.length!=0)&&(my_link != '')) {
					input.value = input.value.substr(0, start) +"[" + tag + "]" + my_link + "[/" + tag + "]"+ input.value.substr(end);
					input.focus();
					input.setSelectionRange(start+2+tag.length+my_link.length+3,start+2+tag.length+my_link.length);
					return;
			}
		}
	}
	
}
</script>

y dentro del form 1...



  <input type="button" name="Submit13" value="gvideo" onClick="inslink2('goear')">

  <textarea name="contenido" cols="40" rows="10" id="contenido"></textarea>


lo probe en firefox y opera y anda perfecto, pero no funciona en iexplorer

lo que hace es:
yo hago clic en el boton gvideo, y me escribe [gvideo]algo selecccionado[/gvideo] o me pide en un cartelito el id

como lo puedo hacer andar en iexplorer?