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 Quote Link to comment 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? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.