Questions tagged [setattribute]

434 questions
-1
votes
3 answers

how to change a input check attribute

while I click the username1 in dropdown,sepc view toggle in the right card would be off.But the code not work. html code:
juexu
  • 131
  • 2
  • 11
-1
votes
1 answer

Trying to setAttribute to a button Element in a Class dynamically but returns "is not defined"

I have this problem. I'm creating in Javascript a game similar to minefield - i decided to use a Class to generate the game levels. The Class is also in charge to generate the DOM code, including the buttons and the layout, according with the level…
maxo77
  • 15
  • 2
-1
votes
3 answers

xButton.setAttribute is not a function error

I have a function which formats elements in a JSON file to a table. The table works fine, but now I am trying to implement a button on another column which deletes the said element from the file. But when I did, it comes up with the error:…
Chameen
  • 25
  • 6
-1
votes
1 answer

How do you set the (attribute, value) in globals() to be that of a method (name, value)?

In JS, you can do something similar, assign all key, values of an object / dict, obj to be in the global namespace / context obj with this[key] = obj[key] I expected to be able to do the same with class A: def call(self): print('a') a =…
James T.
  • 910
  • 1
  • 11
  • 24
-1
votes
1 answer

Set file attributes on a file to readonly in c#

I have a file on disk. I want to check if its readonly. If yes, I want to make it writeable. Make modifications and save it. And change it back to readonly. To do this I am trying to execute the below code in c#. It removes the readonly attribute…
user3073180
  • 105
  • 1
  • 13
-1
votes
1 answer

JSP servlet JSTL

When I send attribute 'saved' from servlet to jsp, if it equals to true I show alert msg otherwise I want to assign it to false in the second refresh. Servlet: saved = true; request.setAttribute("saved", saved); …
-1
votes
1 answer

python setattr not checking if variable exists

test file: my_name = '' my_home_address = '' my_home_phone = '' my_office_address = '' my_office_phone = '' This another file, lets call it test2 import test line1 = ['address', 'home', 'tom', 'downtown', '12345'] line1 = ['address', 'office',…
Hyder Tom
  • 373
  • 4
  • 14
-1
votes
1 answer

getelementbyid on dynamically created elements not working

I am creating an element with this code. Setting the ID as it should be set. (Do I need the validateonparse?): $sectionContainer = $dom->createElement('div', $section); $sectionContainer->setAttribute("id",…
benoit
  • 1
  • 1
  • 6
-1
votes
3 answers

use setattribute to change color (in chat)

I want to change the chat window fontcolor/fontsize of the page younow. I tried 2 'cssText' samples but I'm unable to change the font color to RED. How can I change the chat window font color to RED? I'm using Firefox and greasemonkey. sample…
Heiko
  • 17
  • 1
  • 8
-1
votes
1 answer

Prevent global variables of called submodules from being altered without changing the submodul itself?

I am trying to write some kind of wrapper for testing python module. This wrapper simulates an environment and then starts other python module via execfile. There are many python modules to be tested (>200). Inside those modules there are some…
and0r
  • 305
  • 1
  • 4
  • 13
-1
votes
1 answer

Setting Angular2-style attributes on HTML node

I am migrating an application from Angular1 to Angular2, in which I used the svg.js library to draw an SVG. Some elements of the SVG contained "ng-click" directives, that I made the SVG library print to the final SVG. That worked alright in…
Jan B.
  • 6,030
  • 5
  • 32
  • 53
-1
votes
2 answers

Proper way to use setAttr with channel box selection

please bear with me - I'm new to all this. I tried the searches and have only found bits and pieces to what I'm looking for, but not what I need to connect them. Basically, I'm trying to create a Python script that allows the user to simply "0" out…
Gogo
  • 25
  • 1
  • 7
-1
votes
1 answer

How do I check a checkbox that was added via JavaScript?

I want to check a checkbox that was added to the web page via JavaScript but the element is not in the webbrowser.document, how can I achieve this?
Matt
  • 7
  • 3
-1
votes
1 answer

Adding Multiple value setAttribute on pop up onclick in an input

I am stack in a problem solving javascript and I need to ask advice regarding my project. I have an input Called Subject and Level, in level i want to add multiple values seperated via comma, I created this function function selectedLvl($levels){ …
-1
votes
1 answer

Svg text is not working in safari and IE however it work's fine with chrome and firefox

text[i + 1] = document.createElementNS("http://www.w3.org/2000/svg", "text"); text[i + 1].setAttribute('x', legendX[i + 1] - 15); text[i + 1].setAttribute('y', legendY[i + 1] + 30); text[i +…
1 2 3
28
29