Jump to content
Fórum Script Brasil
  • 0

script de pagina de confirmação


arldin

Question

Boa tarde amigos eu fiz uma adpitação em um script de pagina de confirmação

Ta beleza mais eu gostaria de saber se tem como colcar um submit para depois que vi-sem confirmasem

Abaixo vai os 2 dodico

Este o do formularioa

<HTML>
<HEAD>
<TITLE>Classificados -  Validação</TITLE>
&lt;script LANGUAGE="JavaScript">
function valida(theForm){
  if (isBlank(theForm.sacado)){
    alert("Preencha o campo \"sacado\".");
    return false;
   }
    

   if (isBlank(theForm.endereco1)){
    alert("Preencha o campo \"Endereco1\".");
    return false;
  }
  
     if (isBlank(theForm.num)){
    alert("Preencha o campo \"num°\".");
    return false;
    }
         if (isBlank(theForm.bairro)){
    alert("Preencha o campo \"bairro\".");
    return false;
    
    }

         if (isBlank(theForm.cidade)){
    alert("Preencha o campo \"cidade\".");
    return false;
    
    }
             if (isBlank(theForm.cep)){
    alert("Preencha o campo \"cep\".");
    return false;
    
  }
  
             if (isBlank(theForm.valor_boleto)){
    alert("Preencha o campo \"valor_boleto\".");
    return false;
    
  }
  return true;
}
</SCRIPT>
&lt;script language="JavaScript" type="text/JavaScript">
<!--
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
//-->
</script>
</HEAD>
</SCRIPT>
<head>
<title>CLASSIFICADOS GRATUITOS</title>
</head>
<body>
<div id="Layer1" style="position:absolute; left:7px; top:12px; width:743px; height:673px; z-index:1"><img src="fundo.jpg" width="743" height="673"></div>
<div id="Layer2" style="position:absolute; left:24px; top:151px; width:623px; height:278px; z-index:2"> 
  <FORM ACTION="visualiza1.php" METHOD="POST" ONSUBMIT="java script:return valida(this)">
    <table width="711" border="0" cellspacing="10">
      <tr> 
        <td><strong><font color="#FF0000" size="2" face="Verdana, Arial, Helvetica, sans-serif">*</font><font size="2" face="Verdana, Arial, Helvetica, sans-serif"> 
          Nome:</font></strong></td>
        <td><INPUT name="sacado" TYPE="TEXT" ID="nome2" SIZE="50"></td>
      </tr>
      <tr> 
        <td><strong><font color="#FF0000" size="2" face="Verdana, Arial, Helvetica, sans-serif">*</font><font size="2" face="Verdana, Arial, Helvetica, sans-serif"> 
          Endereço:</font></strong></td>
        <td><input name="endereco1" type="text" id="ende" size="50"><font color="#FF0000"> <font size="2" face="Verdana, Arial, Helvetica, sans-serif">*</font></font><font size="2" face="Verdana, Arial, Helvetica, sans-serif"> 
          </font><input name="num" type="text" id="n3" size="5"> 
        <td>
        <TR>
    <TD>BAIRRO:<input TYPE="Text" NAME="bairro" ID+"bairro"></TD></TR>
    <TR>
    <TD>CIDADE:<input TYPE="Text" NAME="cidade" ID"cidade"></TD></TR>
    <TR>
    <TD>CEP:<input TYPE="Text" NAME="cep" ID="cep"></TD></TR>
    <td>VALOR:<input TYPE="Text" NAME="valor_boleto" ID="valor_boleto"></td>

</TR>
    <tr> 
        <td> <br> <input type="submit" name="Submit" style="BACKGROUND-COLOR: #003399; ; color: #FFF;font-family: verdana; font-weight: bold"value="Visualizar"> 
            <input type="reset" name="Submit2" style="BACKGROUND-COLOR:#003399; ; color: #FFF;font-family: verdana; font-weight: bold"value="Limpar"> 
        </td>
      </tr>
    </table>
  </FORM>
&lt;script language=javascript>
//MÁSCARA DE VALORES

