Usamos cookies para medir audiência e melhorar sua experiência. Você pode aceitar ou recusar a qualquer momento. Veja sobre o iMasters.
Bom Dia
ALGUEM CONSEGUE ME AJUDAR NESTA QUESTA ABAIXO, NÃO CONSIGO PEGAR O VALOR DO FORMULARIO SEGUE O CODIGO
TENHO QUE PEGAR O VALOR DESTE ALERT AQUI, O ALERT MOSTRA O VALOR MAS NÃO DA O SUBIMIT
alert("rte1 = " + document.RTEDemo.rte1.value);
<form name="RTEDemo" action="editor.php" method="post" onSubmit="return submitForm();">
<script language="JavaScript" type="text/javascript">
<!--
function submitForm() {
//make sure hidden and iframe values are in sync before submitting form
//to sync only 1 rte, use updateRTE(rte)
//to sync all rtes, use updateRTEs
updateRTE('rte1');
//updateRTEs();
alert("rte1 = " + document.RTEDemo.rte1.value);
//change the following line to true to submit form
return false;
}
//Usage: initRTE(imagesPath, includesPath, cssFile)
initRTE("imagens/", "", "");
//-->
</script>
<script language="JavaScript" type="text/javascript">writeRichText('rte1', '<?php echo $value; ?>', 400, 200, true, false);</script>
<p><input type="submit" name="submit" value="Submit">
</p>
</form>
<?php
echo $value = $_POST['value'];
echo"<br>";
if ((isset($_POST['value']))){ //Verifica se a variável foi postada
echo $value = $_POST['value'];
echo"<br>";
$objmsg->Updatemsg($value);
}
?><script language="JavaScript" type="text/javascript">
<!--
function submitForm() {
//make sure hidden and iframe values are in sync before submitting form
//to sync only 1 rte, use updateRTE(rte)
//to sync all rtes, use updateRTEs
updateRTE('rte1');
//updateRTEs();
alert("rte1 = " + document.RTEDemo.rte1.value);
//change the following line to true to submit form
return false;
}
//Usage: initRTE(imagesPath, includesPath, cssFile)
initRTE("imagens/", "", "");
//-->
</script>
Esta cometnadada não a uso
//updateRTEs();
onde essa funcao é definida?
updateRTEs();
você chama ela no submit, mas nao executa, pq ela nao existe, nao no codigo ai, pelo menos.
Abraços