Ver Mensaje Individual
  #7 (permalink)  
Antiguo 21/08/2003, 02:42
Avatar de nazkatuta
nazkatuta
 
Fecha de Ingreso: julio-2002
Ubicación: EH - BCN
Mensajes: 222
Antigüedad: 22 años, 9 meses
Puntos: 0
Vale, pues pongo aqui el codigo de las dos paginas...

Esta primera es en la que seleccionamos el tag y su estilo...
Código:
<html>
<head>
<META HTTP-EQUIV="PRAGMA" CONTENT="NO-CACHE">
<META HTTP-EQUIV="EXPIRES" CONTENT="-1" >
<title>Generador CSS</title>
<LINK REL="stylesheet" TYPE="text/css" HREF="/portal/continguts.css">
<style>
.aviso {font-family: Geneva, Arial, Helvetica, sans-serif;
        font-size: 10pt;
		font-weight: normal;
        color: #003300; }
.notas {font-family: Verdana, Arial;
        font-size: 10pt;
		text-align: justify;
		font-weight: normal;
        color: #003300; }
.titulo {
        font-size: 10pt;
        font-family: Arial;
        font-weight: bold;
        color: #FFFFFF; }
</style>
<script language = "javascript">
<!--


function launchnew(){
x=window.open("","Outcome","width=250,height=330,top=100,left=100,resizeable=no,scrollbars=no,menubar=no,toolbar=no,status=yes")}

function launchhex(){
y=window.open("colorhex.htm","Hex","width=310,height=380,top=100,left=100,resizeable=no,scrollbars=no,menubar=no,toolbar=no,status=yes")}

function generate(){

enterClassName = "CSSName"
enterBackgroundColor = ""
enterBorderColor = ""
enterBorderStyle = ""
enterBorderWidth = ""
enterTextColor = ""
enterTextSize = ""
enterTextFont = ""
enterTextStyle = ""


if(document.makecss.thisclassname.value != ""){enterClassName = document.makecss.thisclassname.value}

if(document.makecss.backgroundcolor.value != ""){enterBackgroundColor = "background-color: " + document.makecss.backgroundcolor.value + ";" + "\n"}


if(document.makecss.textcolor.value != ""){enterTextColor = "color: " + document.makecss.textcolor.value + ";" + "\n"}
if(document.makecss.textsize.value != ""){enterTextSize = "font-size: " + document.makecss.textsize.value + "pt;" + "\n"}
if(document.makecss.textfont.value != ""){enterTextFont = "font-family: " + document.makecss.textfont.value + ";" + "\n"}

if(document.makecss.textweight.value == "N"){enterTextStyle = ""}
if(document.makecss.textweight.value == "B"){enterTextStyle = "font-weight: bold;" + "\n"}
if(document.makecss.textweight.value == "I"){enterTextStyle = "font-style: italic;" + "\n"}
if(document.makecss.textweight.value == "BI"){enterTextStyle = "font-weight: bold;" + "\n" + "font-style: italic;" + "\n"}



finalcode =  enterClassName + "{" + "\n" +
enterBackgroundColor +
enterBorderColor +
enterBorderStyle +
enterBorderWidth +
enterTextColor +
enterTextSize +
enterTextFont +
enterTextStyle +
"}" + "\n"

finalcode = finalcode.replace("#","");

window.location = 'escribir_CSS.asp?tag=' + enterClassName + '&datos=' + finalcode;

}




//-->
</script>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body>
<div align="center"><form name="makecss">
    <strong><font face="Geneva, Arial, Helvetica, sans-serif">Formato de Letras 
    </font></strong> 
    <table width=100% height="232" border=0 cellpadding=0 cellspacing=0>
      <td width="185" rowspan="7" valign=top><table width="172" height="199" border="0" cellpadding="1" cellspacing="0">
          <tr> 
            <td> <table height="197" border="0" cellpadding="0" cellspacing="0">
                <tr> 
                  <td width="178" bgcolor=white> <table cellspacing="1" cellpadding="5" border="0">
                      <tr> 
                        <td width="56" align=right bgcolor=EEEEEE class=aviso>Tag:</td>
                        <td width="115" bgcolor=EEEEEE class=aviso><input type="text" class="hexfield" name="thisclassname" size="10"> 
                          <input type="hidden"  name="elemtype" value="text"> 
                          <input type="hidden" name="backgroundcolor" size="10"> 
                          <input  type="hidden" name="bordercolor" size="10"> 
                          <input type="hidden" size="1" name="bordertype" value="solid"> 
                          <input type="hidden" size="1" name="borderwidth"  value=""></td>
                      </tr>
                      <tr> 
                        <td align=right class=aviso bgcolor=EEEEEE>Tamaño:</td>
                        <td class=aviso bgcolor=EEEEEE> <select size="1" name="textsize" class="hexfield">
                            <option value="" selected>Por defecto</option>
                            <option value="6">6pt</option>
                            <option value="7">7pt</option>
                            <option value="8">8pt</option>
                            <option value="9">9pt</option>
                            <option value="10">10pt</option>
                            <option value="11">11pt</option>
                            <option value="12">12pt</option>
                            <option value="13">13pt</option>
                            <option value="14">14pt</option>
                            <option value="16">16pt</option>
                            <option value="17">17pt</option>
                            <option value="18">18pt</option>
                            <option value="19">19pt</option>
                            <option value="20">20pt</option>
                            <option value="21">21pt</option>
                            <option value="22">22pt</option>
                            <option value="23">23pt</option>
                            <option value="24">24pt</option>
                            <option value="25">25pt</option>
                            <option value="26">26pt</option>
                            <option value="27">27pt</option>
                            <option value="28">28pt</option>
                            <option value="29">29pt</option>
                            <option value="30">30pt</option>
                          </select> </td>
                      </tr>
                      <tr> 
                        <td align=right class=aviso bgcolor=EEEEEE>Color:</td>
                        <td class=aviso bgcolor=EEEEEE><input class="hexfield" type="text" name="textcolor" size="10"></td>
                      </tr>
                      <tr> 
                        <td align=right class=aviso bgcolor=EEEEEE>Fuente:</td>
                        <td class=aviso bgcolor=EEEEEE> <select size="1" name="textfont" class="hexfield">
                            <option value="" selected>Por defecto</option>
                            <option value="arial">Arial</option>
                            <option value="verdana">Verdana</option>
                            <option value="times">Times NR</option>
                            <option value="courier">Courier</option>
                            <option value="serif">Serif</option>
                            <option value="sans-serif">Sans-Serif</option>
                            <option value="cursive">Cursive</option>
                            <option value="fantasy">Fantasy</option>
                            <option value="monospace">Monospace</option>
                          </select> </td>
                      </tr>
                      <tr> 
                        <td height="40" align=right bgcolor=EEEEEE class=aviso>Estilo:</td>
                        <td class=aviso bgcolor=EEEEEE> <select size="1" name="textweight" class="hexfield">
                            <option value="N">Normal</option>
                            <option value="B">Negrita</option>
                            <option value="I">Italica</option>
                            <option value="BI">Negr/Italic</option>
                          </select> </td>
                      </tr>
                    </table></td>
                </tr>
              </table></td>
          </tr>
        </table></td>
      <td width="342" valign=top><a href="#" onclick="document.all.thisclassname.value='H1'"> 
          <h1>H1</h1>
          </a></td>
      <td width="264" rowspan="7" valign=top></td>
      </tr>
      <tr> 
        <td valign=top><a href="#" onClick="document.all.thisclassname.value='H2'"> 
          <h2>H2</h2>
          </a> </td>
      </tr>
      <tr> 
        <td valign=top><a href="#" onClick="document.all.thisclassname.value='H3'"> 
          <h3>H3</h3>
          </a></td>
      </tr>
      <tr> 
        <td valign=top><a href="#" onClick="document.all.thisclassname.value='H4'"> 
          <h4>H4</h4>
          </a></td>
      </tr>
      <tr> 
        <td valign=top><a href="#" onClick="document.all.thisclassname.value='H5'"><h5>H5</h5></a> 
        </td>
      </tr>
      <tr> 
        <td valign=top><a href="#" onClick="document.all.thisclassname.value='H6'"> 
          <h6>H6</h6>
          </a> </td>
      </tr>
      <tr>
        <td valign=top><a href="#" onClick="document.all.thisclassname.value='P'">
          <p>P</p>
          </a></td>
      </tr>
    </table>

</form>
</div>
</body>
</html>

Falta crear el boton que llame a la funcion "generate"... esta funcion llama a la siguiente pagina que es escribir_css.asp y su codigo es.
__________________
Cita:
Gaur ere nahi nuke...
zure ondoan esnatu