Javascript is definitely needed.
Allow me to introduce you to my little friend: CFAjax.
http://www.indiankey.com/c
Main Topics
Browse All TopicsOkay, i have a table in which i want to display a DISABLED shortlist hyperlink by default for each looped row. The shortlist hyperlink can only be enabled when the user clicks on the viewdetails hyperlink. How can this be achieved ? and is there a nice way to show different images for disabled and enabled states. I know javascript will have to be used in some form.
<cfoutput query="Get_Query" startrow="#URL.sl_StartRow
<tr>
<td><a href="/viewdetails.cfm">#G
<td><a href="/shortlist.cfm"><img
</tr>
</cfoutput>
Cheers
JT
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Javascript is definitely needed.
Allow me to introduce you to my little friend: CFAjax.
http://www.indiankey.com/c
What about using buttons and enabling & disabling them, the problem is i have to uniquely name each button for each currently looped row.
<cfoutput query="Get_Query" startrow="#URL.sl_StartRow
<tr>
<td>
<!--- Hyperlink to enable button --->
<a href="/viewdetails.cfm" target="dsp_contact" onclick="openPopup(this.hr
document.thispage.button#G
</td>
<td>
<!---Then the button for each looped row --->
<input type="button" value="Shortlist" name="button#Get_Query.cur
('/shortlist.cfm', '_parent',1024,768)" disabled="true">
</td>
<tr>
</cfoutput>
what do you think ?
JT
CFAJAX or AJAX of any variety is *definitely* not needed for something super-simple like this. See if the following really basic example gets you headed in the right direction:
<script type="text/javascript">
function enableLink(id)
{
if(document.getElementById
{
oLink = document.getElementById(id
if(oLink)
oLink.disabled = false;
}
return false;
}
</script>
<cfoutput query="Get_Query" startrow="#URL.sl_StartRow
<tr>
<td><a href="/viewdetails.cfm" onclick="return enableLink('link-#Get_Quer
<td><a href="/shortlist.cfm" id="link-#Get_Query.id#" disabled="disabled" onclick="return !this.disabled"><img src="/save.gif"></a></td>
</tr>
</cfoutput>
Business Accounts
Answer for Membership
by: Ike23Posted on 2006-05-11 at 10:50:58ID: 16660949
I'm not sure what you mean by a "disabled shortlist hyperlink" but it sounds like you want to make the user click the first link in order to see the second link correct? This sounds like a good candidate for using Javascript and CSS with a id element.
nection.ne t/CODE_LIB RARY/ Javas cript_Show _Hide.shtm l
ml/show-hi de/
_hiding.ht ml
Basically you have content on your page that you put inside of <div> tags with an id="" value (you could populate this dynamically from your <cfoutput>). Then the links will call a javascript function that will change the ID value and display the content in whichever <div> tag is chosen.
Here's a few examples:
http://support.internetcon
http://www.dyn-web.com/dht
http://www.netlobo.com/div
Cheers!
Ike