I have HTML output similar to this:
<select>
<option value="1">Item1 </option>
</select>
How do I use JavaScript to get the value "Item1 " (with the space) rather than "Item1"?
In Internet Explorer all the properties I've tried, e.g. text, innerHTML, data, nodeValue return "Item1" instead of "Item1 ".
Interestingly in Firefox, textC...
I know this seams a trivial question... But how can I disable the annoying javascript error messages?
I am inserting data into an unfinished web application and I keep getting about 30 errors for every form I submit... It's driving me crazy...
I'm using ie7
Please note that I already tried "Internet options - Advanced - Browsing", dis...
So I have ~12600 subnets:
eg. 123.123.208.0/20
and an IP.
I can use a SQLite Database or an array or whatever
There was a similar question asked about a month ago, however I am not looking for checking one IP against one subnet but a bunch of subnets (obviously the most efficient way, hopefully not O(total subnets)) :)
How can I ch...
How can I redirect the user from one page to another using jQuery?
...
I run a couple of game tunnelling servers and would like to have a page where the client can run a ping on all the servers and find out which is the most responsive. As far as I can see there seems to be no proper way to do this in JavaScript, but I was thinking, does anybody know of a way to do this in flash or some other client browser...
I am trying to develop an Online editor (like FCKEditor/etc) but I have no idea how they work. I know that the WYSIWYG ones have Javascript and IFrames, but how do they actually work?
I'm especially curious about having a real-time preview of what's being typed into the editor.
...
Hi All...
I have been trying to use a formula that is used to work out exclusive VAT in a program that our team is creating. The formula works correctly when used in a calculator or in excel, though gives a different output when used within a function in our program!
here is the function:
function fn_calcVat()
{
var vRate = Ext.g...
Hi
I have coded some JavaScript to perform an ajax call in an asp.net application. This triggers a method that calls a URL, sending some parameters in the POST.
The receiving page processes the data and updates our database.
We will be providing this code to customers to allow them to send us the data we need in their checkout process...
Hi,
I have a form which has a lot of SELECTs. For various reasons, I'd like to only pass to the form the ones that are selected by the user. In other words, each SELECT is something like this:
<SELECT name=field001>
<option value=-1>Please pick a value</option>
<option value=1>1</option>
<option value=2>2</option>
<option value...
Hi,
My menu has the colour #006699, when hover I want it to gradually
go over to the colour #4796E9.
Is that possible?
...
View this code:
function testprecision(){
var isNotNumber = parseFloat('1.3').toPrecision(6);
alert(typeof isNotNumber); //=> string
}
I would have expected a number. If 'isNotNumber' should be a real number, recasting is the solution:
alert(typeof parseFloat(isNotNumber)) //=> number
[Edit]
thanks for your answers. Precisi...
Does anybody know if there is some sort of bug or issue with the webBrowser activex control in .NET applications, in this case the embedded browser loads a web page that depends on javascript to play music previews. It works once but if you navigate to a new page in the system it stops working.
Viewing the same site in just a normal IE ...
Hello All,
I am submitting a ColdFusion Form and I want to run some JavaScript to check field validation before I run my ColdFusion code to process the form as needed.
How can I do this? What do I do in JS to call my .cfm file after the form passes validation?
Thanks!
-Jason
...
I am trying to create a small tooltip script that mostly relies on css. The bit of JavaScript I can't figure out is how to position the div based on its distance to the browsers edge.
When the div appears I would like it to check how close it is to the top, bottom, left and right. For example if there is not enough space to display the ...
A response on SO got me thinking, does JavaScript guarantee a certain endian encoding across OSs and browsers?
Or put another way are bitwise shifts on integers "safe" in JavaScript?
...
For various silly reasons, I'd like to be able to detect the rectangle of the browser window on screen. Title bar and all.
Is this possible, or is JavaScript limited to the view port of its page?
Edit: I may have been unclear, but view port is the portion of the page that's visible in the window. This may not be a term commonly used w...
jQuery UI Sortable + Draggable 1.6rc5
WHAT I AM DOING: Creating a calendar with varying date ranges (ex: could be 1 week displayed, could be 20 weeks displayed). This calendar has events in each day, and the events are sortable within the day itself, as well as between all other days on the visible calendar. My average calendar date r...
Alright, I find the code below to be quite repetitive and annoying. Any other way to refactor the code without using an array as a starting point (that is, to avoid using array[x], array[y], array[z] later on in the code as a result of starting with an array because x,y,z are completely unrelated and it makes no sense to group them for t...
I have a string that looks like "(3) New stuff" where 3 can be any number.
I would like to add or subtract to this number.
I figured out the following way:
var thenumber = string.match((/\d+/));
thenumber++;
string = string.replace(/\(\d+\)/ ,'('+ thenumber +')');
Is there a more elegant way to do it?
...
Do you have any suggestions or examples on how to deploy minimized (min) versions of JavaScript files using NAnt?
Are there any good command line applications, or scripts to assist with minimizing or packing JavaScript on Windows?
...