Hi, I have a problem in my code. I want to get the b tag that has the style color silver using Javascript. I tried using the tagName === "B" but it didn't work. I figured that the B tags are not children of the rowData class.
<tr class="rowData">
<td style="padding: 0pt;">
<table><tr>
<td>
<b style="fo...
I've got an html table thus:
up | dn
[ ] Item 1
[x] Item 2
[ ] Item 3
[ ] Item 4
[x] Item 5
[ ] Item 6
[ ] Item 7
If 2 & 5 are checked and I click up, the result is:
up | dn
[x] Item 2
[x] Item 5
[ ] Item 1
[ ] Item 3
[ ] Item 4
[ ] Item 6
[ ] Item 7
If I click dn, the result is:
up | dn
[ ] Item 1
[ ] Item 3
[ ] ...
Is it possible to change the contents of elements when they, or a part of the text within them, is selected then reverting them back when they are deselected?
The aim being that when they are copied to the clipboard the alternate value is copied.
The html looking something like this:
<p>Today is the <span class="date" value="18/03/200...
I'm surprised that there is no "text-decoration: reverse" in CSS as it seems very awkward to achieve using JavaScript. I.E. set the element's foreground and background color to the background and foreground of the parent respectively.
I noticed JavaScript techniques for that here
Surely it's not that complicated?
...
I am after a regex that will match numeric values with up to a user defined number of decimal places. Currently I have
/(^-?\d\d*\.\d*$)|(^-?\d\d*$)|(^-?\.\d\d*$)/
which will allow as many places as input but I would also like to sometimes allow 2 for currency or 4 or more for other input. The function I am building is
var isNumeric...
I'm developing a website with Ruby on Rails and I have a div with some content. After clicking a link I want that content to get replaced with some other stuff. This works fine with replace_html and rjs.
However, I'd prefer there to be a slight fade/appear (crossfade?) transition between the old and new content. Also the div will be ...
I have a function (that I can't change) that queries data from a database and returns it in a variable that shows as the following format if I display it as text:
var outputdata=
[
{ itemA: 'M0929', itemDate: new Date(1950,03-1,25,0,0,0,0), itemID: 'JDR12' },
{ itemA: 'X0121', itemDate: new Date(1983,07-1,07,8,0,0...
Can JavaScript load an RSS XML feed from Yahoo?
Is client-side JS allowed to access 3rd-party domains?
...
I am using jQuery and I need to get the local time for Germany.
Anyone coming to my website from any country should be able to know what time it is in Germany.
If the time is between 0:00 and 12:00 I need to make an alert reading: "Good Morning".
If the time is between 12:00 and 17:00 I need to make an alert reading: "Good Afternoon"....
I want to animate a scroll to the bottom of the viewport with jQuery. Is there a plugin available which isn't overkill (i.e. without a huge feature set for this small task);
Is there a plugin available or a way to do this natively with jQuery?
...
Hi there,
I have some code for validating date below:
function validateForm() {
var errFound = 0;
//var patt_date = new RegExp("^((((19|20)(([02468][048])|([13579][26]))-02-29))|((20[0-9][0-9])|(19[0-9][0-9]))-((((0[1-9])|(1[0-2]))-((0[1-9])|(1\d)|(2[0-8])))|((((0[13578])|(1[02]))-31)|(((0[1,3-9])|(1[0-2]))-(29|30)))))$");
var pat...
Are there any JS Framework that can be incorporated with CruiseControl.NET ? Or what's the best JS Framework that have an intensive unit testing feature.
...
How do I handle asynchronous calls to make sure they do not overlap?
This is my scenario---
I have a loop and within the loop I make a call to a google API and specify a call back function. My callback function processes the results and writes the output to a table.
However I have noticed that the results being written to the table ...
i have a page which calls some contents in an iframe and when i try to print the contents of the iframe it prints blank in google chrome , but its working fine in mozilla and explorer
how can i make it work in google chrome also?
...
In ASP.net, I need the code to fill the text area (in the form) when a button is clicked. Can you help me through by showing a simple .aspx code containing the script tag?
In trying to solve this, I get the following error:
This .aspx document does not contain the definition of addText() function
My .ASPX code is below.
<%@ Page Lan...
I'm doing a select box navigator and wondering if it's better to do a javascript redirect or submit a form and redirect from there. Pros and cons of each?
...
You hear it all over the place: using javascript to sniff the user agent string to detect browser versions is a Very Bad Thing. The latest version of jQuery has now deprecated its $.browser object in place of $.support. But what should I do if there's a bug or problem which is only affecting IE and not the other browsers, and I'm not sur...
I am using Javascript to store values in a stack, the problem is that the stack value remains active until the page is refreshed.
When the page is refreshed the value in the stack value gets set to 'Undefined'.
Is it better to implement a place to permanently store the stack values? Then even if the page is refreshed the old stack value...
I have a string that is like below.
,liger, unicorn, snipe,
how can I trim the leading and trailing comma in javascript?
...
Hi,
I am trying to write a regex to match all the javascript method definitions in a constructor string.
//These two should match
this.myMethod_1 = function(test){ return "foo" }; //Standard
this.myMethod_2 = function(test, test2){ return "foo" }; //Spaces before
//All of therse should not
//this.myMethod_3 = function(test){ return "f...