how to pass input value form a page into a database using this onClick function.
<input type="button" name="save" value="SIMPAN" onClick="save_all()">
i've tried a few times, each time i click the button, its work but the values were not insert into the database, its null!!
this is my function save_all() look like:-
<script language="JavaScript" type="text/javascript">
function simpan() {
window.open("signDaftar.cfm");
window.close();
}
</script>
and signDaftar.cfm, supposed to be the action form which is contained
CFML :-
<cfquery name="InsertSyarikat" datasource = "#application.dsn#">
insert into maklumat_syarikat (sykt_nama,...)
values (
<cfif IsDefined("form.namasykt") AND #form.namasykt# NEQ "">
('#form.namasykt#')
<cfelse>
NULL
</cfif>
, ......
)
so, please somebody help me...thanks