Questions tagged [classname]

Classname may refer to classes in scripting languages and markup languages. Typically, a class denotes a certain part of the application which can be manipulated.

620 questions
-1
votes
3 answers

Cannot set 'backgroundColor of undefined'

I'm using document.getElementsByClassName to change the background color of one of the multiple elements with the specified class name. I have the error message in the title and I cannot find any mistakes, please spot them if there is one: …
Benn
  • 55
  • 1
  • 1
  • 8
-1
votes
2 answers

How can i declare a class having name static

I renamed a class with name static, i have compile time error public class static { } Error CS0116 A namespace cannot directly contain members such as fields or
John Doe
  • 141
  • 1
  • 2
  • 10
-1
votes
4 answers

Switching classes onClick toggle

I am learning by doing and have hit a road block while developing a website. I have a menu with 4 options, there is an active state and off state in css as well as the first option is active by default. When clicking any option it toggles it to the…
-1
votes
1 answer

Selenium locators - Div elements having the same class

I am trying to access an element with the same class name. Please look at my page structure, it's something like this:
Rambo200
  • 11
  • 2
-1
votes
1 answer

"If statement" within for loop class name undefined

Each card has class names of "card player1card ________" or "card player2card _______" where the blank space is a random class name that is allocated from the cardnames array. I want the code to check all cards, and for those which are player1card…
evilgenious448
  • 518
  • 2
  • 11
-1
votes
4 answers

Can't resolve method className()

I can't figure out why i have an error on this piece of code. Any suggestion? Thanks public class HelloWorld { public static void main(String[] args) { int choice = 2; choice.className().getName(); } }
aurel_lab
  • 149
  • 11
-1
votes
1 answer

jQuery - speed comparison for multiple selectors

What's the faster way to hide/show multiple elements, which are selected by .className? $('.className1').show(); $('.className2').show(); $('.className3').show(); or $('.className1, .className2, .className3').show();
doque
  • 2,723
  • 6
  • 27
  • 44
-1
votes
2 answers

Class name in PHP

Hello, I want to class name are very specific. Like: form.class.php or database.class.php and i access them via autoload. But sometimes i need a function which not specific. For example: get avatar for current user or relation between two user. I am…
Kerem
  • 37
  • 7
-1
votes
1 answer

Possible to instantiate a PHP instance using a class name property from within a class method (in one line of code)?

I would like to be able to instantiate a class using a class name stored in another class's property, and I want to do this with one line of code, as in the comments in the code below (and it should work on at least one recent version of PHP 5). Is…
John Sonderson
  • 3,238
  • 6
  • 31
  • 45
-1
votes
1 answer

Delete table in all the rendering pages of a single page in Javascript

I am having a table like:
in many pages. All these pages are rendered in a single page. When I apply the javascript to delete that using on load with the below: var tbl =…
useranon
  • 29,318
  • 31
  • 98
  • 146
-1
votes
2 answers

nullPointerException, guess when using getClass().getName()

Reposting a question with more detail. The problem is a nullPointerException which occurs at clusterer.next(). Below is a simplified version of the program and am hoping you can notice where the issue is. public class Clustering { private…
Dimebag
  • 833
  • 2
  • 9
  • 29
-1
votes
2 answers

C++ Template Parameter automatically with Class Name

I have a triple hierarchy class: template class Singleton; class Base; class Sub : public Base, public Singleton; I' using underlying auto pointers, that's why Singleton is a template class and Sub passes itself as a template…
goocreations
  • 2,938
  • 8
  • 37
  • 59
-2
votes
2 answers

javascript set className property for Internet Explorer

I set className property of a dinamically generated select control with the following code: oField.className ="select"; It works for Firefox not for Internet Explorer. How can I set this property on IE? The code: var oField =…
Antonio F.
  • 411
  • 2
  • 9
  • 16
-2
votes
1 answer

Get the fully-qualified name of a class in Java, Class.forName

I want to recognize the class type from a string given through the command line. For example, args[0] = "Integer", Now I do in this way: Class cls = Class.forName(args[0]); But I get "java.lang.ClassNotFoundException: Integer" I have read that I…