Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

How to add this button to my coldfusion code?

Posted on 2012-04-10
2
Medium Priority
?
658 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 1000 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 1000 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

Looking for a new Web Host?

Lunarpages' assortment of hosting products and solutions ensure a perfect fit for anyone looking to get their vision or products to market. Our award winning customer support and 30-day money back guarantee show the pride we take in being the industry's premier MSP.

Question has a verified solution.

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

This article was originally published on Monitis Blog, you can check it here . Today it’s fairly well known that high-performing websites and applications bring in more visitors, higher SEO, and ultimately more sales. By the same token, downtime…
This article discusses how to implement server side field validation and display customized error messages to the client.
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:
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Suggested Courses

722 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