javascript

Create a shim overlaying the entire page, but allowing mouseover events in the background

I need to create a shim for the entire page to capture click events, but the shim must not stop other events like mouseover etc on the other html elements on the page. I have solution that sort of works, but I am having a couple of problems with it: Whenever I click on the page, if I click directly on some text, the click event of the s...

Javascript detect scrollbar in textarea

Hi, I was wondering if anybody knows how I would go about detecting when the scrollbar appears inside a text area. I am currently using mootools for my JavaScript but I am really having issues getting it to detect a scrollbar. Any example would be useful thank you!. Jamie ...

why shouldn't we use ++ in javascript?

Possible Duplicate: Why avoid increment (++) and decrement (--) operators in JavaScript? I've heard in a few places that it is not recommended to use ++ & -- in javascript, and we should be using += 1 or -= 1 instead. Can anyone clarify why for me? ...

Is the Android Emulator browser suitable and reliable for testing an HTML/Javascript Application?

I'm developing an HTML / Javascript application meant to run on an Android device running Froyo (2.2). Assuming I don't need multitouch functionality, will the emulator's browser be a reliable means of debugging HTML, CSS and Javascript? Or is it possible that I would work out all the bugs in the emulator but find the actual device handl...

Global Hotkey in Firefox?

Is there a way i can have hotkeys (such as the media buttons) go to the webbrowser and cause a javascript event? I except a firefox extension is required and i am ok if the solution requires greasemonkey as well (i seen growl use them both for javascript interaction. But thats javascript->pc not the other way around) -edit- is this not...

How to add Javascript code using jQuery and setTimeout()

I have some tracking code that the provider (WebTraxs) says should be placed at the bottom of the tag. The problem is that this same code is causing everything on the page (including my jQuery code) to run AFTER the WebTraxs is executed. This execution sometimes takes long enough where images rollovers, etc aren't working because the ...

Jquery Ajax Validate Checkboxes

Probably a simple solution so I'm a bit embarassed, but JS is not really my forte so I figure I'll ask. I'm using the Jquery Form plugin to submit a group of checkboxes for requirements for an event planning app I am making. I'm having trouble making my validation presubmit callback refuse the form if there is no array key for 'require...

Best editor/IDE(?) for Javascript / PHP development

Possible Duplicate: Better PHP,MySql,HTML and JavaScript IDE I'm primarily a C#.NET developer, and dabble with VB.NET when I need to for dealing with older applications within the organisation. I have been doing more work with PHP and Javascript lately, mainly in the domain of Wordpress. I think Visual Studio is a great IDE,...

Should jQuery's parseJSON/getJSON methods be used?

I noticed that the jQuery parseJSON basically does a simple regex "check": parseJSON: function( data ) { if ( typeof data !== "string" || !data ) { return null; } // Make sure leading/trailing whitespace is removed (IE can't handle it) data = jQuery.trim( data ); // Make sure the incoming data is actual JSO...

What's the difference between this two ways of defining a function in JavaScript?

Possible Duplicate: Javascript: var functionName = function() {} vs function functionName() {} Way 1: function fancy_function(){ // Fancy stuff happening here } Way 2: var fancy_function = function(){ // Fancy stuff happening here, too. } I use the former when I'm just defining a "normal" function that I'm gonna ...

Javascript - how do i set the 'this' variable for a function

I have a function which takes a callback function. How can I set the 'this' variable of the callback function? eg. function(fn){ //do some stuff fn(); //call fn, but the 'this' var is set to window //, how do I set it to something else } ...

text area like FCK editor

I would like to develop a html editor just like FCKeditor, but i dont know how they display the html code in text area like region, Will U pls help me with that? for having that textarea, which prase html codes and displays just like a web page? ...

Strange behavior with URL fragments and onclick in iOS Safari

I have run into a strange problem in mobile Safari on my (iOS 4) iPod touch. The minimum body HTML to demonstrate this problem is: <p> <a href="" onclick="event.preventDefault()">Click</a> </p> <p id="anchor"> Anchor </p> When the page is loaded with no # fragment in the URL, clicking the link executes the onclick javascript, ...

javascript catch paste event in textarea

Hi, I currently have a textarea which I requires control over text that has been pasted in, essentially I need to be able to take whatever the user wants to paste into a textarea and place it into a variable. I will then work out the position in which they pasted the text and the size of the string to remove it from the textarea, The...

Is there any point to JavaScript minification if you have compression turned on?

If your website has deflate/zip compression enabled is there any point to JavaScript minification? My theory is that the difference between a compressed minified JavaScript file and a compressed unminified JavaScript file is negligible. There are very few browsers left out there that don't support compression. I would imagine that some...

CKEditor 3.x Plugin Development Question, contextmenu

So far I have figured out how to make dialogs, return values and insert new html and elements. My comment sections are as follows: <span id="comment4" comment="this is a comment"> <p> This is some HTML. </p> </span> I'm having a difficult time getting the editor to recognize that a particular section has a comment and adding ...

Javascript validation

I have two input fields holidayDate and Description(id=tags) <html> <head> <script type="text/javascript"> $(document).ready(function() { $('#holidayDate').datepicker(); var availableTags = ["New years Day", "Martin Luther King Day","Groundhog Day", "Valentine's Day", "Washington's Birthday", "Easter", "Earth Day", "National Arb...

conditional javascript in .ascx

I have a javascript src that i need to add to some of the pages in a site. for example <script type="text/javascript" src="http:abcxyz.com/zzz"></script> I want to add this conditionally on a .ascx page - if the Request.ServerVariables["SCRIPT_NAME"] ends with certain criteria. The ascx language is vb, and there is no code behind. T...

"Easter Egg" in link - activated by CTRL + click

Hi guys I'm working on a project for a client, and we want to make a easter egg, when you click some of the letters in the logo. There are three letters, and you have to click in the right order, before it activates the easter egg. However, because it's in a link, I wondered if I could use CTRL+Click...? I've searched the web, but coul...

Why does jquery fadeOut act strangely with setTimeout?

I have this code: clearTimeout(tooltiptimeout); tooltiptimeout=""; $("#tool").fadeOut("slow").queue(function(){ tooltiptimeout=setTimeout(function(){ $("#tool").css("left",item.pageX-33); $("#tool").css( "top",item.pageY-95); $("#tool").fadeIn("slow"); }, 1000); $(this).dequeue(); }); What it shoul...