I'm getting this error in java console: "SyntaxError: unterminated regular expression literal"
I really don't understand it. Below is my code, if someone could point out what am I missing I would be forever gratefull.
PHP Code:
print '
<script type="text/javascript">
function fakeUpload() {
$("#fakeupload").val(this.files && this.files.length ? this.files[0].name : this.value.replace(/^C:\\fakepath\\/i, ""));
}
</script>';
Thanks.