Tagged Questions
-2
votes
3answers
44 views
How to remove the spaces in string in javascript [duplicate]
I would like to avoid spaces from a string in javascript. I would like to remove spaces not only infront and after of the string , instead I would like to remove spaces from the string (front,in ...
0
votes
3answers
153 views
Select line breaks and spaces with regex [closed]
I want to select:
[codejs]
function test(){
alert("hello world");
}
[/codejs]
with regular expressions.
can anyone help me ?
EDIT: I try "/\[code.*?\].*?\[/code.*?\]/igm"! but it will work ...
3
votes
1answer
393 views
Visual Studio 2012: change javascript comment style
When I comment out a line in a javascript file in Visual Studio using the shortcut or toolbar button, there is no space before the comment text.
//the way comments are currently formatted
I would ...
-1
votes
3answers
462 views
Keeping spaces in textarea (JavaScript variable)
I have a variable in JavaScript that contains the contents of an html textarea. When I print the variable all that were entered by the user are forgotten. Is there any way to find the spaces in the ...
0
votes
2answers
115 views
Mootools: Selecting an element with a space in one of its attribute
I want to do something like this:
var sp = el.getElement('option[value="Option With Spaces"]');
ie. Select an option element in a select drop down box that so happens to have spaces in the value ...
1
vote
5answers
705 views
Javascript check for spaces
I have this function but I want to check for spaces only in the front and back, not in the middle before i sent back what can i do with it...
function validateNumeric() {
var val = ...
1
vote
1answer
1k views
Javascript remove spaces not working in IE8
I have a select list in my php file:
<select onchange="storePolishType(this.value,this.options[this.selectedIndex].text);" class="drop_down1">
<option value="10">BRP</option> ...
3
votes
1answer
1k views
json fieldnames spaces
I've such a json structure:
info:
{
First Name: "Robert",
Last Name: "Smith"
}
I'm tring to point to data with javascript using something like: "info.First Name"
I know it's incorrect.
How can I ...
0
votes
1answer
164 views
How can you move the cursor in front of inserted text in a custom textbox in Mozilla?
I'm using Firefox 3.6 (must be Firefox 3.6, doesn't need to be cross-browser compatible) and the selection object returned from window.getSelection().
The code below is capturing the tab key and ...
4
votes
4answers
4k views
Javascript window.open url with spaces and %
I'm trying window.open with a url with spaces:
var msg = 'Hello, world!';
var url = 'http://yoursite.com';
var link = 'http://www.twitter.com/share?text=' + msg + '&url=' + url;
...
3
votes
5answers
13k views
Javascript to remove spaces from a textbox value
I've searched around for this a lot and can't find a specific example of what I'm trying to do. Basically I want to get the value of a textbox, by the name of the text box (not id). Then I want to ...
0
votes
1answer
328 views
How to calculate the number of characters(spaces are excluded) within a pair of tags in JQuery or Javascript?
How to calculate the characters(spaces are excluded) within a pair of tags in JQuery or Javascript? What function?
For example:
<pre id="mytext">This is the text. This is the ...