Jump to content


Chrico

Member Since 28/10/2003
Offline Last Active 19/02/2008, 18:07
-----

Posts I've Made

In Topic: Sistema De Notícias ( Mf Notícias )

08/02/2006, 18:32

Ola pessoal

O meu esta dando esse erro:

Warning: mysql_connect(): Unknown MySQL Server Host 'http' (1) in /home/domains/venha.com.br/web/mfnoticias/config.php on line 32
Unknown MySQL Server Host 'http' (1)

Alguem pode ajudar?? SOu leigo no assunto!

[s] chrico

In Topic: Formulário - Só Enviar Se Preencher Corretamente

19/01/2006, 12:14

Valew Ale

Esse código é enxuto e eficiente!

Só para entender, caso queira tirar, ou acrescentar novos campos o q é necessário??

Eu simulei algumas alterações no código mas sempre da erro!

[s] chrico

In Topic: Formulário - Só Enviar Se Preencher Corretamente

18/01/2006, 17:23

Consegui arrumar uma aprte do problema, agora o código esta tudo funcionando, porém, no campo e-mail, se a pessoa digitar apenas uma letra qualquer, já consegue enviar.

Para evitar isso, o que devo inserir para que seja enviado somente c a pessoa digitar um 'e-mail' mesmo??


<script language="JavaScript" type="text/javascript">
<!--
function formCheck(formobj){
// Enter name of mandatory fields
var fieldRequired = Array("Nome", "email");
// Enter field description to appear in the dialog box
var fieldDescription = Array("Nome", "email");
// dialog message

var alertMsg = "Por favor, preencha os determinados campos:\n";

var l_Msg = alertMsg.length;

for (var i = 0; i < fieldRequired.length; i++){
 var obj = formobj.elements[fieldRequired[i]];
 if (obj){
  switch(obj.type){
  case "select-one":
   if (obj.selectedIndex == -1 || obj.options[obj.selectedIndex].text == ""){
    alertMsg += " - " + fieldDescription[i] + "\n";
   }
   break;
  case "select-multiple":
   if (obj.selectedIndex == -1){
    alertMsg += " - " + fieldDescription[i] + "\n";
   }
   break;
  case "text":
  case "textarea":
   if (obj.value == "" || obj.value == null){
    alertMsg += " - " + fieldDescription[i] + "\n";
   }
   break;
  default:
  }
  if (obj.type == undefined){
   var blnchecked = false;
   for (var j = 0; j < obj.length; j++){
    if (obj[j].checked){
     blnchecked = true;
    }
   }
   if (!blnchecked){
    alertMsg += " - " + fieldDescription[i] + "\n";
   }
  }
 }
}

if (alertMsg.length == l_Msg){
 return true;
}else{
 alert(alertMsg);
 return false;
}
}
// -->
</script>

no formulário acrecentei:

onsubmit="return formCheck(this)
valew a ajuda

In Topic: Validar Emails, Separados Por Vírgulas

18/01/2006, 10:45

Ola

Este esquema de envio de noticias que vc falou é em java??

[s] chrico

In Topic: Formulário - Só Enviar Se Preencher Corretamente

18/01/2006, 10:44

Ola Ale

Desculpa mas como sou leigo nisso, até tentei entender o que me passou nos links mas não consegui!

Agradeço muito c puder me dar mais orientação!

[s] chrico

IPB Skin By Virteq