473,473 Members | 1,583 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Problem with onClick="function()"

1 New Member
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
Apr 19 '07 #1
1 9127
acoder
16,027 Recognized Expert Moderator MVP
Welcome to TSDN.

To have form variables on the action page, you need to post the form. All you have done is opened a window.

If you want to post to a new window, set the target as "_BLANK". Change that button to a submit button. Specify the action in your form tag too.

Post again if you still have problems.

Hope that helps.
Apr 19 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Peter | last post by:
Hi, this is the code, and new row and new cell generated ok, but why the onclick and onmouseover doen't work? Thank you in advance! <html> <head> <script language="javascript"> function...
2
by: bay_dar | last post by:
Hi, I have an internal ASP.NET application that I'm are using to send e-mails out based on a single milepost or milepost range entered. I'm trying to do two things when a user clicks on the...
11
by: jesdynf | last post by:
I'm having trouble applying a stylesheet to content I'm generating after the fact. Here's the sample code: <html> <head> <title>CSS/DOM Problem Example</title> <style type="text/css">...
7
by: John | last post by:
Hi Everyone, I'm having this extremely annoying problem with Internet Explorer 6, giving me an error message saying "unknown runtime error" whenever I try to alter the contents of a <divelement...
1
by: mowsen | last post by:
Hey, simple thing. I try to create a new button which holds a function as "onclick" attribute. I tried different ways, varried here and there but without success. The function in question looks...
1
by: grantmx | last post by:
Hey guys - We am having problems with the following code in our form: <tr><td></td><td align=right><input type="image" name="_ctl25:btnSaveLarge" onclick="if (typeof(Page_ClientValidate) ==...
5
by: Maria Sudderman | last post by:
I have a prblem with the "onClick" command. onClick="insert('<a href="URI">', '</a>')"> but this is not correct! why? Maria
13
by: Steve | last post by:
On page 392 of "Javascript the definitive guide" a function is called like this:- <form action="processform.cgi" onsubmit="return validateForm();"> Why, in this instance, is the return...
3
by: PVACC | last post by:
I have a line of code thus: w3('<input type=radio name=rad onclick="parent.mySub('+i+')">'); The function w3() writes the code in an iframe. I need to set a variable "start" to the value "1"...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.