{"id":2852,"date":"2014-02-26T08:58:01","date_gmt":"2014-02-26T08:58:01","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/02\/26\/javascripthtmlfirefoxelementimacrosview-the-original-page-collection-of-common-programming-errors\/"},"modified":"2022-08-30T15:42:28","modified_gmt":"2022-08-30T15:42:28","slug":"javascripthtmlfirefoxelementimacrosview-the-original-page-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2014\/02\/26\/javascripthtmlfirefoxelementimacrosview-the-original-page-collection-of-common-programming-errors\/","title":{"rendered":"javascript,html,firefox,element,imacrosView the original page-Collection of common programming errors"},"content":{"rendered":"<h3>UnKnown Error<\/h3>\n<ul>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/fc62b586b7a6e298551ac69188390bb8?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\njcolebrand<br \/>\njavascript regex 2014-2-17 0:04:48<br \/>\nGiven this function:function doThing(values,things){var thatRegex = \/^http:\\\/\\\/\/i; \/\/ is this created once or on every execution?if (values.match(thatRegex)) return values;return things; }How often does the JavaScript engine have to create the regex? Once per execution or once per page load\/script parse?To prevent needless answers or comments, I personally favor putting the regex outside the function, not inside. The question is about the behavior of the language, because I&#8217;m not sure where to l<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/84bc7b8a59bfc9326a7d86691af701b2?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nspike<br \/>\njavascript browser-detection 2014-2-16 21:38:36<br \/>\nFeature detection is generally preferred over browser sniffing. What should I do in a case where certain browsers &#8220;support&#8221; the features I&#8217;m using but have javascript runtimes that are too slow?I&#8217;m using the d3 library for some complicated visualizations. The visualization is very smooth in chrome \/ firefox, acceptable in IE9, and slow yet working in IE8. I&#8217;d like to display a banner to IE8 users telling them to upgrade and a notice banner to IE9 users that it would be faster in chrome or FF. Is<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/1233ec65168f4aae4d939ae8fe6cde1e?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nRobert Harvey<br \/>\njavascript jquery javascript-events firefox-addon javascript-debugger 2014-2-16 20:35:16<br \/>\nI&#8217;m trying to debug a webpage that makes heavy use of JavaScript events, and so I need to monitor all JavaScript events that are fired.Most of the events are bound using jQuery. Hence, it would be particularly useful if there was a way to specifically monitor only those events.<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/74010f1afb2c62044f827542a5472194?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nPrimosK<br \/>\njavascript angularjs 2014-2-16 20:24:46<br \/>\nQuote from one of the comments regarding ngCloak directive (AngularJS documentation):It is only really needed on your &#8220;index.html&#8221; page, because thebrowser may try to render things before Angular has had a chance toparse\/compile it. At runtime, when Angular pulls in content due tong-view, ng-include, etc., it will be processed by Angular before thebrowser renders.I created a example in jsFiddle to verify this and on my surprise the expression is not evaluated before it is rendered in the browser<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/b20430514c8c4c4c161c51e128f1a7e2?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nint3<br \/>\njavascript google-chrome optimization compiler v8 2014-2-16 19:48:29<br \/>\nI&#8217;m optimizing an sha-256 &gt; hmac &gt; pbkdf2 crypto algorithm in javascript for chromehttp:\/\/jsfiddle.net\/dtudury\/uy3hc\/if I change one line (after the comment \/\/ BREADCRUMB ) ei = (di + t1) &gt;&gt;&gt; 0; to ei = (di + t1); my test still passes, but the test runtime jumps from &lt;1s to 7sI believe the &gt;&gt;&gt; 0 tells chrome that it should store the value as an (actual) int&#8230; but there&#8217;s some degree of &#8220;cargo cult&#8221; to it.My question is: &#8220;is this documented anywhere?&#8221; I&#8217;d love to verify how<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/3d9946f27d54498c13b7ce7b000dca73?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nChantz<br \/>\njavascript file-upload thumbnails filepath plupload 2014-2-16 19:01:23<br \/>\nI am using plupload to let users upload images. But I also want to generate thumbnails for preview before they finally decide to keep it. I understand currently &#8220;Image preview&#8221; feature is not present in plupload. So to work around this I decided to submit a new form containing just one file for each image added, &amp; let the server process it &amp; return a thumbnail.Now my question is how do I get the handle on the file object from the plupload so that I can create an &#8220;input&#8221; file field dynami<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/40656706454dcbdbcec125b85b01f1e4?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nripper234<br \/>\njavascript internet-explorer internet-explorer-8 2014-2-16 18:24:22<br \/>\nI&#8217;m getting &#8216;unspecified error&#8217; when reading document.namespaces in IE. I can&#8217;t seem to reproduce the problem in a standalone page, my snippet is:function addNamespace(key, value) {try {$(&#8220;html&#8221;).attr(key, value);if (document.namespaces &amp;&amp; \/\/ This throws the error!document.namespaces[key]) {document.namespaces.add(key, value);}} catch (e) {alert(&#8220;Error: &#8221; + e);} };Never mind right now why I&#8217;m trying to add a namespace at runtime (it has to do with Facebook Like not working properly &#8230;<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/434d2d5d78ce88ef52c020ae563f51ba?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nTyler Mitchell<br \/>\njavascript c#-4.0 dll dllimport winjs 2014-2-16 17:39:53<br \/>\nI am new to Windows 8 app development and professional C# dev. I have run into a problem where a client wants me to interface with a printer (DYMO 450 Turbo) and the SDK only comes with a dll that has been compiled using .net 4.0 . The samples show referencing the dll from the app which I can not do because the app is written in Javascript using WinJS. The metro apps use NETCore where the dll uses NETFramework. My best solution so far is to write the code to interface with the printer as a serve<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/e981e59fdec8ef3b5e2aaf7af5b1e851?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nuser502014<br \/>\njavascript performance dom custom-data-attribute 2014-2-16 17:37:21<br \/>\nI have a list of books and I want to store data against each book e.g. Price, Quantity, id, catergory id, size, weight etc.I was looking at storing all this in the dom by extending the li elements representing each book in the list using data- attributes. This data could then be utilised directly with javascript.However I have read that accessing data- attributes is slow in a performance sense. In addition I can have multiple instances of the same book so am a little concerened about bloat in th<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/b9f81801b50ddbd023d2bf3ef5c03e91?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nSteven<br \/>\njavascript menu unity3d subclass 2014-2-16 16:08:10<br \/>\nI am trying to set up a generic class that deals with menus within Unity3D. The following code I intend to attach to an empty game objectimport System.Collections.Generic;#pragma strictpublic enum MenuType { loadSceneOnMouseDown, enableGameObject, changeValue };public class MenuClass extends System.Object{public var menuObject : GameObject;public var menuType : MenuType;}public var menuItems = List.&lt;MenuClass&gt;();This results in the following within the editor: I want<\/li>\n<\/ul>\n<ul>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/663fe70a1863611695ed545089d2dfa4?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nMuhammad<br \/>\nc# asp.net html webforms repeater 2014-2-16 21:01:16<br \/>\nI have the following data-bound repeater code :&lt;%&#8211;categories&#8211;%&gt; &lt;asp:Repeater ID=&#8221;CategoryRepeater&#8221; runat=&#8221;server&#8221; OnItemDataBound=&#8221;ItemBound&#8221;&gt;&lt;ItemTemplate&gt;&lt;div class=&#8221;groupbox&#8221;&gt;&lt;fieldset&gt;&lt;legend&gt;&lt;%# Container.DataItem %&gt;&lt;\/legend&gt;&lt;table&gt;&lt;asp:Repeater ID=&#8221;ItemRepeater&#8221; runat=&#8221;server&#8221;&gt;&lt;ItemTemplate&gt;&lt;tr&gt;&lt;td&gt;&lt;asp:CheckBox id=&#8221;chkItem&#8221; runat=&#8221;server&#8221; Text='&lt;%# Eval(&#8220;Text&#8221;)%&gt;&#8217; \/&gt;&lt;asp:HiddenField id=&#8221;pgNos&#8221;<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/e74b8dd8b5a0aa6847fc1f59d7e5b93d?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nZTefter<br \/>\nc# html .net-2.0 2014-2-16 19:58:51<br \/>\nI&#8217;m browsing the net now for days, but still couldn&#8217;t find what I&#8217;m looking for. Basically I&#8217;d like to develop my application interface, the GUI using HTML and CSS, with of course keeping the events, and the chance to modify parts of the layout at runtime (like a content of a div). The application is a database manager displaying visually the datas, and updating them at runtime.IE aka using System.Windows.Forms.WebBrowser, this is what I try to avoid, it depends on the client system, stops at ve<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/f0d29d2ba90732fdaca245f85e3694fd?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nAaron<br \/>\njquery html table 2014-2-16 19:31:35<br \/>\nI have a table with rows basically like this.Normal Row Normal Row Normal Row Summary Row Normal Row Summary Row Normal Row Normal Row Summary RowSo basically X &#8220;normal rows&#8221;, which will always be followed by a &#8220;summary row&#8221;. The summary rows display aggregates of the data in the normal rows. I calculate the aggregates at runtime, hence the &#8220;summary rows&#8221; are naturally placed AFTER the normal rows that they aggregate.All I need to do, is move each &#8220;summary row&#8221;, above the clump of &#8220;normal rows&#8221;<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/ab881b60afc75f5936aa2dbdb3f54ae2?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nborrrden<br \/>\nhtml ios6 uiwebview ios7 word-spacing 2014-2-16 6:50:39<br \/>\nI have an application which uses a lot of HTML to display content within each &#8220;page&#8221; of content. Suddenly, just by running on iOS 7, the HTML has started displaying incorrectly. All of the interword spacing is enlarged, causing the text to overflow off the end of the page. Does anyone know about anything that has changed that would cause this strange rendering to happen (all HTML files use embedded fonts)? The word spacing is controlled by the word-spacing CSS attribute (all defined in em).<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/db4b131b1b1519a5a22f84b1e8737f9b?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nMark Heath<br \/>\nc# .net html template-engine 2014-2-15 12:09:58<br \/>\nI have a .NET console application that needs to generate some HTML files. I could just construct the HTML in a StringBuilder and write the contents out to a file, but I was thinking it would be nicer to use some kind of template file with placeholders for where the data goes and then process my data through it at runtime.I&#8217;m guessing there are ways to use aspx, or T4, or some of the alternative view engines that you can use with ASP.NET MVC, but I don&#8217;t know what would be easiest to integrate in<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/4fb4c035f4288ee7f14a06d55221dc04?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\npbaris<br \/>\njavascript jquery html snowflake 2014-2-15 11:56:41<br \/>\nHere is the code that i tried for snow flakes. Everything seems ok but once the certain period of time that script get unresponsive means (It slow down the browser firefox). I am not sure why this should happen. How can i make it as responsive without cause anything to browser. Here is FIDDLEHow can i make it responsive script which doesn&#8217;t cause any.! I think I made a mistake in looping the javascript function \ud83d\ude41 Any Suggestion Would Be great.ThanksJavascript:\/\/ window.setInterval(generateSno<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/72baa38005eb8de126b2dd2e6fa1d660?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nThomas<br \/>\nhtml vim plugins 2014-2-15 9:16:46<br \/>\nI&#8217;m wondering if anybody knows of a Vim plugin that can handle cursor movement between parent\/child\/sibling elements on either HTML or XML files (preferably both).<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/09a976560c227c2cc8071797582dea22?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nGrant Zhu<br \/>\njavascript html dom 2014-2-15 9:06:14<br \/>\nGood day.I am currently working on a project that prints a desired &lt;div&gt; to a printer.Here is the code:var printContents = document.getElementById(id).innerHTML;var originalContents = document.body.innerHTML;document.body.innerHTML = printContents;document.body.style.display = &#8220;none&#8221;;window.print();document.body.innerHTML = originalContents;document.body.style.display = &#8220;block&#8221;;This code works and prints the desired &lt;div&gt;, but after that I need to put back the previous page again so<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/47325653fb4444d10758113ed0b8483f?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nZecrates<br \/>\nhtml css css-sprites sprites 2014-2-15 4:21:18<br \/>\nI have a webpage which contains about 20 &#8211; 50 dynamic images (images served from a non-static source). These images are served through a servlet based on the request URL. This results in a request being generated per image, which leads to performance decay.If these images were static, I would create a CSS sprite and replace the 50 requests with a single one. As they are dynamic this is not that easy of course. I&#8217;m looking for a tool\/library\/method that I can use in order to aggregate these image<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/i.stack.imgur.com\/gmL3R.jpg?s=32&amp;g=1\" \/><br \/>\nCory Klein<br \/>\nhtml vim 2014-2-14 15:44:12<br \/>\nIn trying to get vim to indent .html files properly, I followed the examples set out here.Given the following file index.html:&lt;html&gt;&lt;body&gt;&lt;p&gt;text&lt;\/p&gt;&lt;\/body&gt; &lt;\/html&gt;I tried opening it like so (ignoring my .vimrc to make sure it isn&#8217;t interfering negatively)vim -u NONE index.htmlThen I set the options to enable automatic indenting::filetype plugin indent on :set filetype=html # abbrev &#8211; :set ft=html :set smartindent # abbrev &#8211; :set siAnd<\/li>\n<\/ul>\n<ul>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/57c8d26ee1922dbc3ac5374583718289?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\njrotello<br \/>\njavascript firefox dom 2014-2-15 0:03:21<br \/>\nIt seems that Firefox treats any error that occurs in the window.onerror event handler as a fatal exception even if the exception is caught. The following code sample works as expected in IE, Chrome, and Safari. In Firefox, the call to the non-existent abc() method halts the execution immediately instead of executing the catch block and the remainder of the onerror handler.Is this expected behavior in Firefox or am I doing something wrong? &lt;!DOCTYPE html&gt; &lt;html lang=&#8221;en-US&#8221;&gt; &lt;head<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/a4cd899a200454a61c11f7376eca4a68?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nEmanuele Greco<br \/>\nc# firefox crystal-reports 2014-2-12 17:06:09<br \/>\nI&#8217;ve embedded the CrystalReportsViewer in an asp.net c# web page, and it displays nicely (well, not really &#8220;nicely&#8221;, but you know what I mean, it does the crystal reports &#8220;thing&#8221;) in IE and in Chrome.In Firefox however the layout is messed up and the toolbars are missing completely. It&#8217;s not even a rendering issue, the html simply hasn&#8217;t been generated.So, does anyone know how I get the toolbars to be rendered in Firefox?Oh, this is Crystal XI r2&#8230; I think&#8230;In the .asp template:-&lt;CR:Crystal<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/a4a01b93e12da4528aa6caacfc95a885?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nGuy<br \/>\nc firefox dll firefox-addon jsctypes 2014-2-12 1:20:45<br \/>\nI have some dll i&#8217;m not able to load using ctypes.open() method. I have no clue why. It has C extern functions, all other dlls from the same path are loaded correctly.In FF 8 the dll is loaded without issues, I&#8217;m trying on FF 22 without any success. Appreciate your assistance here.Guy<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/850e78e27d82e6b21bc89e0cc7ecc348?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nifinisheri<br \/>\nfirefox testing spidermonkey 2014-2-11 18:52:58<br \/>\nI have built the spidermonkey from source successfully ,all that I am confused is how can I test its performance? Fortunaly, I see many test js files in the \/js\/src\/tests folder in FFsource code, so, can I take adventage of these test files? And how ?<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/22184b90539c866099c39872b3c12a0e?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nuser310291<br \/>\njava firefox google-chrome jre 2014-2-10 5:26:57<br \/>\nI read here http:\/\/www.oracle.com\/technetwork\/java\/index-141825.html JRE 1.4 (includes Java Plug-in 1.4)What&#8217;s difference between JRE and Plug-in ? What&#8217;s the use of plugin ? Is it used by Firefox and Chrome ? When installing Chrome will it install Plug-in itself ? If yes what if Google Chrome install a plugin version and the JRE version is lower ?<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/7806629160a492b05d21fd738953a4cf?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nWladimir Palant<br \/>\nfirefox firefox-addon xul 2014-2-9 21:59:58<br \/>\nIs there a way to split a huge xul file into small xul files like we can do it using SSI (shtml), tpl, etc?<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/bd42b746d79be5dd325a8e94bc00ac58?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nEli Courtwright<br \/>\nfirefox mdc 2014-2-9 0:22:50<br \/>\nWhen working on a large Firefox plugin, I sometimes accidentally make a syntax error not caught by my editor. When this happens, then calling Components.utils.import(&#8220;resource:\/\/modules\/Foo.js&#8221;)will simply fail to import or return anything, without any kind of helpful hint as to where in the file to look for the syntax error. Is there any way I can get Firefox to give me some kind of clue when my imports fail?EDIT: I fixed my own problem, which turned out to be that I was using code which had<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/4d62f29b3f55dadb0ba101fa5b4f4d9d?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nMattias<br \/>\njavascript firefox google-chrome clone hasownproperty 2014-2-8 20:35:00<br \/>\nI am using a recursive function based around for(.. in ..) and hasOwnProperty to clone objects, which works fine in IE and FF&#8230; but not Chrome. When iterating over members of an object using for(&#8230; in &#8230;) Firefox and Chrome gives different results for hasOwnProperty if the object is a DOM object.Typing the following into the Chrome console vs. the console in Firebug(FF) gives different results:var t = document.createElement(&#8220;table&#8221;); var tr = t.insertRow(-1); for(var p in tr) if(tr.hasOwnPro<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/6a87d917e46ee9ceaa7053a74065d7ac?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nChris Roberts<br \/>\n.net firefox graphics gdi+ icc 2014-2-8 4:49:58<br \/>\nI have a tool which manipulates images at runtime as part of my web app.This generally works fine, but with the release of Firefox 3.5 we&#8217;re seeing some colour problems. I believe this is because Firefox 3.5 now supports embedded ICC colour profiles where no other browsers do.In order to achieve consistency of display, I&#8217;d like to programatically remove any ICC colour profile in my .NET code.Can anyone point me in the right direction?Thanks, &#8211; Chris<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/c7ed72a1c91e1519aad729539367b713?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nDelapouite<br \/>\nfirefox firefox-addon 2014-2-7 23:34:52<br \/>\nTyping resource:\/\/in Firefox&#8217;s address bar automatically redirects to resource:\/\/\/ (notice the third slash, corresponding to root).It leads to the omni.ja archive located in the browser directory :jar:file:\/\/\/usr\/lib\/firefox-trunk\/browser\/omni.ja!\/On the other hand, resource:\/\/gre\/ displays the content of the top level omni.jajar:file:\/\/\/usr\/lib\/firefox-trunk\/omni.ja!\/Other top level directories are available under the resource:\/\/ scheme like : resource:\/\/shumway\/ or resource:\/\/unity\/ (under ubu<\/li>\n<\/ul>\n<ul>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/4e989506fe14df3228da050567eee709?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nStefan<br \/>\ngwt element gwt-rpc uibinder 2014-1-31 12:56:27<br \/>\nGood morning everbody,I&#8217;m trying to pass a UiBinder from a rpc-service to the client page. The problem is, that he throws an error, because the &#8220;Deferred binding failed&#8221;. Can somebody explain, why this happens and if there is a workaround for dynamicly loading new UiBinder Elements to a webpage?Regards, Stefan<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/a0a3a4200899708103f7430d87d56e24?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nTomasz Nurkiewicz<br \/>\njavascript dom element 2014-1-31 11:45:13<br \/>\nI&#8217;ve a question about best practices in javascript. I&#8217;ve a dropdown menu with some statuts. If the statut is : external, I want to display a form. I don&#8217;t know the best way to do this. Do i need to hide a DIV from the DOM and display him when i need it or do i need to generate my form dynamically in jquery and make a call ajax to populate some data.<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/i.stack.imgur.com\/kxjLt.png?s=32&amp;g=1\" \/><br \/>\nEedis<br \/>\nhtml css class tags element 2014-1-30 15:13:20<br \/>\nOkay, so I understand how to use both, but really what is the point other than semantics? I mean, what negative effect would it have if I created a class for a single, unique, element and only used it on that element? Also, I know you can assign only certain elements to be effected by a class, for instance:p.class{blazziblazzi}Now, only the element &#8216;p&#8217; will be effect by that class, if that element is assigned to that class. So why would anybody ever assign that class to an element if they didn&#8217;t<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/ff751b1f5cf8508f66d7354a6f779d42?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nOxdeadbeef<br \/>\narrays struct element 2014-1-22 18:00:35<br \/>\nWhy some struct uses a single element array, such as follows:typedef struct Bitmapset {int nwords;uint32 words[1]; } Bitmapset;To make it convenient for latter dynamic allocation?<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/b478bf74b8f8651913545814f1befc7f?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nseaders<br \/>\nant element union macrodef uptodate 2014-1-16 7:27:16<br \/>\nI&#8217;ve a build script built in Ant which has a macrodef that takes a few default parameters, target, root and the like, and then an optional two, extrasrc-f and extrasrc-c. After they&#8217;ve come in, I like to do a uptodate check on all relevant resources, then only do a build if the target is out of date.What I have at the moment,&lt;?xml version=&#8221;1.0&#8243; encoding=&#8221;UTF-8&#8243;?&gt; &lt;project name=&#8221;Custom build&#8221; default=&#8221;default&#8221;&gt;&lt;taskdef resource=&#8221;net\/sf\/antcontrib\/antlib.xml&#8221;classpath=&#8221;C:\/dev\/ant\/a<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/8bfdcbaa4acf83339cf6a41019fdc493?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nIIIOXIII<br \/>\nhtml vba variables element 2014-1-14 19:22:47<br \/>\nI am trying to loop through all table elements on a page, but am getting the above noted error. Here is my code:Dim ie As InternetExplorer Dim ieDOC As HTMLDocument Dim tableElements As HTMLElementCollection Dim tableElement As HTMLTableSet ie = New InternetExplorer ie.Visible = True eURL = &#8220;url_of_site_to_visit&#8221; ie.navigate ieURL Do While ie.Busy Or ie.readyState &lt;&gt; 4DoEvents Loop Set ieDOC = ie.Document Set tableElements = ieDoc.getElementsByTagName(&#8220;table&#8221;)For some reason, I am getting<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/47b5906a20ddd530391bb71e95b9eee3?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nAsTheWormTurns<br \/>\nruby selenium element webdriver 2014-1-9 3:13:42<br \/>\nI&#8217;m trying to do simple monkey test for my web page, which get all active elements on page and click on them in random order.When i do this I want to write a log to know, on which element my test click and on which test crashedSo I want log file to look like this01.01.11 11.01.01 Clicked on Element &lt;span id=&#8217;myspan&#8217; class =&#8217;myclass &#8230;..&gt; 01.01.11 11.01.01 Clicked on Element &lt;span id=&#8217;button&#8217; class =&#8217;myclass title = &#8216;Button&#8217;&#8230;..&gt;or 01.01.11 11.01.01 Clicked on Element \/\/*[@id=&#8217;myspa<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/2b38d54f9b0b8fafac329bb1b35e1040?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nvascowhite<br \/>\nphp curl element 2013-11-12 11:35:37<br \/>\nMy target site contains code like this&lt;form&gt; &lt;input type=&#8221;text&#8221; name=&#8221;suggest&#8221; value=&#8221;www.google.com&#8221;&gt; &lt;input type=&#8221;submit&#8221; value=&#8221;submit&#8221;&gt; &lt;\/form&gt;I Get this page with Curl Php&lt;?php $url=&#8221;http:\/\/mysite.com&#8221;; $ch = curl_init(); curl_setopt ($ch, CURLOPT_URL, $url); $result = curl_exec ($ch); echo $result; curl_close($ch); ?&gt;How can I get an element value using id or name? For example &#8220;www.google.com&#8221; in input name=&#8221;suggest&#8221;. Thanks for helping me.I cant use thi<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/i.stack.imgur.com\/r1v37.jpg?s=32&amp;g=1\" \/><br \/>\nAubergine<br \/>\njquery element retrieve typing 2013-11-10 4:21:31<br \/>\nFor example:$(&#8216;.input-xlarge&#8217;).keyup(function(element) {element.parent().parent().removeClass(&#8220;error success&#8221;);});Scenario:I have many input fields under class .input-xlarge, they are colored green or red depending on success state after form is submitted. (non-ajax form)Now I want it to be more user friendly &#8211; as field state is returned back from the server my field keeps glowing red until next submit with valid input is initiated.What is required:Therefore after user submitted form, received s<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/f5ef1b81e1aeb3b921a3034d460ce6af?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nkiamlaluno<br \/>\njavascript delete element hidden nodes 2013-11-6 15:27:38<br \/>\nI&#8217;m trying to delete an HTML element after changing its visibility to hidden, but I get the following error when I run the following code. It looks like I can&#8217;t get a handle on the element because it is hidden. Uncaught Error: NOT_FOUND_ERR: DOM Exception 8 elementHiddenIs there any way to delete a node that is hidden using pure JavaScript? Due to conflicts, I can&#8217;t use any libraries like jQuery. code from jsFiddlefunction elementHidden(e) {if (!e.target.style.opacity) {console.log(&#8216;Delete this<\/li>\n<\/ul>\n<ul>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/068857f6c8ce8786fd1baceb733d8d24?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nuser2460379<br \/>\njavascript forms loops webforms imacros 2013-10-20 3:04:51<br \/>\nOk well im running imacro on a website.. And im running it so that it will fill out all the fields for me number times without me having to keep doing it over and over again. This its website where the form is that im trying to auto fill: http:\/\/ohiohiphopawards.com\/vote-now\/2013-nominationsFor the email at the bottom i want to enter a different email every time the macro loops.So for that i have a javascript code.. Well the code is big and so i made another one that is smaller:myfruits = new Ar<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/99dba36bd2b584a6e1feb1cc9f4b731b?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nuser2312194<br \/>\njavascript html firefox element imacros 2013-8-21 3:20:47<br \/>\nI want to check if an HTML element exist with iMacros. If it does, I want to go to a URL. If not, I want to go to other URL. Because iMacros doesn&#8217;t have statements, I used javascript with the iMacros&#8217; EVAL. Here is the line that handles the javascript execution:SET !VAR3 EVAL(&#8220;var element = window.content.document.getElementById(\\&#8221;some_element\\&#8221;); if (typeof(element) != &#8216;undefined&#8217; &amp;&amp; element != null) { var redirect = &#8216;http:\/\/192.168.178.22\/sc\/report.php&#8217;; } else { var redirect = &#8216;ht<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/d4d4c0bf1f7725c6844b8afe003e6db2?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nuser2120497<br \/>\nscript vbscript imacros 2013-6-27 1:21:00<br \/>\nThis script is meant to Loop through Youtube videos collecting their URLs.Option Explicit&#8217;initiate iMacros instance Dim iim1, iret set iim1 = CreateObject (&#8220;imacros&#8221;) iret = iim1.iimInit()&#8217;navigate to youtube frontpage Dim macro macro = &#8220;CODE:&#8221; macro = macro + &#8220;VERSION BUILD=7601105 &#8221; + vbNewLine macro = macro + &#8220;TAB T=1 &#8221; + vbNewLine macro = macro + &#8220;TAB CLOSEALLOTHERS &#8221; + vbNewLine macro = macro + &#8220;URL GOTO=http:\/\/www.youtube.com\/ &#8221; + vbNewLineiret = iim1.iimPlay(macro)&#8217;loop th<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>UnKnown Error jcolebrand javascript regex 2014-2-17 0:04:48 Given this function:function doThing(values,things){var thatRegex = \/^http:\\\/\\\/\/i; \/\/ is this created once or on every execution?if (values.match(thatRegex)) return values;return things; }How often does the JavaScript engine have to create the regex? Once per execution or once per page load\/script parse?To prevent needless answers or comments, I personally favor [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,1],"tags":[],"class_list":["post-2852","post","type-post","status-publish","format-standard","hentry","category-semantic","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/2852","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=2852"}],"version-history":[{"count":1,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/2852\/revisions"}],"predecessor-version":[{"id":8800,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/2852\/revisions\/8800"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=2852"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=2852"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=2852"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}