Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

drop down onchange event should insert into database

Status
Not open for further replies.

VisualBasicHelp

Programmer
Sep 7, 2005
74
GB
I am using javascript in coldfusion. what I wanted to do is, when a drop down is selected it should ask a confirmation prompt(say onchange event) and if I press OK, it should insert a record by using insert query.

just I want the function which will do both for me. Actually connection and all is established with oracle, I need only the code for this.

The problem what I am facing is, I can write an insert query only in coldfusion and confirmation prompt only in java script. I am not able to do both.
 
If you don't mind a form submission, then you could submit a form to a server-side CF page to do thw job using somethingf like:

Code:
document.forms['yourFormName'].submit();

If yuo prefer to do it all "inline", then eiotehr submit to an iframe / other frame, or head over to the AJAX forum (forum1600) and do it that way.

Hope this helps,
Dan



Coedit Limited - Delivering standards compliant, accessible web solutions

[tt]Dan's Page [blue]@[/blue] Code Couch
[/tt]
 
Now what I have done is I submitted the form to another .cfm file and retrieved the form fields from the previous .cfm file and did and insert query there. But now after insertion I like to go to the next step of the previous .cfm file.

In short:

What I have done is in "show.cfm" I included
<cfinclude template ="get_subject.cfm>
In "get_subject.cfm", I have included all form fields and submitted it to "get_subject_insert.cfm". After this I would like to come back to the next step of show.cfm.

Can you please help me out in this.I am not an expert in coldfusion
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top