A
Anonymous
Guest
i am tying to use a javascript inside a php code i can't get it to work.
this is the part that is not working
could it be because it has a return? cause the other javascript is working. :?: [/code]
Code:
echo "<td nowrap align=right><input value='".$table_row[$row['Column_name']]."' type=text size=20 name='".strtr('index'.$row['Column_name'], " ", "_")."' onfocus='javascript:selectAll( document.forms[0].".strtr('index'.$row['Column_name'], ' ', '_').");'";
if($row['Column_name'] == 'Date')
{
echo " MAXLENGTH=10 size=10 onKeyDown='javascript:return dFilter(event.keyCode, this, '##-##-####','0');'";
/*
?>
MAXLENGTH=10 size=10 onKeyDown="javascript:return dFilter (event.keyCode, this, '##-##-####','0');" >;
<?
*/
}
Code:
echo " MAXLENGTH=10 size=10 onKeyDown='javascript:return dFilter(event.keyCode, this, '##-##-####','0');'";