Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Radio button/link question 1

Status
Not open for further replies.

MorganGreylock

Programmer
Jan 30, 2001
223
US
Hello,

I have a dynamic list of radio button objects on my page, the user selects one, then once one is selected, clicks on a link to perform a certain operation on that item. My problem is getting the information of what radio button they clicked on to the link. Right now, I have links like this:
Code:
<a href="webpage.cfm?action=edit">Edit</a>
<a href="webpage.cfm?action=assign_priority">Prioritize</a>
<a href="webpage.cfm?action=resolve">Resolve</a>
...
but before they click on one of these, I want to be able to send also which button they clicked on, so I know which record to perform the operation on.

Does that make sense? I'd like to keep the operations as links, as the users who will be using this... how shall I say... are relatively simple folks, and I don't want to confuse them. In any event, can this be done, either with pure CF or with CF and javascript?

Thanks in advance,
MG
 
Assuming the name of your radio button is thisVal

Code:
  <a href="javascript:window.location='webpage.cfm?action=edit&seld='+document.getElementById('thisVal').value">Edit</a>
  <a href="javascript:window.location='webpage.cfm?action=assign_priority&seld='+document.getElementById('thisVal').value">Prioritize</a>
  <a href="javascript:window.location='webpage.cfm?action=resolve&seld='+document.getElementById('thisVal').value">Resolve</a>

Should work

ALFII.com
---------------------
If this post answered or helped to answer your question, please reply with such so that forum members with a similar question will know to use this advice.
 
Great webmigit, thanks a lot, I'll try that first
thing in the morning!

MG
 
Oh yeah, you need to wrap it all in a FORM tag.. you know <form name="radioform"> before your <cfoutput> and </form> after

ALFII.com
---------------------
If this post answered or helped to answer your question, please reply with such so that forum members with a similar question will know to use this advice.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top