Link to home
Start Free TrialLog in
Avatar of LelloLello
LelloLello

asked on

How to add this button to my coldfusion code?

I have this button is working fine... but I don't know how to add the coldfusion to it.
<!--- <a class="CommonImageTextButton CommonReplyButton" onClick="window.open('addComment.cfm?response_id=#listRelationships.response_id#&topic_id=#listRelationships.topic_id#','child','status=0, toolbar=0, location=0, menubar=0','');">Add a Comment </a>--->


This is my coldfusion code:



 <cfif #isDefined('form.action')# AND #form.action# eq "showCommentInput">
                <cfif form.response_id eq listRelationships.response_id>
                  <textarea name="commentOnResponse" cols="40" rows="5" onKeyPress="return imposeMaxLength(this, 255);"></textarea>
                  <br/>
                  <input type="button" name="btnAddComment" value="Add" onClick="fnChangeCandidate(0)">
                  <input type="button" name="btnCancel" value="Cancel" onClick="location.href='candidate_e_ely.cfm?action=false&&sortBy=#form.sortOptions#&xaction=true&response_id=#listRelationships.response_id#&topic_id=#listRelationships.topic_id#&candidate_id=#form.candidates#'" />
                </cfif>
                <cfelse>
                <cfif listRelationships.candidate_id EQ client.id_number>
                  <input type="hidden" name="candidates_response" value="#listResponses.id#"/>
                  <input type="hidden" name="xaction" value="false" />
                  <input id="editResponse" type="button" name="editResponse" value="Edit Response" onClick="location.href='responseToTopic.cfm?newResponse=false&response_id=#listRelationships.response_id#&topic_id=#listRelationships.topic_id#'" />
                  <cfelse>
                  <!---<input id="addComment" type="button" name="addComment" value="Add a Comment" onClick="location.href='candidate_e_ely.cfm?action=showCommentInput&xaction=true&sortBy=#form.sortOptions#&response_id=#listRelationships.response_id#&topic_id=#listRelationships.topic_id#&candidate_id=#form.candidates#'"/> 	                                    --->
                  <input type="button" id="addComment" name="addComment" value="Add a Comment" onClick="window.open('addComment.cfm?response_id=#listRelationships.response_id#&topic_id=#listRelationships.topic_id#','child','status=0, toolbar=0, location=0, menubar=0','');" />
                </cfif>
              </cfif>

Open in new window

SOLUTION
Avatar of gdemaria
gdemaria
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial