Lifestream - posts tagged 'javascript' http://lifestream.rogeriopvl.com/ Lifestream - posts tagged 'javascript' - posts tagged 'javascript' http://lifestream.rogeriopvl.com/ http://d.asset.soup.io/asset/0177/9229_6712.jpeg 128 128 Back to website... Chrome: "open link in new tab" not firing the click event? {"tags":["javascript","google-chrome","javascript-events","extensions"],"type":"regular","title":"\u003Ca href=\"http://stackoverflow.com/questions/5948205/chrome-open-link-in-new-tab-not-firing-the-click-event\"\u003EChrome: \"open link in new tab\" not firing the click event?\u003C/a\u003E","source":"http://stackoverflow.com/questions/5948205/chrome-open-link-in-new-tab-not-firing-the-click-event","body":"\u003Cp\u003EI'm developing a chrome extension that does something when a \u003Ccode\u003E\u0026lt;td\u0026gt;\u003C/code\u003E tag is clicked in a web page.\u003C/p\u003E\n\n\u003Cp\u003EHere's some sample code:\u003C/p\u003E\n\n\u003Cp\u003EHTML:\u003C/p\u003E\n\n\u003Cpre\u003E\u003Ccode\u003E\u0026lt;table\u0026gt;\n \u0026lt;tr\u0026gt;\n \u0026lt;td id=\"mytest\"\u0026gt;\u0026lt;a href=\"http://blablabla.com\"\u0026gt;Foo Bar\u0026lt;/a\u0026gt;\u0026lt;/td\u0026gt;\n \u0026lt;/tr\u0026gt;\n\u0026lt;/table\u0026gt;\n\u003C/code\u003E\u003C/pre\u003E\n\n\u003Cp\u003EJavascript:\u003C/p\u003E\n\n\u003Cpre\u003E\u003Ccode\u003Evar myTd = document.getElementById(\"mytest\");\nmyTd.addEventListener(\"click\", function() {\n localStorage[\"foobar\"] = 1;\n});\n\u003C/code\u003E\u003C/pre\u003E\n\n\u003Cp\u003EWhen I click the link, the localStorage key is set, if I click it with the mouse middle button, it also sets the key (and opens the link in a new tab).\u003C/p\u003E\n\n\u003Cp\u003EThe problem is when I use right-click and \"open link in a new tab\". In this case the click event doesn't seem to be fired and therefore the localStorage key will not be set.\u003C/p\u003E\n\n\u003Cp\u003EAm I missing something? Is there any way to make the right-click -\u0026gt; \"open link in new tab\" fire the click event?\u003C/p\u003E\n\n\u003Cp\u003EPlease note that I don't want to add the listener to the \u003Ccode\u003E\u0026lt;a\u0026gt;\u003C/code\u003E node, because of some complications in the real HTML I'm working on.\u003C/p\u003E\n\n\u003Cp\u003EThanks in advance.\u003C/p\u003E"} <p>I'm developing a chrome extension that does something when a <code>&lt;td&gt;</code> tag is clicked in a web page.</p> <p>Here's some sample code:</p> <p>HTML:</p> <pre><code>&lt;table&gt; &lt;tr&gt; &lt;td id="mytest"&gt;&lt;a href="http://blablabla.com"&gt;Foo Bar&lt;/a&gt;&lt;/td&gt; &lt;/tr&gt; &lt;/table&gt; </code></pre> <p>Javascript:</p> <pre><code>var myTd = document.getElementById("mytest"); myTd.addEventListener("click", function() { localStorage["foobar"] = 1; }); </code></pre> <p>When I click the link, the localStorage key is set, if I click it with the mouse middle button, it also sets the key (and opens the link in a new tab).</p> <p>The problem is when I use right-click and "open link in a new tab". In this case the click event doesn't seem to be fired and therefore the localStorage key will not be set.</p> <p>Am I missing something? Is there any way to make the right-click -&gt; "open link in new tab" fire the click event?</p> <p>Please note that I don't want to add the listener to the <code>&lt;a&gt;</code> node, because of some complications in the real HTML I'm working on.</p> <p>Thanks in advance.</p>Tue, 10 May 2011 09:58:45 GMThttp://lifestream.rogeriopvl.com/post/130660437/Chrome-open-link-in-new-tab-noturn:www-soup-io:1:130660437regularjavascriptgoogle-chromejavascript-eventsextensions Imran Nazar: GameBoy Emulation in JavaScript: The CPU {"tags":["development","programming","javascript","emulator","gameboy"],"type":"link","title":"Imran Nazar: GameBoy Emulation in JavaScript: The CPU","source":"http://imrannazar.com/GameBoy-Emulation-in-JavaScript:-The-CPU","body":null} <p><a href="http://imrannazar.com/GameBoy-Emulation-in-JavaScript:-The-CPU">http://imrannazar.com/GameBoy-Emulation-in-JavaScript:-The-CPU</a></p>Mon, 11 Oct 2010 15:41:12 GMThttp://lifestream.rogeriopvl.com/post/81537455/Imran-Nazar-GameBoy-Emulation-in-JavaScript-Theurn:www-soup-io:1:81537455linkdevelopmentprogrammingjavascriptemulatorgameboy JavaScript Performance Best Practices - Forum Nokia Wiki {"tags":["performance","javascript","programming"],"type":"link","title":"JavaScript Performance Best Practices - Forum Nokia Wiki","source":"http://wiki.forum.nokia.com/index.php/JavaScript_Performance_Best_Practices","body":null} <p><a href="http://wiki.forum.nokia.com/index.php/JavaScript_Performance_Best_Practices">http://wiki.forum.nokia.com/index.php/JavaScript_Performance_Best_Practices</a></p>Thu, 29 Jul 2010 21:00:29 GMThttp://lifestream.rogeriopvl.com/post/71611611/JavaScript-Performance-Best-Practices-Forum-Nokia-Wikiurn:www-soup-io:1:71611611linkperformancejavascriptprogramming JavaScript Performance Best Practices - Forum Nokia Wiki {"tags":["performance","javascript","programming"],"type":"link","title":"JavaScript Performance Best Practices - Forum Nokia Wiki","source":"http://wiki.forum.nokia.com/index.php/JavaScript_Performance_Best_Practices","body":null} <p><a href="http://wiki.forum.nokia.com/index.php/JavaScript_Performance_Best_Practices">http://wiki.forum.nokia.com/index.php/JavaScript_Performance_Best_Practices</a></p>Thu, 29 Jul 2010 21:00:29 GMThttp://lifestream.rogeriopvl.com/post/68110592/JavaScript-Performance-Best-Practices-Forum-Nokia-Wikiurn:www-soup-io:1:68110592linkperformancejavascriptprogramming Experimenting with Node.js - Jeff Kreeftmeijer {"tags":["node.js","programming","cursor","javascript"],"type":"link","title":"Experimenting with Node.js - Jeff Kreeftmeijer","source":"http://jeffkreeftmeijer.com/2010/experimenting-with-node-js/","body":null} <p><a href="http://jeffkreeftmeijer.com/2010/experimenting-with-node-js/">http://jeffkreeftmeijer.com/2010/experimenting-with-node-js/</a></p>Wed, 28 Jul 2010 09:49:58 GMThttp://lifestream.rogeriopvl.com/post/71611612/Experimenting-with-Node-js-Jeff-Kreeftmeijerurn:www-soup-io:1:71611612linknode.jsprogrammingcursorjavascript Experimenting with Node.js - Jeff Kreeftmeijer {"tags":["node.js","programming","cursor","javascript"],"type":"link","title":"Experimenting with Node.js - Jeff Kreeftmeijer","source":"http://jeffkreeftmeijer.com/2010/experimenting-with-node-js/","body":null} <p><a href="http://jeffkreeftmeijer.com/2010/experimenting-with-node-js/">http://jeffkreeftmeijer.com/2010/experimenting-with-node-js/</a></p>Wed, 28 Jul 2010 09:49:58 GMThttp://lifestream.rogeriopvl.com/post/67860288/Experimenting-with-Node-js-Jeff-Kreeftmeijerurn:www-soup-io:1:67860288linknode.jsprogrammingcursorjavascript A re-introduction to JavaScript - MDC {"tags":["javascript","programming"],"type":"link","title":"A re-introduction to JavaScript - MDC","source":"https://developer.mozilla.org/en/a_re-introduction_to_javascript","body":null} <p><a href="https://developer.mozilla.org/en/a_re-introduction_to_javascript">https://developer.mozilla.org/en/a_re-introduction_to_javascript</a></p>Sat, 17 Jul 2010 22:49:03 GMThttp://lifestream.rogeriopvl.com/post/71611618/A-re-introduction-to-JavaScript-MDCurn:www-soup-io:1:71611618linkjavascriptprogramming A re-introduction to JavaScript - MDC {"tags":["javascript","programming"],"type":"link","title":"A re-introduction to JavaScript - MDC","source":"https://developer.mozilla.org/en/a_re-introduction_to_javascript","body":null} <p><a href="https://developer.mozilla.org/en/a_re-introduction_to_javascript">https://developer.mozilla.org/en/a_re-introduction_to_javascript</a></p>Sat, 17 Jul 2010 22:49:03 GMThttp://lifestream.rogeriopvl.com/post/65885775/A-re-introduction-to-JavaScript-MDCurn:www-soup-io:1:65885775linkjavascriptprogramming Going evented with Node.js - Naked JavaScript {"tags":["programming","javascript","node.js","node","concurrency"],"type":"link","title":"Going evented with Node.js - Naked JavaScript","source":"http://www.nakedjavascript.com/going-evented-with-nodejs","body":null} <p><a href="http://www.nakedjavascript.com/going-evented-with-nodejs">http://www.nakedjavascript.com/going-evented-with-nodejs</a></p>Wed, 25 Nov 2009 00:57:49 GMThttp://lifestream.rogeriopvl.com/post/35614425/Going-evented-with-Node-js-Naked-JavaScripturn:www-soup-io:1:35614425linkprogrammingjavascriptnode.jsnodeconcurrency Node.js is genuinely exciting {"tags":["programming","node.js","node","event","javascript"],"type":"link","title":"Node.js is genuinely exciting","source":"http://simonwillison.net/2009/Nov/23/node/","body":null} <p><a href="http://simonwillison.net/2009/Nov/23/node/">http://simonwillison.net/2009/Nov/23/node/</a></p>Wed, 25 Nov 2009 00:57:19 GMThttp://lifestream.rogeriopvl.com/post/35614427/Node-js-is-genuinely-excitingurn:www-soup-io:1:35614427linkprogrammingnode.jsnodeeventjavascript Learning Advanced JavaScript {"tags":["programming","javascript","advanced"],"type":"link","title":"Learning Advanced JavaScript","source":"http://ejohn.org/apps/learn/","body":null} <p><a href="http://ejohn.org/apps/learn/">http://ejohn.org/apps/learn/</a></p>Tue, 17 Nov 2009 01:01:09 GMThttp://lifestream.rogeriopvl.com/post/34858738/Learning-Advanced-JavaScripturn:www-soup-io:1:34858738linkprogrammingjavascriptadvanced Google Closure: How not to write JavaScript {"tags":["programming","javascript","closure","performance"],"type":"link","title":"Google Closure: How not to write JavaScript","source":"http://www.sitepoint.com/blogs/2009/11/12/google-closure-how-not-to-write-javascript/","body":null} <p><a href="http://www.sitepoint.com/blogs/2009/11/12/google-closure-how-not-to-write-javascript/">http://www.sitepoint.com/blogs/2009/11/12/google-closure-how-not-to-write-javascript/</a></p>Thu, 12 Nov 2009 20:43:11 GMThttp://lifestream.rogeriopvl.com/post/34523394/Google-Closure-How-not-to-write-JavaScripturn:www-soup-io:1:34523394linkprogrammingjavascriptclosureperformance CSSHttpRequest - Hacks - nb.io {"tags":["programming","javascript","ajax","hack","css","crossdomain","csshttprequest"],"type":"link","title":"CSSHttpRequest - Hacks - nb.io","source":"http://nb.io/hacks/csshttprequest","body":null} <p><a href="http://nb.io/hacks/csshttprequest">http://nb.io/hacks/csshttprequest</a></p>Tue, 06 Oct 2009 23:47:24 GMThttp://lifestream.rogeriopvl.com/post/30690716/CSSHttpRequest-Hacks-nb-iourn:www-soup-io:1:30690716linkprogrammingjavascriptajaxhackcsscrossdomaincsshttprequest Building iPhone Apps with HTML, CSS, and JavaScript {"tags":["programming","iphone","webapp","javascript","jquery","css","html"],"type":"link","title":"Building iPhone Apps with HTML, CSS, and JavaScript","source":"http://building-iphone-apps.labs.oreilly.com/","body":null} <p><a href="http://building-iphone-apps.labs.oreilly.com/">http://building-iphone-apps.labs.oreilly.com/</a></p>Sat, 03 Oct 2009 09:57:46 GMThttp://lifestream.rogeriopvl.com/post/30384503/Building-iPhone-Apps-with-HTML-CSS-andurn:www-soup-io:1:30384503linkprogrammingiphonewebappjavascriptjquerycsshtml Caffeinated Simpleton » Blog Archive » An Introduction to JavaScript’s “this” {"tags":["programming","javascript","this"],"type":"link","title":"Caffeinated Simpleton \u00bb Blog Archive \u00bb An Introduction to JavaScript\u2019s \u201cthis\u201d","source":"http://justin.harmonize.fm/index.php/2009/09/an-introduction-to-javascripts-this/","body":null} <p><a href="http://justin.harmonize.fm/index.php/2009/09/an-introduction-to-javascripts-this/">http://justin.harmonize.fm/index.php/2009/09/an-introduction-to-javascripts-this/</a></p>Sun, 27 Sep 2009 21:03:39 GMThttp://lifestream.rogeriopvl.com/post/29838788/Caffeinated-Simpleton-Blog-Archive-An-Introduction-tourn:www-soup-io:1:29838788linkprogrammingjavascriptthis QuirkeyBlog » Blog Archive » Sammy.js, CouchDB, and the new web architecture {"tags":["programming","ajax","javascript","couchdb","sammy","jquery"],"type":"link","title":"QuirkeyBlog \u00bb Blog Archive \u00bb Sammy.js, CouchDB, and the new web architecture","source":"http://www.quirkey.com/blog/2009/09/15/sammy-js-couchdb-and-the-new-web-architecture/","body":null} <p><a href="http://www.quirkey.com/blog/2009/09/15/sammy-js-couchdb-and-the-new-web-architecture/">http://www.quirkey.com/blog/2009/09/15/sammy-js-couchdb-and-the-new-web-architecture/</a></p>Tue, 22 Sep 2009 20:55:58 GMThttp://lifestream.rogeriopvl.com/post/29327074/QuirkeyBlog-Blog-Archive-Sammy-js-CouchDB-andurn:www-soup-io:1:29327074linkprogrammingajaxjavascriptcouchdbsammyjquery A List Apart: Articles: JavaScript MVC {"tags":["programming","javascript","mvc"],"type":"link","title":"A List Apart: Articles: JavaScript MVC","source":"http://www.alistapart.com/articles/javascript-mvc/","body":null} <p><a href="http://www.alistapart.com/articles/javascript-mvc/">http://www.alistapart.com/articles/javascript-mvc/</a></p>Thu, 20 Aug 2009 23:12:34 GMThttp://lifestream.rogeriopvl.com/post/26144404/A-List-Apart-Articles-JavaScript-MVCurn:www-soup-io:1:26144404linkprogrammingjavascriptmvc jQuery for JavaScript programmers {"tags":["ajax","jquery","javascript","programming"],"type":"link","title":"jQuery for JavaScript programmers","source":"http://simonwillison.net/2007/Aug/15/jquery/","body":null} <p><a href="http://simonwillison.net/2007/Aug/15/jquery/">http://simonwillison.net/2007/Aug/15/jquery/</a></p>Tue, 03 Mar 2009 09:23:34 GMThttp://lifestream.rogeriopvl.com/post/14058170/jQuery-for-JavaScript-programmersurn:www-soup-io:1:14058170linkajaxjqueryjavascriptprogramming An Intensive Exploration Of jQuery With Ben Nadel (Video Presentation) : Kinky Solutions : A Student's Perspective by Ben Nadel {"tags":["programming","ajax","javascript","jquery"],"type":"link","title":"An Intensive Exploration Of jQuery With Ben Nadel (Video Presentation) : Kinky Solutions : A Student's Perspective by Ben Nadel","source":"http://www.bennadel.com/blog/1492-An-Intensive-Exploration-Of-jQuery-With-Ben-Nadel.htm","body":null} <p><a href="http://www.bennadel.com/blog/1492-An-Intensive-Exploration-Of-jQuery-With-Ben-Nadel.htm">http://www.bennadel.com/blog/1492-An-Intensive-Exploration-Of-jQuery-With-Ben-Nadel.htm</a></p>Thu, 19 Feb 2009 11:53:30 GMThttp://lifestream.rogeriopvl.com/post/13270984/An-Intensive-Exploration-Of-jQuery-With-Benurn:www-soup-io:1:13270984linkprogrammingajaxjavascriptjquery Easy Ajax with jQuery {"tags":["programming","ajax","javascript","jquery","webdev","php"],"type":"link","title":"Easy Ajax with jQuery","source":"http://www.sitepoint.com/print/ajax-jquery/","body":null} <p><a href="http://www.sitepoint.com/print/ajax-jquery/">http://www.sitepoint.com/print/ajax-jquery/</a></p>Mon, 19 Jan 2009 00:58:11 GMThttp://lifestream.rogeriopvl.com/post/11438072/Easy-Ajax-with-jQueryurn:www-soup-io:1:11438072linkprogrammingajaxjavascriptjquerywebdevphp js3 {"tags":["ajax","javascript","web","framework","couchdb","jquery","helma"],"type":"link","title":"js3","source":"http://labs.mudynamics.com/2009/01/14/js3/","body":null} <p><a href="http://labs.mudynamics.com/2009/01/14/js3/">http://labs.mudynamics.com/2009/01/14/js3/</a></p>Thu, 15 Jan 2009 21:33:06 GMThttp://lifestream.rogeriopvl.com/post/11246660/js3urn:www-soup-io:1:11246660linkajaxjavascriptwebframeworkcouchdbjqueryhelma Flickr based sMash Application {"tags":["programming","flickr","dojo","javascript","ajax","webdev"],"type":"link","title":"Flickr based sMash Application","source":"http://www.projectzero.org/sMash/1.1.x/docs/zero.devguide.doc/zero.flickr.demo/FlickrSample.html","body":null} <p><a href="http://www.projectzero.org/sMash/1.1.x/docs/zero.devguide.doc/zero.flickr.demo/FlickrSample.html">http://www.projectzero.org/sMash/1.1.x/docs/zero.devguide.doc/zero.flickr.demo/FlickrSample.html</a></p>Mon, 12 Jan 2009 23:12:18 GMThttp://lifestream.rogeriopvl.com/post/11049446/Flickr-based-sMash-Applicationurn:www-soup-io:1:11049446linkprogrammingflickrdojojavascriptajaxwebdev PhoneGap iPhone Framework Demo on Vimeo {"tags":["phonegap","iphone","sdk","framework","javascript","app"],"type":"video","source":"http://vimeo.com/2429555","body":"\u003Cstrong\u003EPhoneGap iPhone Framework Demo on Vimeo\u003C/strong\u003E","embedcode_or_url":"http://vimeo.com/2429555"} <embed src="http://vimeo.com/moogaloop.swf?clip_id=2429555&amp;server=vimeo.com&amp;fullscreen=1&amp;video_info=1" allowfullscreen="true" height="345" width="460" /><strong>PhoneGap iPhone Framework Demo on Vimeo</strong>Thu, 08 Jan 2009 00:01:02 GMThttp://lifestream.rogeriopvl.com/post/10773934/PhoneGap-iPhone-Framework-Demo-on-Vimeourn:www-soup-io:1:10773934videophonegapiphonesdkframeworkjavascriptapp Advogato: Blurring of MVC lines: Programming the Web Browser. {"tags":["mvc","patterns","ajax","development","javascript","programming"],"type":"link","title":"Advogato: Blurring of MVC lines: Programming the Web Browser.","source":"http://advogato.org/article/993.html","body":null} <p><a href="http://advogato.org/article/993.html">http://advogato.org/article/993.html</a></p>Wed, 03 Dec 2008 11:49:40 GMThttp://lifestream.rogeriopvl.com/post/8494481/Advogato-Blurring-of-MVC-lines-Programming-theurn:www-soup-io:1:8494481linkmvcpatternsajaxdevelopmentjavascriptprogramming Joey Mazzarelli » Blog Archive » Easy Date parsing with JavaScript {"tags":["javascript","programming","date","parsing"],"type":"link","title":"Joey Mazzarelli \u00bb Blog Archive \u00bb Easy Date parsing with JavaScript","source":"http://joey.mazzarelli.com/2008/11/25/easy-date-parsing-with-javascript/","body":null} <p><a href="http://joey.mazzarelli.com/2008/11/25/easy-date-parsing-with-javascript/">http://joey.mazzarelli.com/2008/11/25/easy-date-parsing-with-javascript/</a></p>Wed, 26 Nov 2008 22:12:39 GMThttp://lifestream.rogeriopvl.com/post/7770379/Joey-Mazzarelli-Blog-Archive-Easy-Date-parsingurn:www-soup-io:1:7770379linkjavascriptprogrammingdateparsing JavaScript Cheat Sheet - Cheat Sheets - Added Bytes {"tags":["javascript","programming","web-development"],"type":"link","title":"JavaScript Cheat Sheet - Cheat Sheets - Added Bytes","source":"http://www.addedbytes.com/cheat-sheets/javascript-cheat-sheet/","body":null} <p><a href="http://www.addedbytes.com/cheat-sheets/javascript-cheat-sheet/">http://www.addedbytes.com/cheat-sheets/javascript-cheat-sheet/</a></p>Sun, 21 Sep 2008 21:37:55 GMThttp://lifestream.rogeriopvl.com/post/7313447/JavaScript-Cheat-Sheet-Cheat-Sheets-Added-Bytesurn:www-soup-io:1:7313447linkjavascriptprogrammingweb-development JaPCrypt {"tags":["php","javascript","security","programming"],"type":"link","title":"JaPCrypt","source":"http://japcrypt.sourceforge.net/","body":null} <p><a href="http://japcrypt.sourceforge.net/">http://japcrypt.sourceforge.net/</a></p>Mon, 23 Jun 2008 22:53:48 GMThttp://lifestream.rogeriopvl.com/post/7313451/JaPCrypturn:www-soup-io:1:7313451linkphpjavascriptsecurityprogramming