Users Pricing

forum

Home Forums How to replace character in jquery? – MindStick

How to replace character in jquery?

Anonymous User 2261 06 Oct 2014
My Google Map is not reading the values from jquery thus displaying an empty div of where the markers/places should show. But when I add the values in manually from how it is read from the textbox it does display the map with all the markers. So I guessed that the "\" character is the problem. I have tried replacing it with a blank space, but it's not working.
this is code:
var marker = $('#txtMarkers').val();
var markers = marker.replace(/\\/gi, " ");

but it is not removing the "\" character. What can I do to get this right? ...I'm not used to working in javascript/jqeury and is fairly new to this, any help or suggestions will be appreciated.


1 Answers

Markdown for AI

A clean, structured version of this page for AI assistants and LLMs.

Open .md