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 putting the regex outside the function, not inside. The question is about the behavior of the language, because I’m not sure where to l
spike
javascript browser-detection 2014-2-16 21:38:36
Feature detection is generally preferred over browser sniffing. What should I do in a case where certain browsers “support” the features I’m using but have javascript runtimes that are too slow?I’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’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
Robert Harvey
javascript jquery javascript-events firefox-addon javascript-debugger 2014-2-16 20:35:16
I’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.
PrimosK
javascript angularjs 2014-2-16 20:24:46
Quote from one of the comments regarding ngCloak directive (AngularJS documentation):It is only really needed on your “index.html” 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
int3
javascript google-chrome optimization compiler v8 2014-2-16 19:48:29
I’m optimizing an sha-256 > hmac > pbkdf2 crypto algorithm in javascript for chromehttp://jsfiddle.net/dtudury/uy3hc/if I change one line (after the comment // BREADCRUMB ) ei = (di + t1) >>> 0; to ei = (di + t1); my test still passes, but the test runtime jumps from <1s to 7sI believe the >>> 0 tells chrome that it should store the value as an (actual) int… but there’s some degree of “cargo cult” to it.My question is: “is this documented anywhere?” I’d love to verify how
Chantz
javascript file-upload thumbnails filepath plupload 2014-2-16 19:01:23
I 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 “Image preview” 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, & let the server process it & 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 “input” file field dynami
ripper234
javascript internet-explorer internet-explorer-8 2014-2-16 18:24:22
I’m getting ‘unspecified error’ when reading document.namespaces in IE. I can’t seem to reproduce the problem in a standalone page, my snippet is:function addNamespace(key, value) {try {$(“html”).attr(key, value);if (document.namespaces && // This throws the error!document.namespaces[key]) {document.namespaces.add(key, value);}} catch (e) {alert(“Error: ” + e);} };Never mind right now why I’m trying to add a namespace at runtime (it has to do with Facebook Like not working properly …
Tyler Mitchell
javascript c#-4.0 dll dllimport winjs 2014-2-16 17:39:53
I 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
user502014
javascript performance dom custom-data-attribute 2014-2-16 17:37:21
I 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
Steven
javascript menu unity3d subclass 2014-2-16 16:08:10
I 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.<MenuClass>();This results in the following within the editor: I want
Muhammad
c# asp.net html webforms repeater 2014-2-16 21:01:16
I have the following data-bound repeater code :<%–categories–%> <asp:Repeater ID=”CategoryRepeater” runat=”server” OnItemDataBound=”ItemBound”><ItemTemplate><div class=”groupbox”><fieldset><legend><%# Container.DataItem %></legend><table><asp:Repeater ID=”ItemRepeater” runat=”server”><ItemTemplate><tr><td><asp:CheckBox id=”chkItem” runat=”server” Text='<%# Eval(“Text”)%>’ /><asp:HiddenField id=”pgNos”
ZTefter
c# html .net-2.0 2014-2-16 19:58:51
I’m browsing the net now for days, but still couldn’t find what I’m looking for. Basically I’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
Aaron
jquery html table 2014-2-16 19:31:35
I 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 “normal rows”, which will always be followed by a “summary row”. The summary rows display aggregates of the data in the normal rows. I calculate the aggregates at runtime, hence the “summary rows” are naturally placed AFTER the normal rows that they aggregate.All I need to do, is move each “summary row”, above the clump of “normal rows”
borrrden
html ios6 uiwebview ios7 word-spacing 2014-2-16 6:50:39
I have an application which uses a lot of HTML to display content within each “page” 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).
Mark Heath
c# .net html template-engine 2014-2-15 12:09:58
I 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’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’t know what would be easiest to integrate in
pbaris
javascript jquery html snowflake 2014-2-15 11:56:41
Here 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’t cause any.! I think I made a mistake in looping the javascript function 🙁 Any Suggestion Would Be great.ThanksJavascript:// window.setInterval(generateSno
Thomas
html vim plugins 2014-2-15 9:16:46
I’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).
Grant Zhu
javascript html dom 2014-2-15 9:06:14
Good day.I am currently working on a project that prints a desired <div> 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 = “none”;window.print();document.body.innerHTML = originalContents;document.body.style.display = “block”;This code works and prints the desired <div>, but after that I need to put back the previous page again so
Zecrates
html css css-sprites sprites 2014-2-15 4:21:18
I have a webpage which contains about 20 – 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’m looking for a tool/library/method that I can use in order to aggregate these image
Cory Klein
html vim 2014-2-14 15:44:12
In trying to get vim to indent .html files properly, I followed the examples set out here.Given the following file index.html:<html><body><p>text</p></body> </html>I tried opening it like so (ignoring my .vimrc to make sure it isn’t interfering negatively)vim -u NONE index.htmlThen I set the options to enable automatic indenting::filetype plugin indent on :set filetype=html # abbrev – :set ft=html :set smartindent # abbrev – :set siAnd
jrotello
javascript firefox dom 2014-2-15 0:03:21
It 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? <!DOCTYPE html> <html lang=”en-US”> <head
Emanuele Greco
c# firefox crystal-reports 2014-2-12 17:06:09
I’ve embedded the CrystalReportsViewer in an asp.net c# web page, and it displays nicely (well, not really “nicely”, but you know what I mean, it does the crystal reports “thing”) in IE and in Chrome.In Firefox however the layout is messed up and the toolbars are missing completely. It’s not even a rendering issue, the html simply hasn’t been generated.So, does anyone know how I get the toolbars to be rendered in Firefox?Oh, this is Crystal XI r2… I think…In the .asp template:-<CR:Crystal
Guy
c firefox dll firefox-addon jsctypes 2014-2-12 1:20:45
I have some dll i’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’m trying on FF 22 without any success. Appreciate your assistance here.Guy
ifinisheri
firefox testing spidermonkey 2014-2-11 18:52:58
I 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 ?
user310291
java firefox google-chrome jre 2014-2-10 5:26:57
I read here http://www.oracle.com/technetwork/java/index-141825.html JRE 1.4 (includes Java Plug-in 1.4)What’s difference between JRE and Plug-in ? What’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 ?
Wladimir Palant
firefox firefox-addon xul 2014-2-9 21:59:58
Is there a way to split a huge xul file into small xul files like we can do it using SSI (shtml), tpl, etc?
Eli Courtwright
firefox mdc 2014-2-9 0:22:50
When 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(“resource://modules/Foo.js”)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
Mattias
javascript firefox google-chrome clone hasownproperty 2014-2-8 20:35:00
I am using a recursive function based around for(.. in ..) and hasOwnProperty to clone objects, which works fine in IE and FF… but not Chrome. When iterating over members of an object using for(… in …) 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(“table”); var tr = t.insertRow(-1); for(var p in tr) if(tr.hasOwnPro
Chris Roberts
.net firefox graphics gdi+ icc 2014-2-8 4:49:58
I 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’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’d like to programatically remove any ICC colour profile in my .NET code.Can anyone point me in the right direction?Thanks, – Chris
Delapouite
firefox firefox-addon 2014-2-7 23:34:52
Typing resource://in Firefox’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
Stefan
gwt element gwt-rpc uibinder 2014-1-31 12:56:27
Good morning everbody,I’m trying to pass a UiBinder from a rpc-service to the client page. The problem is, that he throws an error, because the “Deferred binding failed”. Can somebody explain, why this happens and if there is a workaround for dynamicly loading new UiBinder Elements to a webpage?Regards, Stefan
Tomasz Nurkiewicz
javascript dom element 2014-1-31 11:45:13
I’ve a question about best practices in javascript. I’ve a dropdown menu with some statuts. If the statut is : external, I want to display a form. I don’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.
Eedis
html css class tags element 2014-1-30 15:13:20
Okay, 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 ‘p’ 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’t
Oxdeadbeef
arrays struct element 2014-1-22 18:00:35
Why 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?
seaders
ant element union macrodef uptodate 2014-1-16 7:27:16
I’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’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,<?xml version=”1.0″ encoding=”UTF-8″?> <project name=”Custom build” default=”default”><taskdef resource=”net/sf/antcontrib/antlib.xml”classpath=”C:/dev/ant/a
IIIOXIII
html vba variables element 2014-1-14 19:22:47
I 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 = “url_of_site_to_visit” ie.navigate ieURL Do While ie.Busy Or ie.readyState <> 4DoEvents Loop Set ieDOC = ie.Document Set tableElements = ieDoc.getElementsByTagName(“table”)For some reason, I am getting
AsTheWormTurns
ruby selenium element webdriver 2014-1-9 3:13:42
I’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 <span id=’myspan’ class =’myclass …..> 01.01.11 11.01.01 Clicked on Element <span id=’button’ class =’myclass title = ‘Button’…..>or 01.01.11 11.01.01 Clicked on Element //*[@id=’myspa
vascowhite
php curl element 2013-11-12 11:35:37
My target site contains code like this<form> <input type=”text” name=”suggest” value=”www.google.com”> <input type=”submit” value=”submit”> </form>I Get this page with Curl Php<?php $url=”http://mysite.com”; $ch = curl_init(); curl_setopt ($ch, CURLOPT_URL, $url); $result = curl_exec ($ch); echo $result; curl_close($ch); ?>How can I get an element value using id or name? For example “www.google.com” in input name=”suggest”. Thanks for helping me.I cant use thi
Aubergine
jquery element retrieve typing 2013-11-10 4:21:31
For example:$(‘.input-xlarge’).keyup(function(element) {element.parent().parent().removeClass(“error success”);});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 – 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
kiamlaluno
javascript delete element hidden nodes 2013-11-6 15:27:38
I’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’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’t use any libraries like jQuery. code from jsFiddlefunction elementHidden(e) {if (!e.target.style.opacity) {console.log(‘Delete this
user2460379
javascript forms loops webforms imacros 2013-10-20 3:04:51
Ok 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
user2312194
javascript html firefox element imacros 2013-8-21 3:20:47
I 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’t have statements, I used javascript with the iMacros’ EVAL. Here is the line that handles the javascript execution:SET !VAR3 EVAL(“var element = window.content.document.getElementById(\”some_element\”); if (typeof(element) != ‘undefined’ && element != null) { var redirect = ‘http://192.168.178.22/sc/report.php’; } else { var redirect = ‘ht
user2120497
script vbscript imacros 2013-6-27 1:21:00
This script is meant to Loop through Youtube videos collecting their URLs.Option Explicit’initiate iMacros instance Dim iim1, iret set iim1 = CreateObject (“imacros”) iret = iim1.iimInit()’navigate to youtube frontpage Dim macro macro = “CODE:” macro = macro + “VERSION BUILD=7601105 ” + vbNewLine macro = macro + “TAB T=1 ” + vbNewLine macro = macro + “TAB CLOSEALLOTHERS ” + vbNewLine macro = macro + “URL GOTO=http://www.youtube.com/ ” + vbNewLineiret = iim1.iimPlay(macro)’loop th