LyndonOHRC
Programmer
I hope this is the correct forum; I couldn't decide between this and ColdFusion. Sorry if I'm wrong on this.
I'm working on a pick list that will populate a text input when clicked. The onclick value results in error because some data rows have an apostrophe in the data.
I'm at a loss as how to proceed from here... Any help appreciated.
Note: A quote could occur as well.
Server Side (Cold Fusion):
Results in this html (the row where value=8296 fails):
Lyndon
---People Remember about 10% of what you say ---They never forget how you made them feel. Covey
I'm working on a pick list that will populate a text input when clicked. The onclick value results in error because some data rows have an apostrophe in the data.
I'm at a loss as how to proceed from here... Any help appreciated.
Note: A quote could occur as well.
Server Side (Cold Fusion):
Code:
<div id="StallionList#i#" style="display: none;" onclick="document.getElementById('StallionList#i#').style.display='none';">
<ul id="ulStallionList#i#" class="suggestList">
<cfloop query="getSireList">
<li value="#getSireList.OBNO#" onclick="document.getElementById('StallionName#i#').value='#getSireList.Name#';">
#getSireList.Name#
</li>
</cfloop>
</ul>
</div>
Results in this html (the row where value=8296 fails):
Code:
<li value="28542" onclick="document.getElementById('StallionName1').value='ALARMER';">
ALARMER
</li>
<li value="8296" onclick="document.getElementById('StallionName1').value='ALBIE'S TRUCK STOP';">
ALBIE'S TRUCK STOP
</li>
<li value="38418" onclick="document.getElementById('StallionName1').value='ALBIES TRUCKER';">
ALBIES TRUCKER
</li>
Lyndon
---People Remember about 10% of what you say ---They never forget how you made them feel. Covey