Solved

How to add this button to my coldfusion code?

Posted on 2012-04-10
2
637 Views
Last Modified: 2012-04-10
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

0
Comment
Question by:LelloLello
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 39

Assisted Solution

by:gdemaria
gdemaria earned 250 total points
ID: 37829697
I don't understand the question, there is already Coldfusion code in your statement...


<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>

Just make sure it's wrapped by cfoutput tags and it should work...
0
 
LVL 14

Accepted Solution

by:
quizwedge earned 250 total points
ID: 37829826
I think gdemaria answered it, but I'll add one more thing and include the code. make sure you don't have the <!-- and --> in the code as that means it's a comment. So the code should look like

<cfoutput>
<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>
</cfoutput>

Open in new window

0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Get to know the ins and outs of building a web-based ERP system for your enterprise. Development timeline, technology, and costs outlined.
FAQ pages provide a simple way for you to supply and for customers to find answers to the most common questions about your company. Here are six reasons why your company website should have a FAQ page
Viewers will get an overview of the benefits and risks of using Bitcoin to accept payments. What Bitcoin is: Legality: Risks: Benefits: Which businesses are best suited?: Other things you should know: How to get started:
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

738 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question