Questions tagged [setattribute]

434 questions
10
votes
3 answers

Getting a random internal selfref error in data.table for R

I love data.table, it's fast and intuitive, what could be better? Alas, here's my problem: when referring to a data.table within a foreach() loop (using the doMC implementation) I will occasionally get the following error: EXAMPLE IN APPENDIX Error…
theEricStone
  • 301
  • 1
  • 7
9
votes
3 answers

Change value attribute by class via JavaScript

I have the following HTML: I need JavaScript that will change the value of "account" to "yolo". I thought I could do…
Cagey215
  • 159
  • 1
  • 1
  • 8
9
votes
3 answers

Javascript set value of an input field

Since while I cannot set the value of an input field with type=text. Before, I always used something like this: Then, in JavaScript i added code containing a line like…
redestructa
  • 1,182
  • 1
  • 11
  • 11
8
votes
3 answers

How to access id attribute of any element in Raphael

I'm using Raphael for drawing some elements on a website. The elements include rectangle, line (path). I have given an id to the path element and trying to access it in the onclick event of that line. but when I do an alert of the id, nothing is…
sgbharadwaj
  • 395
  • 2
  • 5
  • 9
7
votes
3 answers

Julia Plotting: delete and modify existing lines

Two questions in one: Given a line plotted in Julia, how can I delete it from the plot and legend (without clearing the whole plot) change its properties (such as color, thickness, opacity) As a concrete example in the code below, how can I 1.…
mattu
  • 944
  • 11
  • 24
7
votes
2 answers

Python setattr() to function takes initial function name

I do understand how setattr() works in python, but my question is when i try to dynamically set an attribute and give it an unbound function as a value, so the attribute is a callable, the attribute ends up taking the name of the unbound function…
nosahama
  • 150
  • 10
7
votes
1 answer

Why use ServletContext.setAttribute()?

Why would we set ServletContext parameters using the setAttribute() method, as we can accomplish the same thing by setting parameters in web.xml and fetching them using getInitParameter()?
Jayesh
  • 6,047
  • 13
  • 49
  • 81
6
votes
1 answer

Namespace prefix NS1 for href on %tagElement% is not defined, setAttributeNS

I got this error in safari while trying to convert svg to base64 url via code: $svgCopy = $('svg').clone() html = $('
').append($svgCopy).html() imgSrc = 'data:image/svg+xml;base64,' + btoa(html) imgEl.src = imgSrc The problem is that when you…
extempl
  • 2,987
  • 1
  • 26
  • 38
6
votes
2 answers

new Audio() not Implemented in Internet explorer

I am trying to play an array of mp3 sound. I have an audio file in my html and get it using document.CreateElement() in my JavaScript. When I try to set the src attribute (setAttribute("src", string)) I get an error in IE saying "Not Implemented". I…
Ben
  • 61
  • 4
6
votes
0 answers

setAttribute the only option to set list = in input element?

I cannot set the list property of an element. sel.list = id is not working in my code. var sel = document.createElement("input"); sel.type = "text"; sel.id = "inputSelectName"; sel.list = "inputNamesList"; // Does not…
user1419979
6
votes
3 answers

Symfony2 : How to make the php_intl extension available for Symfony2?

I'm trying to follow this documentation on Symfony : http://symfony.com/doc/current/book/forms.html ok so here is my thing, I've externalised my form and created a specific form class for handling the process and being able to reuse it. So what…
Miles M.
  • 4,089
  • 12
  • 62
  • 108
5
votes
4 answers

setAttribute, onClick and cross browser compatibility

I have read a number of posts about this but none with any solid answer. Here is my code: // button creation onew = document.createElement('input'); onew.setAttribute("type", "button"); onew.setAttribute("value", "hosts"); onew.onclick =…
niczak
  • 3,897
  • 11
  • 45
  • 65
5
votes
2 answers

Grails - Set "disabled" attribute name and value in GSP

I´m trying to do this without success: I want to apply a disabled attribute, ONLY if the ${disabled} variable is TRUE. I don't want to use conditionals, because in other views I got a lot of code and…
David Morabito
  • 1,498
  • 1
  • 12
  • 22
5
votes
1 answer

In Selenium how exactly are the sendKeys() and setValue() methods different?

I've used both WebElement.sendKeys('') and WebElement.setValue('') In order to input text into fields. The vast majority of the time they seem to act the same, but I've found a few cases where setValue() works but sendKeys() does not. All I can…
C. Peck
  • 3,641
  • 3
  • 19
  • 36
5
votes
2 answers

HTML SetAttribute with nested properties

I'm sure this is answered somewhere, but it is my lack of terminology knowledge that can't find where to look. I am dynamically creating some Html as a result of some json data loaded from the server. I am using createElement, and setAttribute to…
Stinkidog
  • 425
  • 2
  • 7
  • 19
1
2
3
28 29