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!

CFSet and CFSelect question

Status
Not open for further replies.

programmher

Programmer
May 25, 2000
235
US
Hello, all.

I was asked if one could embed a CFSet statement INSIDE a CFSelect statement.

My first inclination was to say "no"; but, after considering it further, I was wondering if this was, in fact, possible?

Here is an example of what they want to do:

<select name=&quot;<cfset value ='misc'> change_this_value&quot; onChange=&quot;this.form.test_value.value=this.value;&quot;>
 
Please explain why you would do something like that. There's no need to place CFSET tags within the <> of an HTML tag. The following is a better solution:

<cfset value ='misc'>
<select name=&quot;#value#&quot; onChange=&quot;this.form.test_value.value=this.value;&quot;>

Im also not sure what you mean by change_this_value.

Also, why would you want your form field name to be variant? How will you know how to reference it?

Please explain what you need.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top