Hi people,
please, see if you can help me. I have an HTML code to perform some actions in my web page, and would like to add a function (in javascript) to update records by SQL statement in Oracle database.
I have the function i want to call :
and html code where depending some conditions, i call the function:
and the function to update the records:
When executing the page in IExplorer, i always receive a message saying that Object expected...
Could be wrong syntax? Do i have to change something?
Thanks,
Marco
please, see if you can help me. I have an HTML code to perform some actions in my web page, and would like to add a function (in javascript) to update records by SQL statement in Oracle database.
I have the function i want to call :
Code:
...
htp.p('
<script type="text/javascript" language="JavaScript">
<!--
function _onclick_situacao_JP(f)
{
if (f.v_situacao.checked) {
update reservas_www set situacao:="C" where id_reserva=c_reserva.id_reserva;
COMMIT;
}
else {
update reservas_www set situacao:=" " where id_reserva=c_reserva.id_reserva;
COMMIT;
}
}
-->
</script>
');
and html code where depending some conditions, i call the function:
Code:
...
...
if c_reserva.situacao=' ' or c_reserva.situacao is null then
htp.p('<td class="internaltablec">');
v_sit_JP :='C';
v_strqry_JP := 'update reservas_www set situacao= '' || v_sit_JP || '' where id_reserva=' || c_reserva.id_reserva;
htp.formCheckbox(cname=>'v_situacao', cvalue=>'', cattributes=>'onclick="_onclick_situacao_JP(this.form)"');
htp.p('</td>');
end if;
...
and the function to update the records:
Code:
...
htp.p('
<script type="text/javascript" language="JavaScript">
<!--
function _onclick_situacao_JP(f)
{
if (f.v_situacao.checked) {
update reservas_www set situacao:="C" where id_reserva=c_reserva.id_reserva;
COMMIT;
}
else {
update reservas_www set situacao:=" " where id_reserva=c_reserva.id_reserva;
COMMIT;
}
}
-->
</script>
');
Could be wrong syntax? Do i have to change something?
Thanks,
Marco
Comment