0 Replies Latest reply on Sep 1, 2009 11:09 AM by pbk-nFjYI4

    Binding to a click on a link, instead of a form field value


      I output a query, and when the user selects a row, I display details of that row in a cfdiv.  This works fine as long as I use a form and display a radio button next to each row -- when the user clicks a radio button, its value is sent to the bind expression, and all is well.  Here is the code:


      1   <cfdiv bind="url:dspThread.cfm?threadID={threadID}" ID="theDiv"/>

      2   <form action="updateMessageStatus.cfm" method="post" name="myForm">
      3       <cfoutput query="qryMessages">
      4           <input type="radio" name="threadID" value="#qryMessages.threadID#">
      5           #qryMessages.subject#
      6       </cfoutput>
      7   </form>



      But this isn't very intuitive for the user.  I would like to eliminate the radio button and have the user click a link (in this case, the message subject), and this click would trigger the <cfdiv> to refresh.  I tried replacing line 5 above with the following, but it doesn't seem to work:


      <a href="##" onClick="myForm.threadID.value='#qryMessages.threadID#';">#qryMessages.subject#</a>


      Any solutions?  Thanks.