Skip to main content
April 17, 2010
Answered

logic

  • April 17, 2010
  • 1 reply
  • 382 views

Hello, can anyone tell me why this wont work? I really cant see why it dont work it seams so simple.

a.cfm

<cfform>
          <cfinput type="radio" name="radiobutton" value="1">
          <cfinput type="radio" name="radiobutton" value="2">
          <cfselect name="ore">
          <option value="all" selected="selected">Any type</option>
          <option value="2">Doo</option>
          <option value="4">Qoo</option>
          </cfselect>
</cfform>
<cfdiv bind="url:b.cfm?orenum={ore} & type={radiobutton}"/>

b.cfm

<cfoutput>
<cfif isdefined("URL.type")>
working
<cfelse>
not working
</cfif>
</cfoutput>
<cfdump var="#url#" label="url">

This topic has been closed for replies.
Correct answer BKBK

The problem is the space before and after & in the following line. Remove them, and it should work.

<cfdiv bind="url:b.cfm?orenum={ore}&type={radiobutton}"/>

I also think the following is better:

<cfif isdefined("URL.type")>
working<br>

<cfdump  var="#url#" label="url">
<cfelse>
not working
</cfif>

1 reply

BKBK
Community Expert
BKBKCommunity ExpertCorrect answer
Community Expert
April 17, 2010

The problem is the space before and after & in the following line. Remove them, and it should work.

<cfdiv bind="url:b.cfm?orenum={ore}&type={radiobutton}"/>

I also think the following is better:

<cfif isdefined("URL.type")>
working<br>

<cfdump  var="#url#" label="url">
<cfelse>
not working
</cfif>

April 17, 2010

Hello and thanx for replying.

sorted