function txtBoxFormat(objeto, sMask, evtKeyPress) {
    var i, nCount, sValue, fldLen, mskLen,bolMask, sCod, nTecla;


if(document.all) { // Internet Explorer
    nTecla = evtKeyPress.keyCode;
} else if(document.layers) { // Nestcape
    nTecla = evtKeyPress.which;
} else {
    nTecla = evtKeyPress.which;
    if (nTecla == 8) {
        return true;
    }
}

    sValue = objeto.value;

    // Limpa todos os caracteres de formatação que
    // já estiverem no campo.
    sValue = sValue.toString().replace( "-", "" );
    sValue = sValue.toString().replace( "-", "" );
    sValue = sValue.toString().replace( ".", "" );
    sValue = sValue.toString().replace( ".", "" );
    sValue = sValue.toString().replace( "/", "" );
    sValue = sValue.toString().replace( "/", "" );
    sValue = sValue.toString().replace( ":", "" );
    sValue = sValue.toString().replace( ":", "" );
    sValue = sValue.toString().replace( "(", "" );
    sValue = sValue.toString().replace( "(", "" );
    sValue = sValue.toString().replace( ")", "" );
    sValue = sValue.toString().replace( ")", "" );
    sValue = sValue.toString().replace( " ", "" );
    sValue = sValue.toString().replace( " ", "" );
    fldLen = sValue.length;
    mskLen = sMask.length;

    i = 0;
    nCount = 0;
    sCod = "";
    mskLen = fldLen;

    while (i <= mskLen) {
      bolMask = ((sMask.charAt(i) == "-") || (sMask.charAt(i) == ".") || (sMask.charAt(i) == "/") || (sMask.charAt(i) == ":"))
      bolMask = bolMask || ((sMask.charAt(i) == "(") || (sMask.charAt(i) == ")") || (sMask.charAt(i) == " "))

      if (bolMask) {
        sCod += sMask.charAt(i);
        mskLen++; }
      else {
        sCod += sValue.charAt(nCount);
        nCount++;
      }

      i++;
    }

    objeto.value = sCod;

    if (nTecla != 8) { // backspace
      if (sMask.charAt(i-1) == "9") { // apenas números...

        return ((nTecla > 47) && (nTecla < 58)); } 
      else { // qualquer caracter...
        return true;
      } 
    }
    else {
      return true;
    }
  }
  
</script><BODY>
</HTML>
Este o de confirmação
<html>
<head>
<title>Recebendo e exibindo os dados</title>
&lt;script language="JavaScript" type="text/JavaScript">
<!--
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
//-->
</script>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"></head>
<body>
<div id="Layer1" style="position:absolute; left:6px; top:-28px; width:105px; height:34px; z-index1:2"></div>
<div id="Layer1" style="position:absolute; left:365px; top:174px; width:327px; height:134px; z-index1:3"> 
  <?
$sacado = $_POST["sacado"];
$endereco1 = $_POST["endereco1"];
$num = $_POST["num"];
$cidade = $_POST["cidade"];
$bairro = $_POST["bairro"];
$cep = $_POST["cep"];
$valor = $_POST["valor"];

$assunto = "PEDIDO";
$headers = "Content-Type: text/plain;";
$headers .= "charset=\"iso-8859-1\"\r\n";
$mensagem .= "\n\nsacado : $sacado";
$mensagem .= "\nnum: $num";
$mensagem .= "\nCidade: $cidade";
$mensagem .= "\nbairro: $bairro";
$mensagem .= "\ncep: $cep";
$mensagem .= "\nvalor_boleto: $valor_boleto";
$mensagem ."($para, $assunto, $mensagem, $headers)";
?>

  <b></b><font size="2" face="Verdana, Arial, Helvetica, sans-serif"> <?php echo $_POST["descricao"]; ?> 
  <p><b><b><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Cliente 
    :<font size="2" face="Verdana, Arial, Helvetica, sans-serif"></font></font></b></b><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><font size="2" face="Verdana, Arial, Helvetica, sans-serif"> 
  <?php echo $_POST["sacado"]; ?> <br>
  <font size="2" face="Verdana, Arial, Helvetica, sans-serif">Cidade:<font size="2" face="Verdana, Arial, Helvetica, sans-serif"> 
  <?php echo $_POST["cidade"]; ?> <br>
  <font size="2" face="Verdana, Arial, Helvetica, sans-serif">Endereço:<font size="2" face="Verdana, Arial, Helvetica, sans-serif"> 
  <?php echo $_POST["endereco1"]; ?> <font size="2" face="Verdana, Arial, Helvetica, sans-serif">,<font size="2" face="Verdana, Arial, Helvetica, sans-serif"> 
  <?php echo $_POST["num"]; ?> <br>
  <font size="2" face="Verdana, Arial, Helvetica, sans-serif">Bairro:<font size="2" face="Verdana, Arial, Helvetica, sans-serif"> 
  <?php echo $_POST["bairro"]; ?> <br>
  <font size="2" face="Verdana, Arial, Helvetica, sans-serif">Cep:<font size="2" face="Verdana, Arial, Helvetica, sans-serif"> 
  <?php echo $_POST["cep"]; ?> <br>
    <font size="2" face="Verdana, Arial, Helvetica, sans-serif">Valor:<font size="2" face="Verdana, Arial, Helvetica, sans-serif"> 
  <?php echo $_POST["valor_boleto"]; ?> <br>

<div id="Layer2" style="position:absolute; left:18px; top:76px; width:978px; height:28px; z-index1:4"> 
</div>

Como fazer

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



  • Forum Statistics

    • Total Topics
      152.2k
    • Total Posts
      652k
×
×
  • Create New...