troubleshooting Question

Use a link for a submit button because of the class being applied

Avatar of armanbena
armanbena asked on
HTMLColdFusion Language
11 Comments1 Solution278 ViewsLast Modified:
Hi,

I have a submit button, however in order to make the look of the buttons in the site the same, I want to use a class that is being applied for links.  I tried changing the button to a link, but then it does not function properly, because I have a test to see if the button is defined, then it runs an update query after being submitted to the page itself.

<cfset id = #url.id# >
<cfif isdefined("FORM.button") >
            <CFQUERY DATASOURCE="Obi-default"  NAME="UpdateList" >
                  UPDATE NF_WMI
              SET Notes='#form.textarea#'
              WHERE TrackingNumber = '#url.id#'
            </CFQUERY>
           
         <cflocation url="notessaved.cfm" addtoken="no">  
</cfif>

                   <input type="submit" name="button" id="button"  class="button" value="Submit" />
                //this one works, but does not have the class applying
 
              <a href="javascript: document.form1.submit()" class="button" title="Submit" name="button" onclick="javascript:Submit()"> Submit</a> //this is not updating, but has the look I want
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 11 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 11 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros