javascript

Compare array in javascript

What I'm trying to make is a check list for a lotto game, which is a sort of bingo for my family. I will first try to explain what the check list does and why, excuse my technical english, I'm dutch, so some words can be wrong :) I have a list with a couple of people who play the lotto/bingo game. All players pick 10 numbers and once a ...

Javascript and shrinking a div section

Hi I have a div section on my .ASPX form. The section just contains a load of links (standard document.getElementById('Side1').style.display = 'none'; This worked great but was a bit abrupt for what I wanted, so I wrote the little routine below (with a little help from the internet) but although the DIV dection shrinks, and the cont...

Get subdomain and load it to url with greasemonkey.

Hi! I am having the URL http://somesubdomain.domain.com (subdomains may vary, domain is always the same). Need to take subdomain and reload the page with something like domain.com/some/path/here/somesubdomain using greasemonkey (or open a new window with URL domain.com/some/path/here/somesubdomain, whatever). ...

Using FCKEditor across domains

I have a site where I'm moving all its components over to a cookieless domain. i.e. my site is example.org.uk and the cookieless domain is examplestatic.me.uk. I am using FCKEditor as a part of this site, but it doesn't load properly when I set the source to examplestatic.me.uk/fckeditor/fckeditor.js. How can I get FCKEditor to work on...

Invoking :hover pseudo-class by transferring events via JavaScript

Here is the scenario: You have two images and they are stacked on one another. The highest-order z-indexed image is responsible for handling click events (think Google's Map API) and is transparent, while the image below is responsible for a visual representation. Here is a pseudo-HTML/CSS representation: div.visual-container { wi...

JQuery .click() event troubles

Here's a snippet of my code: $(".item").click(function () { alert("clicked!"); }); And I have (hypothetically; in actually it's far more complicated) the following on my page: <a href="#" class="item"><img src="1.jpg" /></a> However, when I click the image, I do not get an alert. What is my mistake? ...

GeoLocation API

Hello all, I have just come across this great API: http://ipinfodb.com/ip%5Flocation%5Fapi.php However, I would like to also retrieve the continent. Is this even possible as I can not find it. Maybe there is another API that is freely available that will offer city, country and continent? I have tried Googles AJAX API but they don't o...

Any Javascript Engine for .NET/C#?

I'm looking for an open source javascript engine for .NET. Thanks. ...

Can I handle an ALT+TAB key press within my web page?

I realize this is a program switcher key combo in most OSs. Is there a possibility of capturing such an event in the web page via JavaScript? ...

Is there a native Javascript implementation of jQuery's document.ready()?

$(document).onload() it's internally implemented by window.onload event then what about $(document).ready() what's the native javascript to implement it? ...

jquery subgrid with json

I am working with jqgrid. i have need to implement subgrid of grid. my code is as follows: <div class="ww90p"> <!-- class="sheet"--> <div class="" > <table id="setcols" class="scroll"> </table> <div id="psetcols" class="scroll"></div> </div> </div> $("#setcols").jqGrid( $.extend( {}, jqGrid_normal, { url: "/account/c...

JavaScript error - please help

Using IE 6/7/8, I receive a JavaScript error code. The line of code is: document.getElementById('all').style.backgroundColor = color; The IE 6/7/8 is: Invalid property value Thanks in advance! ...

How can I create a zero-padded string representation of a number in an arbitrary base?

Possible Duplicate: How can I create a Zerofilled value using JavaScript? When I convert a # from base 10 to base 16 hex using JavaScript, it doesn't zero pad the number. For example: var myBaseTenNumber = 0; myBaseTenNumber.toString(16); // should be 00 but it's just 0 Any easy way to zero pad my number to be 2 digits in l...

javascript homework question on converting decimal to hex

What is the hexadecimal equivalent of number 264 and 140 ? Please give me full coding of this program. ...

What is 'this' before an object is instantiated in js?

I don't understand the following: var x = function() { this.foo="foo"; return function() { this.bar = "bar"; return foo+bar; }; }(); // returns inner alert(x()); // 'foobar', so both 'this' variables are set alert(x.bar); // undefined - but wasn't it used correctly? alert(new x().bar); // ok, works My assumption was that a def...

How can I pass the value of a control in a datalist to JavaScript?

I have a datalist like this: <asp:DataList ID="dl" runat="server" Width="301px" onitemcommand="dl_ItemCommand"> <ItemTemplate> <table style="border:solid 1 #CCCCCC" > <tr align="left"> <td align="left"> <img id="imgPhoto" runat="server" alt="Company Logo" ...

How to get javascript in an iframe to modify the parent document?

So I have two documents dA and dB hosted on two different servers sA and sB respectively. Document dA has some JS which opens up an iframe src'ing document dB, with a form on it. when the form in document dB is submitted to a form-handler on server sB, I want the iframe on page dA to close. I hope that was clear enough. Is there a way ...

access denied using asp's MSXML2.XMLHTTP

Set oXMLHttp=Server.CreateObject("MSXML2.XMLHTTP") On Error Resume Next oXMLHttp.open "GET", "http://xxxxxx.com",False oXMLHttp.setRequestHeader "Content-Type", "application/x-www-form-urlencoded" oXMLHttp.send() x = oXMLHttp.responseText I'm getting this error: Access Denied ...

How to GetVariable() flash class variable?

I want to use javascript flash method GetVariable() to get variable from flash. I can get variable "foo" from default timeline by GetVariable("/:foo"). But I don't know how to get class static variable "bar" from this actionscript package abc { class def { public static var bar:Number; } } If you could provide re...

How to manipulate appended content? Jquery.

Hello! I'm with Jquery. I appended html to a div like that: $('div#byletter').append(createLettersHtml()); The createLettersHtml function creates a list of letters (links) all wrapped in 'div.ln-letters'. Then I want to call a 'onclick' event like that: $('.ln-letters a').click(function(){ alert(123); }); but nothing happe...