Go Back   CodingForums.com > :: Server side development > Other server side languages/ issues > ColdFusion

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 04-04-2011, 05:15 PM   PM User | #1
Jt107
New Coder

 
Join Date: Nov 2002
Posts: 29
Thanks: 1
Thanked 0 Times in 0 Posts
Jt107 is an unknown quantity at this point
Cfdiv Binding Variable with # sign Issue

Have a problem using cfdiv binding variable, because it contains # in the value, so when it passed in Firefox it truncked anything from # sign on.
here is the code:
<form name="myForm" method="post">

<b><center>Part Name</center></b><br>
<select name="Avail_Names" id="Avail_Names">
<cfoutput query="getName">

<option value ="#getName.name#"> #name#

</cfoutput>
</select>
</form>

<cfdiv id="nameDiv" bind="url:desc.cfm?name={Avail_Names}"/>


The code works with IE browser but not in Firefox.
Not sure what is the way to bypass # in that variable, or I should not use CFDIVE altogether. Appreciate your help.
Jt107 is offline   Reply With Quote
Old 04-05-2011, 03:36 PM   PM User | #2
Gjslick
Regular Coder

 
Join Date: Feb 2009
Location: NJ, USA
Posts: 476
Thanks: 2
Thanked 70 Times in 69 Posts
Gjslick will become famous soon enough
Try surrounding your value with the urlEncodedFormat() function.

For example:
Code:
<form name="myForm" method="post">
  <b><center>Part Name</center></b><br>
  
  <select name="Avail_Names" id="Avail_Names">
    <cfoutput query="getName">
      <option value="#urlEncodedFormat( getName.name )#">#name#
    </cfoutput>
  </select>
</form>

<cfdiv id="nameDiv" bind="url:desc.cfm?name={Avail_Names}"/>
Let me know how that goes.

-Greg
Gjslick is offline   Reply With Quote
Old 04-05-2011, 04:38 PM   PM User | #3
Jt107
New Coder

 
Join Date: Nov 2002
Posts: 29
Thanks: 1
Thanked 0 Times in 0 Posts
Jt107 is an unknown quantity at this point
Thanks Greg, it worked. It seems I have to encode it before cfdiv and decode it in the binding url page.

Appreciate your help. Thank you very much.
Jt107 is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 10:44 AM.


Advertisement
Log in to turn off these ads.