sandy1028 Posted April 28, 2009 Share Posted April 28, 2009 Hi, Suppose two values are appended with ; i.e for example This is a function function append(){ filter('alerts', document.getElementById('view_alert').value + ";" + document.getElementById('id').value); } and if document.getElementById('id').value has a "," in it. Does it ignores the string after ",". <form onSubmit="append(); return false;"> the value after submitting the form the document.getElementById('id').value doesnot contain string after comma. Link to comment https://forums.phpfreaks.com/topic/155961-escape-in-javascript/ Share on other sites More sharing options...
Axeia Posted April 28, 2009 Share Posted April 28, 2009 and if document.getElementById('id').value has a "," in it. Does it ignores the string after ",". Is that the question? No, javascript doesn't magically start ignoring the rest of a string once it finds a comma. Your alert should show all of the text in both view_alert and id with a ';' in the middle. And please use [code] [/code] tags to post code. Link to comment https://forums.phpfreaks.com/topic/155961-escape-in-javascript/#findComment-821021 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.