javascript

New page opens in new window, not new tab in Firefox

I have a site consisting of a frameset with two frames. One of the frames opens a new document ala... var myWin= open("","ImgWindow","status=yes,toolbar=yes,menubar=yes,scrollbars=yes"); myWin.document.open(); My Mozilla Firefox 3.0.19 is configured to open new pages in tabs, not windows. Firefox opens the document in a new Window...

Google Maps API v3: Labelling a circle

I'm using the following code to generate a circle on a map using the Google Maps v3 API: var postcode_a = new google.maps.Circle({ center: postcode_a_location, map: map, radius: 70, fillColor: "#3da5e1", fillOpacity: 0.5, strokeColor: "#2b546b", strokeWeight: 1 }); What I would like to do is place a text label in the centre of ...

Add Javascript syntax highlighting to the HAML TM Bundle

I have the HAML TextMate bundle and inside of the :javascript block, I'd like to have proper javascript syntax highlighting. How could I modify the HAML bundle to do this? ...

Is it possible to use the Google Analytics API to provide stats for customer's page views?

Let's say I run a site where customers are willing to pay for a page that shows some sort of cool info about them. The whole site is tracked using Google Analytics. To provide stat tracking for the customers, would it be possible to mine the data from Google Analytics, using the AJAX API? Are there any show-stoppers I should look out ...

Is readable source code available for google's bouncy ball doodle?

If you haven't seen the current google doodle, you should check it out. Basically, it's a bunch of balls that fly from the mouse. Its coded differently in IE to other browsers. In IE, it's done with . characters, whereas other browsers use border-radius. I've found the source code within the page (included below for completeness, aft...

Finding core javascript calls that are incompatible with IE6/7/8

Hey is there a jslint-like inspector that will flag on calls that are incompatible with older versions of IE? or just cross browser incompatible calls in general? ...

Should I be learning Flash/Flex/ActionScript or HTML/CSS/JS ("HTML5")?

I'm fairly new to this whole web-development thing (2 weeks maybe, my 1st scraping of code exists here, I quite like it) and I ended up learning to use Adobe's Flash Builder 4, which I have come to quite like (although Action Script annoys me at times). Recently however I've been reading a lot about "the future" of web development, RIAs...

HTML CSS Remainder of space

How do I get the footer to take up the remainder of the page's vertical space without actually knowing how tall the content is? I can't figure out how to use javascript/css to accomplish this... Just to be clear... Scenario 1: The content ends halfway through the page, the footer would take up the remaining half. No scrollbars necessar...

Google classic home: September 7, 2010

Can anyone explain exactly what is going on with the Google homepage today? It seems like a lot of divs moving around? Not a canvas in sight. http://www.google.com/ ...

Are any Javascript engines tail call optimized?

I have a tail recursive pathfinding algorithm that I've implemented in Javascript and would like to know if any (all?) browsers would possibly get stack overflow exceptions. ...

I have an issue with secret question input regular expressions In Javascript

Any suggestions on how to include double quotes ("") in this expression? InputField("tSecAnswer1", /^(?=.*[a-zA-Z\d])(\w|[\s\.\@\-\?\,\&\/\_\#\+\(\)\"'"]){3,50}$/); ...

What is event.clientY?

I have this code and wanted to know what all those event.client do? document.body.ondblclick = function(){ var dclick = false; if(event.clientX > 8 && event.clientX < 204){ if((event.clientY > 88 && event.clientY < 129) || (event.clientY > 129 && event.clientY < 171) || (event.clientY > 172 && e...

How to implement a "EndsWith" on a string?

I have a string var s1 = "a,$,b,c"; I want to check if another string ends with s1 So if I send these strings it has to return true w,w,a,$,b,c ^,^,^,$,@,#,%,$,$,a,$,b,c a,w,e,q,r,f,z,x,c,v,z,$,W,a,$,b,c And for these false a,$,b,c,F,W a,$,b,c,W a,$,b,c,$,^,\,/ How can I check it? ...

Is there a client side tool like Xenu?

I want a tool like Xenu's Link Sleuth developed using JavaScript because I cannot use any sever side scripting. Alternatively, can you offer any tips and links to help to develop a client side tool. ...

javascript div container width resize problem

hej guys, I've got a problem trying to resize the width of a div container. I really don't know why it's not working... Thx for responding. here's the code: It really works with Google Chrome. But with IE or Firefox just won't work. <div id="div1" style="position:relative; background-color:#000000; width:100px; height:20px; color:#ffff...

jQuery pagination for json results

What is the best way of doing a pagination? I would also need to save the current page, so that when I click a link it would save the page I was on. So if I'm on page 2 of the pagination and click one link and then get back to pagination page it would remember that I was on page 2. I get the results/data from Json request where I have o...

call backs / que loading - call function after complete

What would be the best way to call render() once all the imageData vars have been populated? would I just call them all in sequence using callbacks, and call render, or is there a better method? function loadImageData() { //Get Background Image Data var backgroundImg = loadImage(background, function(){ ...

JS: Remove Element from an Array based on RegExp

So I have a JavaScript array going somewhat like screw cap bottle [tech.] nonreturnable bottle magnum empty tank diving magnetic bottle [tech.] unbreakable bottle full tank diving Stuff (5 of 5) eine Flasche austrinken ein Baby mit der Flasche ernähren ein Baby mit der Flasche füttern mit der Flasche aufziehen My probl...

Plugin to automate multiple searching?

Is there a Firefox plugin I can use to help automate multiple searches? i.e. I have a list of keyword combinations and I want to automatically paste each combination into a form like below and open each search in a new tab http://scholar.google.com/advanced_scholar_search The actual website I'm using is ISI Web of Science. It has a sim...

jQuery table rows are not showing properly in Firefox

This is the piece of code I have written: <html> <head> <script type="text/javascript" src="jquery-min.js"></script> <script type="text/javascript"> ...