Ir para conteúdo
Fórum Script Brasil
  • 0

Formulario Sem Nome


kuroi

Pergunta

no VS 2003, tenho um formulario com um id qualquer. quando abro a pagina pelo navegador, ele adiciona também a propriedade name para o formulario com o mesmo valor do id.

acontece que não existe a propriedade name do formulario de acordo com os webstandards. minha pagina não vai validar no w3c se meu formulario tiver com valor na propriedade name. tem como eu fazer de que ele não de nome pro meu formulario??

Link para o comentário
Compartilhar em outros sites

7 respostass a esta questão

Posts Recomendados

  • 0

reclama sim. da uma olhada no meu codigo:


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
    <HEAD>
        <title>:: Panasonic - Intranet ::</title>
        <meta name="GENERATOR" Content="Microsoft Visual Studio .NET 7.1">
        <meta name="CODE_LANGUAGE" Content="C#">
        <meta name="vs_defaultClientScript" content="JavaScript">
        <meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
        <link href="css/intranet.css" rel="stylesheet" type="text/css">
        <style type="text/css"> form table tr td {border-top: 1px solid #295197; border-left: 1px solid #295197;}
        </style>
    </HEAD>
    <body>
        <div style="TEXT-ALIGN: center">
            <table border="0" cellspacing="0" cellpadding="0" width="760" style="BORDER-RIGHT: #cccccc 1px solid; BORDER-TOP: #cccccc 1px solid; MARGIN-BOTTOM: 5px; BORDER-LEFT: #cccccc 1px solid; BORDER-BOTTOM: #cccccc 1px solid;">
                <tr>
                    <td width="33%">
                        <img src="images/logo.gif" width="291" height="65" border="0" alt="Panasonic Intranet">
                    </td>
                    <td width="469" height="65">
                        <h1 class="titulo" style="TEXT-ALIGN: center">Solicitação de Adiantamento Para
                            Viagem</h1>
                    </td>
                </tr>
            </table>
            <form name="form" method="post" action="Form8.aspx" id="form">
<input type="hidden" name="__VIEWSTATE" value="dDw3NjU2NzIwMzM7O2w8YnRTdWJtaXQ7Pj4UZR0XW5T6IjlFUrAX9epwokLfCw==" />

                <table bgcolor="#f5f2f2" border="0" cellspacing="0" cellpadding="5" width="760" style="BORDER-RIGHT: #295197 1px solid; MARGIN-BOTTOM: 10px; BORDER-BOTTOM: #295197 1px solid">
                    <tr style="TEXT-ALIGN: center">
                        <td width="14%" style="BACKGROUND-COLOR: #c5ebff; TEXT-ALIGN: left">
                            <p class="nome_campo">Matrícula</p>
                        </td>
                        <td colspan="5" width="50%" style="BACKGROUND-COLOR: #c5ebff">
                            <p class="nome_campo">Nome do Viajante</p>
                        </td>
                        <td colspan="2" width="18%" style="BACKGROUND-COLOR: #c5ebff">
                            <p class="nome_campo">Departamento</p>
                        </td>
                        <td colspan="2" width="18%" style="BACKGROUND-COLOR: #c5ebff">
                            <p class="nome_campo">Centro de Lucro/Custo</p>
                        </td>
                    </tr>
                    <tr style="TEXT-ALIGN: center">
                        <td width="14%" style="TEXT-ALIGN: left">
                            <input name="T8C1" type="text" maxlength="255" id="T8C1" class="formulario" style="WIDTH: 100%" />
                        </td>
                        <td colspan="5" width="50%">
                            <input name="T8C2" type="text" maxlength="255" id="T8C2" class="formulario" style="WIDTH: 100%" />
                        </td>
                        <td colspan="2" width="18%">
                            <input name="T8C3" type="text" maxlength="255" id="T8C3" class="formulario" style="WIDTH: 100%" />
                        </td>
                        <td colspan="2" width="18%">
                            <input name="T8C4" type="text" maxlength="255" id="T8C4" class="formulario" style="WIDTH: 100%" />
                        </td>
                    </tr>
                    <tr>
                        <td colspan="10" width="100%">
                            <p class="nome_campo" style="DISPLAY: inline; FLOAT: left; WIDTH: 14%">Finalidade</p>
                            <input name="T8C5" type="text" maxlength="255" id="T8C5" class="formulario" style="WIDTH: 100%" />
                        </td>
                    </tr>
                    <tr>
                        <td colspan="3" width="32%">
                            <p class="nome_campo" style="DISPLAY: inline; FLOAT: left; WIDTH: 42%">Local</p>
                            <input name="T8C6" type="text" maxlength="255" id="T8C6" class="formulario" style="WIDTH: 100%" />
                        </td>
                        <td colspan="3" width="32%">
                            <p class="nome_campo" style="DISPLAY: inline; FLOAT: left; WIDTH: 42%">Período</p>
                            <input name="T8C7" type="text" maxlength="255" id="T8C7" class="formulario" style="WIDTH: 100%" />
                        </td>
                        <td colspan="4" width="36%">
                            <p class="nome_campo" style="DISPLAY: inline; FLOAT: left; WIDTH: 65%">Data
                                Prevista do Acerto</p>
                            <input name="T8C8" type="text" maxlength="255" id="T8C8" class="formulario" style="WIDTH: 100%" />
                        </td>
                    </tr>
                </table>
                <table bgcolor="#f5f2f2" border="0" cellspacing="0" cellpadding="5" width="760" style="BORDER-RIGHT: #295197 1px solid; MARGIN-BOTTOM: 10px; BORDER-BOTTOM: #295197 1px solid">
                    <tr>
                        <td colspan="10" width="100%" style="BACKGROUND-COLOR: #c5ebff; TEXT-ALIGN: center">
                            <p class="nome_campo">Adiantamento</p>
                        </td>
                    </tr>
                    <tr>
                        <td width="14%" style="BACKGROUND-COLOR: #c5ebff">
                            <p class="nome_campo">Despesa</p>
                        </td>
                        <td width="9%" style="BACKGROUND-COLOR: #c5ebff">
                            <p class="nome_campo">Dia (s)</p>
                        </td>
                        <td width="9%" style="BACKGROUND-COLOR: #c5ebff">
                            <p class="nome_campo">Km (s)</p>
                        </td>
                        <td width="9%" style="BACKGROUND-COLOR: #c5ebff">
                            <p class="nome_campo">R$ - unitário</p>
                        </td>
                        <td width="9%" style="BACKGROUND-COLOR: #c5ebff">
                            <p class="nome_campo">R$ - total</p>
                        </td>
                        <td width="14%" style="BACKGROUND-COLOR: #c5ebff">
                            <p class="nome_campo">Despesa</p>
                        </td>
                        <td width="9%" style="BACKGROUND-COLOR: #c5ebff">
                            <p class="nome_campo">Dia (s)</p>
                        </td>
                        <td width="9%" style="BACKGROUND-COLOR: #c5ebff">
                            <p class="nome_campo">Km (s)</p>
                        </td>
                        <td width="9%" style="BACKGROUND-COLOR: #c5ebff">
                            <p class="nome_campo">R$ - unitário</p>
                        </td>
                        <td width="9%" style="BACKGROUND-COLOR: #c5ebff">
                            <p class="nome_campo">R$ - total</p>
                        </td>
                    </tr>
                    <tr>
                        <td width="14%">
                            <p class="nome_campo">Hospedagem</p>
                        </td>
                        <td width="9%">
                            <input name="T8C9" type="text" maxlength="255" id="T8C9" class="formulario" style="WIDTH: 100%" />
                        </td>
                        <td width="9%">
                             </td>
                        <td width="9%">
                            <input name="T8C10" type="text" maxlength="255" id="T8C10" class="formulario" style="WIDTH: 100%" />
                        </td>
                        <td width="9%">
                            <input name="T8C11" type="text" maxlength="255" id="T8C11" class="formulario" style="WIDTH: 100%" />
                        </td>
                        <td width="14%">
                            <p class="nome_campo">Telefonia</p>
                        </td>
                        <td width="9%"> </td>
                        <td width="9%"> </td>
                        <td width="9%">
                            <input name="T8C21" type="text" maxlength="255" id="T8C21" class="formulario" style="WIDTH: 100%" />
                        </td>
                        <td width="9%">
                            <input name="T8C22" type="text" maxlength="255" id="T8C22" class="formulario" style="WIDTH: 100%" />
                        </td>
                    </tr>
                    <tr>
                        <td width="14%">
                            <p class="nome_campo">Refeição</p>
                        </td>
                        <td width="9%">
                            <input name="T8C12" type="text" maxlength="255" id="T8C12" class="formulario" style="WIDTH: 100%" />
                        </td>
                        <td width="9%">
                             </td>
                        <td width="9%">
                            <input name="T8C13" type="text" maxlength="255" id="T8C13" class="formulario" style="WIDTH: 100%" />
                        </td>
                        <td width="9%">
                            <input name="T8C14" type="text" maxlength="255" id="T8C14" class="formulario" style="WIDTH: 100%" />
                        </td>
                        <td width="14%">
                            <p class="nome_campo">Correios</p>
                        </td>
                        <td width="9%"> </td>
                        <td width="9%"> </td>
                        <td width="9%">
                            <input name="T8C23" type="text" maxlength="255" id="T8C23" class="formulario" style="WIDTH: 100%" />
                        </td>
                        <td width="9%">
                            <input name="T8C24" type="text" maxlength="255" id="T8C24" class="formulario" style="WIDTH: 100%" />
                        </td>
                    </tr>
                    <tr>
                        <td width="14%">
                            <p class="nome_campo">Quilometragem</p>
                        </td>
                        <td width="9%">
                             </td>
                        <td width="9%">
                            <input name="T8C15" type="text" maxlength="255" id="T8C15" class="formulario" style="WIDTH: 100%" />
                        </td>
                        <td width="9%">
                            <input name="T8C16" type="text" maxlength="255" id="T8C16" class="formulario" style="WIDTH: 100%" />
                        </td>
                        <td width="9%">
                            <input name="T8C17" type="text" maxlength="255" id="T8C17" class="formulario" style="WIDTH: 100%" />
                        </td>
                        <td width="14%">
                            <p class="nome_campo">Outras</p>
                        </td>
                        <td width="9%"> </td>
                        <td width="9%"> </td>
                        <td width="9%">
                            <input name="T8C25" type="text" maxlength="255" id="T8C25" class="formulario" style="WIDTH: 100%" />
                        </td>
                        <td width="9%">
                            <input name="T8C26" type="text" maxlength="255" id="T8C26" class="formulario" style="WIDTH: 100%" />
                        </td>
                    </tr>
                    <tr>
                        <td width="14%">
                            <p class="nome_campo">Ônibus/estáxi</p>
                        </td>
                        <td width="9%">
                             </td>
                        <td width="9%"> </td>
                        <td width="9%">
                            <input name="T8C18" type="text" maxlength="255" id="T8C18" class="formulario" style="WIDTH: 100%" />
                        </td>
                        <td width="9%">
                            <input name="T8C19" type="text" maxlength="255" id="T8C19" class="formulario" style="WIDTH: 100%" />
                        </td>
                        <td width="14%"> </td>
                        <td width="9%"> </td>
                        <td width="9%"> </td>
                        <td width="9%"> </td>
                        <td width="9%"> </td>
                    </tr>
                    <tr>
                        <td width="14%">
                            <p class="nome_campo">Despesas Sociais</p>
                        </td>
                        <td width="9%">
                             </td>
                        <td width="9%"> </td>
                        <td width="9%"> </td>
                        <td width="9%">
                            <input name="T8C20" type="text" maxlength="255" id="T8C20" class="formulario" style="WIDTH: 100%" />
                        </td>
                        <td colspan="4" width="41%">
                            <p class="nome_campo">Total do Adiantamento:</p>
                        </td>
                        <td width="9%">
                            <input name="T8C27" type="text" maxlength="255" id="T8C27" class="formulario" style="WIDTH: 100%" />
                        </td>
                    </tr>
                </table>
                <table bgcolor="#f5f2f2" border="0" cellspacing="0" cellpadding="5" width="760" style="BORDER-RIGHT: #295197 1px solid; MARGIN-BOTTOM: 10px; BORDER-BOTTOM: #295197 1px solid">
                    <tr>
                        <td>
                            <p class="nome_campo">Recebi a importância de R$ <input name="T8C28" type="text" maxlength="255" id="T8C28" class="formulario" style="WIDTH: 100px" />,
                                referente a adiantamento para viagem.</p>
                        </td>
                    </tr>
                    <tr style="PADDING-BOTTOM: 10px">
                        <td colspan="10" width="100%">
                            <input type="image" name="btSubmit" id="btSubmit" src="images/bt_enviar.gif" alt="Enviar" border="0" style="height:13px;width:52px;" />
                        </td>
                    </tr>
                </table>
            </form>
        </div>
    </body>
</HTML>
[/code]

ele reclama do nome do form e do border do input type="image".

se o seu validou, acho que é porque você esta usando um doctype diferente.

esse que eu to usando <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" > é o padrão aqui na empresa, e acredito que essa versao 4.0 seja a mais nova não?? que doctype você usou??

EDITADO:

vi agora e acho que o mais novo é o 4.01, realmente ele aceita o form name, mas não aceita o border, que doctype você esta usando? se for diferente, testa o border.

Editado por kuroi
Link para o comentário
Compartilhar em outros sites

  • 0

Eu uso XHTML e não HTML 4.x. E também o seu documento parece ser XHTML, já que as tags estão em minúsculas (o padrão para HTML 4.x são maiúsculas) e você está fechando tags que não contêm valores (<input ... />), o que não é necessário para HTML 4.x e é obrigatório para XHTML.

Abraços,

Graymalkin

Link para o comentário
Compartilhar em outros sites

Participe da discussão

Você pode postar agora e se registrar depois. Se você já tem uma conta, acesse agora para postar com sua conta.

Visitante
Responder esta pergunta...

×   Você colou conteúdo com formatação.   Remover formatação

  Apenas 75 emoticons são permitidos.

×   Seu link foi incorporado automaticamente.   Exibir como um link em vez disso

×   Seu conteúdo anterior foi restaurado.   Limpar Editor

×   Você não pode colar imagens diretamente. Carregar ou inserir imagens do URL.



  • Estatísticas dos Fóruns

    • Tópicos
      152,2k
    • Posts
      652k
×
×
  • Criar Novo...