i am new to programming and i have been given an assignment.
the task is:
"place the words in the string "tx_val" in a table with a one pixel border,
with a gray backgound. ... |
How would you do this...?
I am trying to write a string transformer, which capitalises certain letter in string.
Examples
lorem lipum lampum => lorem Lipum lampum
popud pidem papusek => popud pidem Papusek
Thanks!
|
I've done this in JavaScript but needless to say I can't just swap it over.
In Jscript I used this:
var estr = tx_val
index = 0
positions = []
while((index = ...
|
Everything was fine until when I wanted to calculate the difference between the two values and I got 0 as a result.
I'm really new to this, I'm sure it's really ... |
Hi im new to javascript and im trying to figure out how to append a string after an allotted amount of time.
After 3 secs append string (How)
After 3 secs append string ...
|
hi i want to a one line of code (without using loop) in javascript to find the if there is semicolon in a string... please help if any one knows
|
Is there any reason I should use string.charAt(x) instead of string[x]?
|
|
Possible Duplicate:
When is it better to use String.Format vs string concatenation?
Hi? I am writing String Interpolation for an open source Javascript library. I just ... |
My url will look like this:
http://www.example.com/category/action
How can I get the word "action". This last part of the url (after the last forward slash "/") will be different each time. ... |
I'm looking for a library that provides functions for working with Strings (like Underscore does for Arrays, for instance). jQuery's trim is nice, but there could be many others - startsWith, ... |
My web app has a class for analysing and manipulating the data stored in the URL's hash, which look something like
http://myapp.com/#!/location/hornsea/season/spring/facilities/+shop+swimming-airport/size/50
To be able to unit test the various permutations I'm storing ... |
I have a function that fixed non-printable characters in C# for JavaScript. But it works very slow! How to increase speed of this function?
private static string JsStringFixNonPrintable(string Source)
...
|
I know nothing about javascript.
Assuming the string "3005600008000", I need to find a way to multiply all the digits in the odd numbered positions by 2 and the digits in ... |
I'm really stuck here and I've tried a bunch of different solutions to try to fix the problem, but I can't seem to find a solution. The problem is that I'm ... |
I'm trying to build JavaScript code that reads one string (say a sentence of English text), then outputs another string of (comma-separated) words that were "uncommon". Something like:
...
|
Say I have:
var str = "this is a string separated by spaces";
and I did:
alert(str.split(" " , 1));
the outcome would be "this"
Whereas I want the outcome to be "this,is a string separated ... |
In javascript, how do I know if a string has a a-z in it? Is there a simple function?
|
I've seen this question asked before, though in these cases the poster wanted to encrypt something (usually a url) on a public facing website, and the responses were mostly "don't!". In ... |
I am being passed a string similar to below.
"Users_Controller.login"
"Users_Controller" represents the object below.
And "login" a method within it.
var Users_Controller = ( function () {
return{
login : function(vo, callback)
...
|
Why is it that an empty string evaluates to false in JavaScript. I know Douglas Crockford has spoken quite a bit about truthy and falsy in javascript but this still surprised ... |
var x = e.pageX;
var myX = $(this).html();
var difference = myX - x;
var ex = myX + difference;
Everything workes until the last row. It doesn´t make an addition, it puts together the ... |
how can I do it in javascript? With ruby I used this library:
http://ruby-doc.org/stdlib/libdoc/abbrev/rdoc/index.html
is there anything similar for javascript?
|
I'm trying to determine the user locale date format via JavaScript but can't for the life of me get any browser to actually change the output of date.toLocaleDateString() to a different ... |
I'm trying to list all three letter permutations and this is the code I have -
window.permute = function(){
var alphabet = "abcdefghijklmnopqrstuvwxyz";
var ...
|
I have group of checkboxes nearly equals to 100 all are with name checkbox1...checkbox1oo. I am getting a string from database in the bit format. Now I need to check checkboxes ... |
Possible Duplicate:
JavaScript: string contains
I'm looking for an algorithm to check if a string exists in another.
For example:
'Hello, my name is jonh LOL.'.contains('Hello, my name ...
|
$("body").append( "<p id='Zoom'>Send to: <b>"
+ full + "</b> <div id='fb-root'></div><script src='http://connect.facebook.net/en_US/all.js#xfbml=1'></script><fb:send href='"
...
|
Given the code below:
alert(encodeURIComponent("1\0" + "2")); // shows 1%002
alert(encodeURIComponent("1\02")); // shows 1%02
Why is there a difference in the output?
|
Something wierd is happening in my javascript and i dont understand it. Can anyone explain?
var adsl2pSpeed = '9500 - 12500';
alert(adsl2pSpeed);
...
|
I've heard of 'injecting' JavaScript, but I'm not fully sure on what it does, or how you do it. But I'm wondering if you can inject it into a site in ... |
Possible Duplicate:
Repeat String - Javascript
'h' x n;
Here n is a variable, and the generated string should be n times duplicate of h:
hh..h( n occurance ...
|
While using gjslint, I got a hint: "Single-quoted string preferred over double-quoted string".
So why? I'm a little confused with this. Why single-quoted preferred?
Hope to get some help. Thanks all.
|
<script type="text/javascript">
var step = 4;
function expandPanel()
{
...
|
Where is localstorage strings stored on the operating system? Is it in Firefox's Profile folder?
|
I'd like to be able to set default placeholders for string really easily like this
someString.placeholder("waiting for text")
Which could be used like this...
$("p.some-class").html( someString.placeholder("waiting for text") );
so if 'someString' is empty, ... |
Look at the below code, this JavaScript is used to take a string (in a language other than English) and convert it into English.
<script type="text/javascript">
google.load("language", "1");
...
|
I am trying to pull out a number from a string like so "item_2445_205". So I need to pull out "2445" as the item ID and discard the rest. What ... |
Here's my code:
$("#ddlCiudad").change(function () {
var idCity = $("#ddlCiudad").val();
$.getJSON("/ProductCheckout/GetPriceForLocation", { cityId: idCity, productId: idProduct, type: "land" },
...
|
I need to build a dynamic string as for each data. This string will set up an HTML button, when event click will call a function. I'm having problems with the ... |
I am new to jquery and haven’t spend much time with JavaScript either. What I am trying to achieve is to create a function that open a colorbox based on the ... |
var freebie = ' \
<div class="item'+last+'" data-type="psd" data-visited="false"> \
<div class="baseBubble" /> \
<div class="baseStroke" /> \
...
|
On Firebug:
>>> str1 = String('String One');
"String One"
typeof(str1);
"string"
>>> str2 = new String('String Two');
String { 0="S", 1="t", 2="r", more...}
typeof(str2);
"object"
My Question is what is the difference between both technique?
What is the advantage of one ... |
I discovered a peculiarity in JavaScript (or perhaps my browser's idea of it):
var s = "Hello, world";
function foo(arg)
{
console.log(arg);
console.log(this);
}
foo.call(s, s);
Running the above with Firebug ... |
|
var _get = (function() { var i, p, x, obj = {}, x = location.search.slice( 1 ).split( /\&(?:amp\;)?/ ); for( var i = 0; i < x.length; i++ ) { p = x[ i ].split( '=' ); obj[ p[ 0 ] ] = decodeURIComponent( p[ 1 ] ); } return obj; })(); |
|
|
How do I add to string each iteration? Hi guys, I have another assignment where I have to make a few number games. I have done the rest of the program but I am stuck on writing this function. My problem is it asks to add the pattern to a string each time the loop completes. I dont get this. I ... |
Not really sure, PLEASE HELP! InternetSecure Advanced Product String //*Below is the code that i can't get to work. It's suppose to post a product string to internetsecure's gateway. I was successful in building one version of this here is the link below. if you want to take a look at one that works you can view the source from the ... |
|
This is not as easy as it looks. The string to find must be "munged" at the outset as otherwise it will always be found in the variable str2find! Adapt this to your needs:- Code: |
|
|
Hi, String testStr = "false || false || true"; I would like to convert it to something like: if ( testStr == 'true' ) alert('OK'); note: testStr is dynamic i.e: testStr = "false && true || false || true"; or testStr = "true && false || false && false || ...... "; thanks |
Hi, I have this custom prompt box, how can I make the password shown as * when the user types in the prompt box? I have coded like this: var pass = app.response("Please enter Password:", "Document Control Only"); Lastly in the prompt box how can I remove the "Warning: Javascript Window" title? Thank you for any response. |
Code: function putRecD(resp,id) { var c = "'"; var type=document.getElementsByName('type')[0].value; var strTab = " "; strTab += ""; strTab += ""; strTab += ""; strTab += "| Vend | Stock# | MFG No | "; strTab += "Old Description | New Description | ST OH | WH OH | "; strTab += " | | "; strTab += ""; var recs = resp.split("^"); var m=0; for(var i = 1; i | |