Tough day. Alzheimers is acting up. I have the following _javascript_ code:

<script language="_javascript_">
<cfloop query="get_individuals">
<cfoutput><cfset valuedata=#cattasc_member_id#></cfoutput>
<cfoutput><cfset optiontext=#WholeName#></cfoutput>
<cfoutput>c=#currentrow#-1;</cfoutput>//599
var nopt = new Option();
<cfoutput>nopt.value = "#valuedata#";</cfoutput>
<cfoutput>nopt.text = "#optiontext#";</cfoutput>
parent.frames[0].document.all.individuallist1.options[c] = nopt;
</cfloop>
</script>

Everything works fine until I get a non alpha-numeric character, i.e., ".", """, "'", "/", "&", "(", ")", in the #WholeName# variable. Then, _javascript_ bombs and returns an error: "error expected ';'".

Can someone help me with handling regular expressions in _javascript_, so the above code will accept special characters in the name? Grateful doesn't begin to describe how I'll feel.

John

________________________________________________________________
Sent via Pastors.com Free WebMail http://www.pastors.com
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to