I have an HTML table which may contain thousands of rows (number of columns is not a problem here).
I would like to be able to browse this table easily and be able to do the following:
Decide how many rows will be presented
Jump to the next/previous X number of rows
Scroll the table using the scroll bars to any desired line
Be able to customize/extend easily this Javascript/jQuery code
Has anyone seen something similar ?
Thank you very much !
So I'm searching for a good crash course on localstorage and interacting with it in Javascript. I want to build a to-do list webapp with some extra functionality but it would be just for 1 user. I don't want to mess with php/mysql and have the server doing anything. Links to tutorials would be best :-D
I am looking for the best way to augment multiple javascript associative arrays.
For example the following code
a = { "one" : 1, "two" : 2 };
b = { "three" : 3 };
c = { "four" : 4, "five" : 5 };
d = Collect(a,b,c)
Should result in value of d being:
{ "one" : 1, "two" : 2, "three" : 3, "four" : 4, "five" : 5 };
What is the best way to do this?
How expensive are local variables (var v), global variables (window.v) and cross-global variables (parent.v) in JavaScript, in the major browsers? Has anyone performed any good tests on this one?
Hello,
I have added html controls through javascript, but when the page postback, all of the added controls are lost. Is there a way to retrieve it?
Thanks,
JV
hi,
I'm using the following lines to store the location of an object.
var lightboxTop = $('#lightbox').css('top');
var lightboxLeft = $('#lightbox').css('
left');
I'm successively moving this object in my element, and I want to restore it previous position with the stored variables.
But, I'm afraid javascript is saving the values by reference so I lose the initial positions. Am I correct ? How can I solve this ?
thanks
I'm not that good with regular expressions...
I need a JavaScript regular expression that will do the following:
The string can contain letters (upper and lower case), but not punctuations such as éàïç...
The string can contain numbers (0..9) anywhere in the string, except on the first position.
The string can contain underscores (_).
Valid strings:
foo
foo1
foo_bar
fooBar
Invalid strings:
1foo -- number as first character
foo bar -- space
föo -- punctuation ö
Many thanks!
Is it possible to resize a background image on load using javascript? I don't care about dynamically resizing the image according to window size or anything, I just want to take large images and resize them to a specific width and height so that the full image fits inside a specific layout.
i use this javascript syntax for validating a checkbox...
alert(document.getElementById("ctl00_ContentPlaceHolder1_Chkreg").checked);
if (document.getElementById("ctl00_ContentPlaceHolder1_Chkreg").checked == false) {
document.getElementById("ctl00_ContentPlaceHolder1_ErrorMsg").innerHTML = "please select the checkbox";
document.getElementById("ctl00_ContentPlaceHolder1_Chkreg").focus();
return false;
}
My alert showed me false but my if loop is not working... Any suggestion...
To reduce http request i want to mix multiple jquery plugin's javascript filesa and main jquery file into one.
What things should be considered?
Do we just need to place code from all files into new file one bye one or need to do something more. ?
Hi,
I want to know how can I validate using Javascript that if user has entered any username at the time of creating an account is already present in database and ask user to type any other username?
I'm learning Javascript right now. Can anybody tell me why the second code block traces a empty path for -launch(this)- but using the first code block it gives me the right path?
"<form action='"+launchwebsite+"/subsite/' method='post' target='_blank' onsubmit='launch(this)'>"
and this not:
"<a onclick='launch(this)' title='launch' class='iblack' /></a></div>"
Best
Uli
Hey,
I'm having some issues trying to decode some javascript.. I have no idea what kind of encoding this is.. i tried base 64 decoders etc. If you can please help me out with this, here's a fragment of the code:
\x69\x6E\x6E\x65\x72\x48\x54\x4D\x4C","\x61\x70\x70\x34\x39\x34\x39\x3
Any ways I can get plain text from that?
Thanks!
i m suffering with Passing values from javascript function to controller in cakephp and get using $_POST.
i have tried it by different ways but didn't get success please suggest........
I'm working on a customized calculator, which is working pretty well except that I can't figure out how to get the generated numbers to display commas within the number. For example, it might spit out "450000" when I need it to say "450,000". This thread gives a number of suggestions on how to create a new function to deal with the problem, but I'm rather new to JavaScript and I don't really know how to make such a function interact with what I have now. I'd really appreciate any help as to how to get generated numbers with commas! :)
HTML:
<table id="inputValues">
<tr>
<td>Percentage:</td>
<td><input id="sempPer" type="text"></td>
</tr>
<tr>
<td>Price:</td>
<td><input id="unitPrice" type="text"></td>
</tr>
<tr>
<td colspan="2"><input id="button" type="submit" value="Calculate"></td>
</tr>
</table>
<table id="revenue" class="TFtable">
<tr>
<td class="bold">Market Share</td>
<td class="bold">Partner A</td>
<td class="bold">Partner B</td>
</tr>
<tr>
<td class="bold">1%</td>
<td><span id="moss1"></span></td>
<td><span id="semp1"></span></td>
</tr>
</table>
</form>
JavaScript:
<script>
function calc() {
var z = Number(document.getElementById('sempPer').value);
var x = Number(document.getElementById('unitPrice').value);
var y = z / 100;
var dm1 = .01 * 50000 * x * (1-y);
var se1 = .01 * 50000 * x * y;
document.getElementById("moss1").innerHTML= "$"+Number(dm1).toFixed(2);
document.getElementById("semp1").innerHTML= "$"+Number(se1).toFixed(2);
}
</script>
I'm looking for a light-weight UI toolkit written in Javascript (something like Swing) but I'd rather not use ExtJS because I fear that will slow things down tremendously. Are there any small UI toolkits out there that mainly focus on layouts?
I have an activex plugin here:
http://reboltutorial.com/plugins/logo-badge/
I tried by adapting the script http://forums.devarticles.com/javascript-development-22/detecting-activex-objects-installed-in-ie-11041.html to
<script>
//if RPluginIE is not installed
if( !document.RPluginIE){
document.loction.href = "Notfound.html"
}
</script>
but it doesn't work.
How to detect for any activex ?
I'm trying to clean some html text with javascript, there are white spaces included before and after some words (text is poorly formatted).
Currently I have this regex:
$("#" + target + " *").replaceText(/([\S][\u05B0-\u05C4]*)/gi, '<span class="marked">$1<\/span>');
This will capture all the non white-space characters and wrap them in a span element, but will not capture spaces between words (I need the span).
How would you solve this?
We have javascript files that are environment specific, and so I was thinking of going down the path of creating a generic way to read in an XML (config) file to store different environment specific settings. I was curious to know if anybody else on here does that (or if not, is there a reason why you don't)?
Hi,
Is there anyway in JavaScript which emulate user clicks an anchor?
Mozilla(Firefox ) does not implement that.
https://developer.mozilla.org/en/DOM/element.click
But is there any browser which does?
I am not very familiar with the Javascript syntax bellow. Can anyone shade light about the sense of this block? For what purpose?
(function foo() {
alert('bar');
})();
Thanks in advance.
Am unable to add elements to a dropdown list via Javascript.
The below piece of code works in IE and Chrome, but not in firefox.
ddlId.add(new Option("",0));
In firefox, I keep getting an 'Not enough arguments' exception. Any idea on how to resolve it? Thanks
Hey Guys, I was wondering if there is a "maximum" of data a javascript application can store. I guess this is handled by the browser and that each one has it's limitation? Am I guessing right? Wrong? If there isn't a limit, will a page file be created (wouldn't be very secure I guess).