me gusta como funciona... pero esta el problema del espacio dentro de la web..., miren aqui el ejemplo funcionando... y veran lo que digo...
pulsa aqui
aqui el codigo... ahora intento q se abra en un popup pero ya me supera el tema...
gracias a los 2, he avanzado bastante... estoy apunto de conseguirlo... estoy seguro.
Código:
<!-- inicioBloque: blokeThemeEstrucPrincipalCentro -->
<script language="JavaScript">
<!--
var SymRealOnLoad;
var SymRealOnUnload;
function SymOnUnload(){window.open = SymWinOpen;
if(SymRealOnUnload != null)
SymRealOnUnload();
}
function SymOnLoad(){
if(SymRealOnLoad != null)
SymRealOnLoad();
window.open = SymRealWinOpen;
SymRealOnUnload = window.onunload;
window.onunload = SymOnUnload;
}
SymRealOnLoad = window.onload;
window.onload = SymOnLoad;
function SymError(){return true;}
window.onerror = SymError;
var SymRealWinOpen = window.open;
function SymWinOpen(url, name, attributes){return (new Object());}
window.open = SymWinOpen;
function storeCaret(text) {if (text.createTextRange) {text.caretPos = document.selection.createRange().duplicate();}}
function meter(text) {var postopic = document.PostTopic.varAdminConfigBloquesLinkCode; if (postopic.createTextRange && postopic.caretPos) { var caretPos = postopic.caretPos; caretPos.text = caretPos.text.charAt(caretPos.text.length - 1) == ' ' ? text + ' ' : text;} else postopic.value += text; postopic.focus(caretPos)}
function codigo(accion) {
switch(accion) {
case "url":
url = prompt("URL del Enlace", "http://");
txt = prompt("TxT del Enlace", "");
if(url) {
url="<a href="+url+">"+txt+""+"</a>";
meter(url);
}
break;
case "form1":
form1 = prompt("Texto", "");
if(form1) {
form1="<table class=\"vedit\" width=\"576\" border=\"1\" cellspacing=\"0\" cellpadding=\"0\"><tr><td>"+form1+"</td></tr></table>";
meter(form1);
}
break;
case "form2":
form2 = prompt("Texto", "");
img = prompt("Imagen", "");
if(form2) {
form2="<table width=\"576\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\"><tr><td><img src=\""+img+"\" height=\"32\" width=\"32\" border=\"0\"></td><td>"+form2+"</td></tr></table>";
meter(form2);
}
break;
default:
meter(accion);
break;
}
}
//-->
</script>
<script language="javascript" type="text/javascript">
function formatear(mensaje) {return mensaje.split("<").join("<").split(">").join(">").split(""").join("\"");}
function mostrar(){
window.frames.ventana.document.clear();
window.frames.ventana.document.open();
window.frames.ventana.document.writeln(document.forms.PostTopic.varAdminConfigBloquesLinkCode.value);
window.frames.ventana.document.close();
}
</script>
<form action="index.php?nucleo=adminconfigblocknewok" method="post" name="PostTopic" target="_self">
<table class="vedit">
<tr>
<th><b>Nombre Bloque</b></th>
<td><input type="text" name="varAdminConfigBloquesLinkTitulo" size="45"></td>
</tr>
<tr>
<th><b>Titulo</b></th>
<td><input type="text" name="varAdminConfigBloquesLinkNAme" size="45"></td>
</tr>
<tr>
<th><b>Informacion</b></th>
<td><input type="text" name="varAdminConfigBloquesLinkInfo" value="" size="45"></td>
</tr>
<tr>
<th><b>Target</b></th>
<td>
<select name="varAdminConfigBloquesLinkTarget" size="1" class="hedit">
<option selected value="_self">_self</option>
<option value="_self">_self</option>
<option value="_blank">_blank</option>
</select>
</td>
</tr>
<tr>
<th align="center"><input type="button" value="Mostrar" name="resultado" onclick="mostrar()" class="botones"></th>
<th align="right"><b>Codigo</b></th>
</tr>
<tr>
<th colspan="2"><textarea name="varAdminConfigBloquesLinkCode" rows="14" cols="70" wrap="virtual" id="area" onkeypress="mira()"></textarea></th>
</tr>
<tr>
<th colspan="2">
<div align="center">
<a href="javascript:codigo('form1')"><img src="http://www.rainhosting.net/mym-studio/templates/images/formato/formato1.gif" border="0"></a>
<a href="javascript:codigo('form2')"><img src="http://www.rainhosting.net/mym-studio/templates/images/formato/formato2.gif" border="0"></a>
<a href="javascript:codigo('form3')"><img src="http://www.rainhosting.net/mym-studio/templates/images/formato/formato3.gif" border="0"></a>
<a href="javascript:codigo('form4')"><img src="http://www.rainhosting.net/mym-studio/templates/images/formato/formato4.gif" border="0"></a>
<a href="javascript:codigo('form5')"><img src="http://www.rainhosting.net/mym-studio/templates/images/formato/formato5.gif" border="0"></a>
<a href="javascript:codigo('form6')"><img src="http://www.rainhosting.net/mym-studio/templates/images/formato/formato6.gif" border="0"></a>
<a href="javascript:codigo('form7')"><img src="http://www.rainhosting.net/mym-studio/templates/images/formato/formato7.gif" border="0"></a><br>
<input type="button" class="botones" value="Url" title="Añadir Enlace" onclick="javascript:codigo('url')">
</div>
</th>
</tr>
</table>
<br>
<input type=submit value=".: Aceptar :." class="botones"> <input type="button" value=".: Cancelar :." onclick="history.back(-1)" class="botones"><br>
<br>
<iframe style="border:1px black; border-style: dotted" name="ventana" frameborder="0" width="99%" height="100" align="center" marginwidth="0" marginheight="0" scrolling="yes"></iframe>
</form>
<!-- finBloque: blokeThemeEstrucPrincipalCentro -->