Advertisement

10.03.2007 at 06:05AM PDT, ID: 22869022
[x]
Attachment Details

coldfusion button type="button"

Asked by erikTsomik in ColdFusion Studio, ColdFusion Application Server, Cold Fusion Markup Language

Tags: coldfusion, button

I have coldfusion form where I need to update the selected option. So everything is qworking except that is does not update the dataabse
My JS is here
function saveSel (){


      if (document.all) {
      document.getElementById('requirements').options[document.getElementById('requirements').selectedIndex].text = document.getElementById('EditDIV').value;
     // document.getElementById('EditDIV').value='';
        document.getElementById('EditDIV').style.display='none';
 document.getElementById('mainEditor').style.display='none';
     
       
} else {
        document.getElementById('requirements').options[document.getElementById('requirements').selectedIndex].text = document.getElementById('EditDIV').value;
  //    document.getElementById('EditDIV').value='';
      document.getElementById('EditDIV').style.display='none';
        document.getElementById('mainEditor').style.display='none';
     
        }
            <cfif (isDefined("form.EditDIV") and isDefined("form.prereq2") and isDefined("form.hidden"))>
     <cfdump var="#form#">
   

     <cfparam name="form.EditDIV" default="">
        <cfparam name="form.prereq2" default="">
        <cfparam name="form.hidden" default="">
        <cfparam name="requirements" default="">
         
       
        <cfquery name="updateRequirements" datasource="HotBanana_Manager">
                              Update trnAcademicProgramRequirements
                                     set requirement= '#HTMLEditFormat(form.EditDIV)#', req_prereq='#HTMLEditFormat(form.prereq2)#' , hidden='#HTMLEditFormat(form.hidden)#'
                                          where reqid = #form.requirements#      
                        
                        </cfquery>
       
                </cfif>
}
And the button is here
<input type="button" name="save" id="save" value="Save" onclick="saveSel();" >Start Free Trial
 
Loading Advertisement...
 
[+][-]10.03.2007 at 06:12AM PDT, ID: 20006167

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10.03.2007 at 06:15AM PDT, ID: 20006201

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: ColdFusion Studio, ColdFusion Application Server, Cold Fusion Markup Language
Tags: coldfusion, button
Sign Up Now!
Solution Provided By: WaldenL
Participating Experts: 2
Solution Grade: A
 
 
[+][-]10.03.2007 at 06:20AM PDT, ID: 20006245

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]10.03.2007 at 06:52AM PDT, ID: 20006513

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_1_20070628