attributes

jQuery remove attribute.

I can't seem to get removeAttr to work, I'm using the example I saw on the jQ site. Basically onclick I add the attribute to disable a field (which works just fine) but when the user clicks again it should enable the field in question. I used alerts to make sure the else block is being fired, so I know that's not it. Code: $('#WindowO...

How do I set a the attribute of a parent element to be the attribute of a child?

I think this should be a rather simple thing to do, but I'm completely hangin' here! I'm really not sure how much more descriptive I can be here, the title pretty much explains it all. It's a fairly odd situation because my google skills have completely failed me, and I know the solution is probably so simple to implement. Would anyone ...

NHibernate.Mapping.Attributes.Filter

Hello people! I'm mapping my database tables using NHibernate with NHibernate.Mapping.Attributes library and I got stuck to get the Filter attributes to work. Suppose a class A that has a set of objects of class B. So, I have, the following: [NHibernate.Mapping.Attributes.Set(0, Inverse = true, Lazy = NHibernate.Mapping.Attributes.Coll...

Put xml node's full path in attribute file and read the node's value from main xsl file in xsl fo

I have been using fop 0.95 to generate pdf files from xml data. I have three files involved in the process: test.xml, test.xsl and attributes.xsl. Naturally I have xml data in xml file. Here test.xml is the main xsl file which imports attribute sets from attributes.xsl file. For example, I have following entries in the attributes.xsl fil...

C# Enums with Flags Attribute

I was wondering if Enums with Flag attribute are mostly used for Bitwise operations why not the compilers autogenerate the values if the enum values as not defined. For eg. [Flags] public enum MyColor { Yellow = 1, Green = 2, Red = 4, Blue = 8 } It would be helpful if the values 1,2,4,8 are autogenerated if they are ...

Getting attributes of Enum's value

Hi everyone, I would like to know if it is possible to get attributes of the enum values and not of the enum itself? For example, suppose I have the following enum: enum FunkyAttributesEnum { [Description("Name With Spaces1")] NameWithoutSpaces1, [Description("Name With Spaces2")] NameWithoutSpaces2 } What I want is given the enu...

Displaying attributes in XML

Hi, Is displaying these two ways the same and correct? E.g. < contents cpid="1" cpnm="1">< /contents > and < contents cpid="1" cpnm="1"> < /contents> ...

jQuery retrieving array from attribute value

If I have: <a id="anchor" href="some link" rel="{ key1: 'value', key2 : 'value'}">text</a> How do retrieve the values in the 'rel' attribute so i can refer to them using dot notation? eg. $('#anchor').attr('rel').key1 ...

Specialized Authorize attribute for asp.net mvc application

We are trying to create a more specific [Authorize] Attribute for Asp.Net MVC [AttributeUsage(AttributeTargets.All)] public class AuthoriseUser : System.Attribute { public AuthoriseUser(string PermRequest) { //Do Some Auth. } } and we call this like so, [AuthoriseUser("CanViewRoles")]...

Is it redundant to use the "name" attribute for input fields in modern web development?

Hello, I've noticed a lot of websites with form(s) containing input fields whose "name" attribute is specified even if it isn't used for styling or scripting purpose! Moreover, according to the official document about the form in HTML document ... name = cdata [CI] This attribute names the element so that it may be referred to ...

How can I prevent Perl Moose Read-Only Attributes being set upon a call to new?

I would like to simply declare a read only attribute in Moose that cannot be initialized in a call to new. So after declaring the following: package SOD::KuuAnalyze::ProdId; use Moose; has 'users' => (isa => 'ArrayRef[Str]', is => "ro"); 1; I do not want the following to work: my $prodid = SOD::KuuAnalyze::ProdId->new(users => ["...

Jquery to target same id as class name of clicked element?

I'm trying to use jquery to enable a form button only after a radio button has been selected. It's a t-shirt shop where the user is required to choose a size before the 'add to cart' button becomes enabled. The html looks a bit like this: <input class="radioclick product21" type="radio" name="variation[variation_select_21_1]" value="1">...

Faking method attributes in PHP?

Is it possible to use the equivalent for .NET method attributes in PHP, or in some way simulate these? Context We have an in-house URL routing class that we like a lot. The way it works today is that we first have to register all the routes with a central route manager, like so: $oRouteManager->RegisterRoute('admin/test/', array('CAdm...

Modify automatically an attribute with magento

I want to modify one attribute of my product automatically (code). How could i do that plz? I have seen how to show one attribute, but not how to modify. Thx ...

JAXB Compiler and Attribute Order

I would like to control the attribute order in .java files generated by the JAXB compiler. I'm aware that attribute order is not important for xml validation. The order is important for textual comparison of marshalled xml in a regression test environment. The order of attributes in a file directly affects the order of the attribute...

select href attribute of a link jquery

i have the following code that is not working properly, what the hell am i doing wrong??? $('#gallerynav ul li a').click(function(){ var href = $('#gallerynav ul li a').attr('href') $("#galleries").children().fadeOut(500 , function(){ (href).fadeIn(500) }) }) i have the href of the links set like this <div id="g...

How to have line breaks in XML attributes?

I have a attribute called: description and I want to have the following in it with new lines: This is the content description section. Download instruction: This is the contents on how to download contents. Hotline support: This is the hotline for contents. How do I create a new line for it in xml? ...

problem in getting value of the object attribute in flex

i have an xml which contains 'interface' sub tag, iam converting xml to object using SampleXmlDecoder. compiler did not allow me to access the value of the 'inteface' attrible of the resultobject. var xml:XML = event.result as XML; var xmlDoc : XMLDocument = new XMLDocument(xml.toString()); var decoder : SimpleXMLDecoder = new SimpleXM...

How to specify a generic type should be marked with an attribute?

I know I can: public class SampleClass<TSerializable> where TSerializable : ISerializable How can I write a SampleClass that accepts only classes marked with the SerializableAttribute instead? ...

How to check if a type is marked with an attribute?

Does it needs reflection? ...