M
Madame Blablavatsky
hello,
i am trying to build a kind of very, very simple ritch text editor for
people to use with a very simple
cms.
at the moment i am working on the basic structure.
the text is put in an iframe.
then a hidden textfield gets the value from the content of that iframe.
then the hidden textfield is sent to a php-page so it can be put in a
database.
the problem is: the information from the hidden textfield is not in the
$_POST array on the php-page.
(there is no name/value)
the other information is ok. so the problem is with the javascript.
the information from the iframe is in the hidden textfield (i have tested it
with 'alert()'), but the hidden textfield is not
sent with the form.
does anyone know why the name/value of the hidden textfield is not sent with
the other
information of the form?
thanks
_________________ code: __________________________
<html>
<head>
<script language='javascript' type='text/javascript'>
<!-- desingMode must be 'on' ----->
function gaan(){
document.veld.document.designMode = 'On';
}
<!-- make hidden textfield -->
function verborgen(){
document.writeln('<input type="hidden" id="tekstveld" name="tekstveld"
value="">');
}
<!-- put content of the iframe in the hidden textfield -->
function toonInfo(){
tekstveld.value =
document.getElementById('veld').contentWindow.document.body.innerHTML;
}
<!-- send the form/hidden textfield -->
function submitForm(){
var verborgenVeld;
verborgenVeld = document.getElementById('tekstveld');
verborgenVeld.value =
document.getElementById('veld').contentWindow.document.body.innerHTML;
return true;
}
</script>
</head>
<body onLoad='gaan()'>
<script type='text/javascript'>
verborgen();
</script>
<iframe src='z_10_wegschrijven_02.php' name='veld' id='veld'></iframe>
<form action="z_11_wegschrijven_02.php" method="POST" onsubmit="return
submitForm();">
<input type='text' name='test'>
<input type='submit' name='submit' value='submit'>
</form>
</body>
</html>
_________________________ end of code ___________________________
i am trying to build a kind of very, very simple ritch text editor for
people to use with a very simple
cms.
at the moment i am working on the basic structure.
the text is put in an iframe.
then a hidden textfield gets the value from the content of that iframe.
then the hidden textfield is sent to a php-page so it can be put in a
database.
the problem is: the information from the hidden textfield is not in the
$_POST array on the php-page.
(there is no name/value)
the other information is ok. so the problem is with the javascript.
the information from the iframe is in the hidden textfield (i have tested it
with 'alert()'), but the hidden textfield is not
sent with the form.
does anyone know why the name/value of the hidden textfield is not sent with
the other
information of the form?
thanks
_________________ code: __________________________
<html>
<head>
<script language='javascript' type='text/javascript'>
<!-- desingMode must be 'on' ----->
function gaan(){
document.veld.document.designMode = 'On';
}
<!-- make hidden textfield -->
function verborgen(){
document.writeln('<input type="hidden" id="tekstveld" name="tekstveld"
value="">');
}
<!-- put content of the iframe in the hidden textfield -->
function toonInfo(){
tekstveld.value =
document.getElementById('veld').contentWindow.document.body.innerHTML;
}
<!-- send the form/hidden textfield -->
function submitForm(){
var verborgenVeld;
verborgenVeld = document.getElementById('tekstveld');
verborgenVeld.value =
document.getElementById('veld').contentWindow.document.body.innerHTML;
return true;
}
</script>
</head>
<body onLoad='gaan()'>
<script type='text/javascript'>
verborgen();
</script>
<iframe src='z_10_wegschrijven_02.php' name='veld' id='veld'></iframe>
<form action="z_11_wegschrijven_02.php" method="POST" onsubmit="return
submitForm();">
<input type='text' name='test'>
<input type='submit' name='submit' value='submit'>
</form>
</body>
</html>
_________________________ end of code ___________________________