sorted it, i just used php to match the id numbers for the javascript then echoed it to the browser
thanks again senorbadgerPHP Code:<?php
if (!empty($_POST[editmode]))
{echo "<script language='javascript' type='text/javascript'>\n";
echo "function updatertes()\n{\n";
echo "var frm = document.frmedit;\n";
$articles = mysql_query("select * from articles");
for($t=0;$t<mysql_num_rows($articles);$t++)
{
$chk = "chk".mysql_result($articles,$t,"articleid");
if (!empty($_POST[$chk]))
{
$ctrln = "conceptRTEvalue".mysql_result($articles,$t,"articleid");
$txtn = 'content'.mysql_result($articles,$t,"articleid");
echo "updateRTE($txtn);\n";
echo "frm.$ctrln.value = frm.$txtn.value;\n";
}
}
echo "}\n</script>";
}
?>





Reply With Quote