RIRedinPA Posted May 6, 2009 Share Posted May 6, 2009 I have a select list with names from our global email address list. Users can select multiple names to customize an email list within an app I am developing. The select list is formed like this <option value="fname lname(FLname)">fname lname(FLname)</option> I'm using this JS to get the selected names var theselect = document.customemaillist.gal; var theSelectedIndexes = new Array(); while (theselect.selectedIndex != -1) { if (theselect.selectedIndex != 0) { var thename =escape(theselect.options[theselect.selectedIndex].value) alert(escape(theselect.options[theselect.selectedIndex].value)); theSelectedIndexes.push(thename); theselect.options[theselect.selectedIndex].selected = false; } } Problems is with names like this FName O'LastName I'm getting results like this: FName%20O why isn't escape(theselect.options[theselect.selectedIndex].value) making the value FName%20O\'LastName? thanks Link to comment https://forums.phpfreaks.com/topic/157105-escape-problem/ Share on other sites More sharing options...
Ken2k7 Posted May 6, 2009 Share Posted May 6, 2009 Can you alert(thename) and tell me what that alerts? Link to comment https://forums.phpfreaks.com/topic/157105-escape-problem/#findComment-827704 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.