Cryptic “Script Error.” reported in Javascript in Chrome and Firefox

I have a script that detects Javascript errors on my website and sends them to my backend for reporting. It reports the first error encountered, the supposed line number, and the time. EDIT to include doctype: <!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”> <html xmlns=”http://www.w3.org/1999/xhtml” xml:lang=”en” lang=”en” xmlns:fb=”http://www.facebook.com/2008/fbml”> … <script type=”text/javascript”> //<![CDATA[ // for … Read more

How to verify an XPath expression in Chrome Developers tool or Firefox’s Firebug?

How can I verify my XPath? I am using Chrome Developers tool to inspect the elements and form my XPath. I verify it using the Chrome plugin XPath Checker, however it does not always give me the result. What is a better way to verify my XPath. I have also tried using Firebug to inspect … Read more

How can I inspect disappearing element in a browser?

How can I inspect an element which disappears when my mouse moves away? I don’t know it’s ID, class or anything but want to inspect it. Solutions I have tried: Run jQuery selector inside console $(‘*:contains(“some text”)’) but didn’t have any luck mainly because the element is not hidden but probably removed from the DOM … Read more

Hide Up & Down Arrow Buttons (Spinner) in Input Number – Firefox 29

On Firefox 28, I’m using <input type=”number”> works great because it brings up the numerical keyboard on input fields which should only contain numbers. In Firefox 29, using number inputs displays spin buttons at the right side of the field, which looks like crap in my design. I really don’t need the buttons, because they … Read more

Take a full page screenshot with Firefox on the command-line

I’m running Firefox on a Xvfb in a VPS. What I want to do is to take a full page screenshot of the page. I can redirect Firefox to particular page using firefox http://google.com and take a screenshot (inside X) using ImageMagick import root -window output.jpg The problem is, most of the page need scrolling … Read more