Search Results

Search found 37415 results on 1497 pages for 'attribute id'.

Page 21/1497 | < Previous Page | 17 18 19 20 21 22 23 24 25 26 27 28  | Next Page >

  • ASP.NET MVC 2 - Setting id of Html.Form

    - by Justin
    Hey, How do you set the id of an Html.Form in ASP.NET MVC 2? I tried this: <% using (Html.BeginForm("Save", "Clients", new { id = "SubmitForm" })) {%> But it doesn't work, my form still doesn't have an id property: <form action="/TothSolutions/Secure/Clients/Save/SubmitForm" method="post"> I'm guessing this worked in ASP.NET MVC 1 but not 2. The reason I need the id property set is so that I can do jQuery validation on the form: $("#myForm").validate etc... Thanks, Justin

    Read the article

  • Instanciate a class with a given id in ExtJS

    - by Miller
    Hello, I would like to know if it is possible to instanciate a class by its id . For example we have a class extending Ext.grid.GridPanel with an id property, is it possible to instanciate the class just knowing his id (which is the component id in this case) ?

    Read the article

  • one id for more than one widget android

    - by Labeeb P
    Hi, Is there any way to refer more than one widget (ui controls) by a single id For example i have many ImageView with same android:id="myimageview" And in my activity myimageview = (ImageView)findViewById(R.id.myimageview); So if i set an image using myimageview.setImageBitmap(somebitmap); i need that image in all of my Imageview with id myimageview But when i tried this only one of imageview got this change. Any idea to do this. Thank you.

    Read the article

  • Get ID of clicked on element in function

    - by skerit
    I want to get the ID of an element I click on. I put the function in the onclick element, like this: <a id="myid" class="first active" onclick="markActiveLink();" href="#home">Home</a> And this is in the function: function markActiveLink() { alert($(this).attr("id")); } This doesn't work, as it says it isn't defined. Does it really forget about the ID, do I have to type it in the onclick?

    Read the article

  • jQuery: Giving each matched element an unique ID

    - by AnGafraidh
    I am writing an 'inline translator' application to be used with a cloud computing platform to extend non-supported languages. The majority of this uses jQuery to find the text value, replace it with the translation, then append the element with a span tag that has an unique ID, to be used elsewhere within the application. The problem arises however, when there are more than one element, say , that have the exact same value to be translated (matched elements). What happens in the function in question is that it puts all matched elements in the same span, taking the second, third, fourth, etc. out of their parent tags. My code is pretty much like this example: <script src='jquery-1.4.2.js'></script> <script> jQuery.noConflict(); var uniqueID='asdfjkl'; jQuery(window).ready(function() { var myQ1 = jQuery("input[id~=test1]"); myClone=myQ1.clone(); myClone.val('Replaced this button'); myQ1.replaceWith('<span id='+uniqueID+'></span>'); jQuery('#'+uniqueID).append(myClone); }); </script> <table> <tr><td> <input id='test1' type='button' value="I'm a button!"></input> &nbsp; <input id='test2' type='button' value="And so am I"></input> </tr></td> <tr><td> <input id='test1' type='button' value="I'm a button!"></input> </tr></td> </table> As a workaround, I've experimented with using a loop to create a class for each span, rising in increment until jQuery("input[id~=test1]").length, but I can't seem to get anything I do to work. Is there any way to give each matched element an unique ID? My fluency in jQuery is being put to the test! Thanks for any help in advance. Aaron

    Read the article

  • form id renamed to aspnetForm

    - by cfdev9
    When I compile and run a web application ASP.NET appears to be renaming the id of the form on the page, from id="login" to id="aspnetForm". It's messing up my stylesheet which expects the form with login for the id. Changing the css is not an option as it was provided by a designer and I don't want to modify it at all. How do I stop aspnet doing this?

    Read the article

  • Selecting id of TextArea (despite RichEditableText)

    - by duder
    I'm trying to select the id of a textArea when it's focused in <s:TextArea id="textarea1" focusIn="selectId(event)" /> selectId(event){ event.target.id; } Problem is TextArea is made up of RichEditableText so target doesn't actually refer to TextArea. I've tried event.target.parent.id but still not getting there. Anyone knows how to get to the bottom of this?

    Read the article

  • Linking Post Title to Specific Page ID

    - by ThatMacLad
    I've created a form to update my websites homepage with content but I wanted to know how I could set it up so that a posts title links to a specific post ID. I'd also like to add a Read More link that directs anybody reading the blog to the correct post. Here is my PHP code: <html> <head> <title>Blog Name</title> </head> <body> <?php mysql_connect ('localhost', 'root', 'root') ; mysql_select_db ('tmlblog'); $sql = "SELECT * FROM php_blog ORDER BY timestamp DESC LIMIT 5"; $result = mysql_query($sql) or print ("Can't select entries from table php_blog.<br />" . $sql . "<br />" . mysql_error()); while($row = mysql_fetch_array($result)) { $date = date("l F d Y", $row['timestamp']); $title = stripslashes($row['title']); $entry = stripslashes($row['entry']); $password = $row['password']; $id = $row['id']; if ($password == 1) { echo "<p><strong>" . $title . "</strong></p>"; printf("<p>This is a password protected entry. If you have a password, log in below.</p>"); printf("<form method=\"post\" action=\"post.php?id=%s\"><p><strong><label for=\"username\">Username:</label></strong><br /><input type=\"text\" name=\"username\" id=\"username\" /></p><p><strong><label for=\"pass\">Password:</label></strong><br /><input type=\"password\" name=\"pass\" id=\"pass\" /></p><p><input type=\"submit\" name=\"submit\" id=\"submit\" value=\"submit\" /></p></form>",$id); print "<hr />"; } else { ?> <p><strong><?php echo $title; ?></strong><br /><br /> <?php echo $entry; ?><br /><br /> Posted on <?php echo $date; ?> <hr /></p> <?php } } ?> </body> </html> Thanks for any help. I really appreciate any input!

    Read the article

  • Set required attribute of two h:selectManyCheckbox

    - by BRabbit27
    I have two h:selectManyCheckBox with the required attribute set to true. What I want is that the required attribute of both of the components work together. Only display the error message if and only if both of the selected items list are empty. Right now my problem is that the message displays if either one of them is empty. Here's my code: <rich:panel> <f:facet name="header"> <h:outputText value="Actualización de catálogos"/> </f:facet> <h:panelGrid columns="4"> <h:outputLabel for="actualizarCatalogoPEC" value="Actualizar catálogos PEC"/> <h:selectBooleanCheckbox id="actualizarCatalogoPEC" value="#{administrationBean.actualizaTodosPecChecked}"> <f:ajax event="click" render="todosCatalogosPEC"/> </h:selectBooleanCheckbox> <h:outputLabel for="actualizarCatalogoSAGARPA" value="Actualizar catálogos SAGARPA"/> <h:selectBooleanCheckbox id="actualizarCatalogoSAGARPA" value="#{administrationBean.actualizaTodosSagarpaChecked}"> <f:ajax event="click" render="todosCatalogosSAGARPA"/> </h:selectBooleanCheckbox> <a4j:outputPanel id="todosCatalogosPEC"> <h:selectManyCheckbox id="selectCatalogosPEC" disabled="#{administrationBean.actualizaTodosPecChecked}" required="true" value="#{administrationBean.catalogosPecSeleccionados}" requiredMessage="Seleccione al menos un catálogo" layout="pageDirection"> <f:selectItems value="#{administrationBean.catalogosPecOptions}"/> </h:selectManyCheckbox> </a4j:outputPanel> <h:panelGroup/> <a4j:outputPanel id="todosCatalogosSAGARPA"> <h:selectManyCheckbox id="selectCatalogosSAGARPA" disabled="#{administrationBean.actualizaTodosSagarpaChecked}" required="true" value="#{administrationBean.catalogosSagarpaSeleccionados}" requiredMessage="Seleccione al menos un catálogo" layout="pageDirection" > <f:selectItems value="#{administrationBean.catalogosSagarpaOptions}"/> </h:selectManyCheckbox> </a4j:outputPanel> <h:panelGroup/> <rich:message id="messageCatalogosPEC" for="selectCatalogosPEC"/> <h:panelGroup/> <rich:message id="messageCatalogosSAGARPA" for="selectCatalogosSAGARPA"/> <h:panelGroup/> <a4j:commandButton value="Actualizar catálogos" render="messageCatalogosPEC" action="#{administrationBean.doActualizaCatalogos}"/> </h:panelGrid> </rich:panel> Cheers

    Read the article

  • MSSQLSERVER Will Not Start - Event ID 913 and 1814

    - by ThaKidd
    Hello ServerFault! I need some serious help. I have a major database server down and am scratching my head at how to fix it. The server was hit by rolling black outs last week in Dallas and sense then, Microsoft SQL 2005 SP2 will not start up. I am getting the following errors (both when starting the service and while trying to execute mssqlsrv.exe -c -f -m: Event Type: Error Event Source: MSSQLSERVER Event ID: 913 Could not find database ID 3. Database may not be activated yet or may be in transition. Reissue the query once the database is available. If you do not think this error is due to a database that is transitioning its state and this error continues to occur, contact your primary support provider. Please have available for review the Microsoft SQL Server error log and any additional information relevant to the circumstances when the error occurred. and... Event Type: Information Event Source: MSSQLSERVER Event ID: 1814 Could not create tempdb. You may not have enough disk space available. Free additional disk space by deleting other files on the tempdb drive and then restart SQL Server. Check for additional errors in the event log that may indicate why the tempdb files could not be initialized. I have tried to rename the tempdb.mdf to tempdb.old with no success. I have checked and have 193 GB of free hard drive space. What else might cause this problem? Could the server need a chkdsk ran on it or do I need to be looking at some area of the database server? Any help is greatly appreciated. Thank you in advance.

    Read the article

  • Setting html attribute that is reserved keyword in Html.CheckBoxFor in ASP.NET MVC

    - by dormisher
    Hi, I am using the HtmlHelper to create a checkbox in my view like so: <%= Html.CheckBoxFor(model = model.SeatOnly, new { checked = "checked" })% However, an error is being thrown as checked is a reserved keyword. I have found a couple of people saying that you must use the 'reserved word prefix' and simply put an uderscore in front of the attribute like so: <%= Html.CheckBoxFor(model = model.SeatOnly, new { _checked = "checked" })% This does not generate an error but in the generated html the attribute is actually '_checked' which means it doesn't work (if I use firebug and remove the underscore the attribute then takes effect). Does anyone know a way around this while still using CheckBoxFor? Thanks

    Read the article

  • Use javac fork attribute with IBM JDK

    - by avjaz
    Hi - I have a large ant build that I'm working on, that is currently running out of memory. One ways I've read that can help mitigate this problem is to use javac fork="true" to run javac in a separate jvm. My problem is that I need to compile the project with the IBM JDK (this is not the JDK referenced by JAVA_HOME, and I would prefer it not to be). I tried setting the executable attribute of Ant's javac, to the path to IBM's javac but no joy (the project still won't compile). Ant's docs for the executable attribute state: Complete path to the javac executable to use in case of fork="yes". Defaults to the compiler of the Java version that is currently running Ant. Ignored if fork="no". Since Ant 1.6 this attribute can also be used to specify the path to the executable when using jikes, jvc, gcj or sj. Does anyone have any ideas? Thanks -

    Read the article

  • .NET WebService Custom Attribute

    - by DownChapel
    I would like to add a custom attribute to a asmx web service to determine if the request is valid based on the client IP address. This is a similar idea to the AuthorizeAttribute in ASP.NET MVC. Is there anywhere (e.g. a HTTP module) I can put the code to look at the attribute on the webservice and decide whether to allow the request or not? In my web.config the handler for asmx is the ScriptHandlerFactory from the System.Web.Extensions dll. I have already implemented the functionality with a HTTP module and a config file with a list of allowed URLs, but I would prefer to get rid of the config file and just add an attribute to the webservice class. Thanks

    Read the article

  • Proper usage (best practices) of Browsable attribute in .NET for runtime grid component behavior

    - by Dan
    I understand how Browsable attribute is supposed to work. It's supposed to hide a property from showing up in a PropertyGrid in design time. It also has another effect in that it will stop a Property from showing up in components such as Grids, or specifically Infragistics WinGrid. I am not sure if it has this behaviour on regular Windows Forms grids. This works, but it doesn't sound like Browsable is being use as intended when being used for 'Run time' displaying of a property on a grid component. Any literature from Microsoft on proper use. Even though it works, I don't want to use this attribute to hide columns on a grid bound to a business object if it's not indeed the correct usage of the attribute, but rather something some grid vendors decided to use to determine property visibility on their grids.

    Read the article

  • XPATH - Select all child nodes with a specific attribute

    - by David
    Hi, what would be the xpath for the following: Find all child nodes with a specific attibute value but starting from a node with a specific attribute value. This is kind of related to a question I posted earlier about parsing and rdf xml file - I thought I had solved it but not quite yet. For example I am trying to parse and grab all of the rdf:about attribute values. I have this working fine. I need to add the following condition though - parsing needs to start after a specific rdf:about value is found. I am working in php and and using DomDocument and am using the following xpath query: $xpath-query('//@rdf:about') - it is finding all rdf:about attributes fine. I need to extend this to only find thos attributes that come after the node who rdf:about attribute is equal to something. Hope this makes sense.

    Read the article

  • XPath select an attribute based on value

    - by Apeksha
    Using VB.Net, I have an XmlNode object, xNode. I need to select an attribute of this node if it has a particular value. e.g. xNode.SelectSingleNode(".[@attr1='1']") I would expect this statement to return the attribute "attr1", only if it has a value of "1". However, I get an error - Expression must evaluate to a node-set. When I tried this - xNode.SelectSingleNode("@attr1[@attr1='1']") It always returns Nothing, even if the attribute has a value of 1. I have tried a lot of different things, but no luck yet. Please help. Thanks.

    Read the article

  • python object AttributeError: type object 'Track' has no attribute 'title'

    - by ccwhite1
    I apologize if this is a noob question, but I can't seem to figure this one out. I have defined an object that defines a music track (NOTE: originally had the just ATTRIBUTE vs self.ATTRIBUTE. I edited those values in to help remove confusion. They had no affect on the problem) class Track(object): def __init__(self, title, artist, album, source, dest): """ Model of the Track Object Contains the followign attributes: 'Title', 'Artist', 'Album', 'Source', 'Dest' """ self.atrTitle = title self.atrArtist = artist self.atrAlbum = album self.atrSource = source self.atrDest = dest I use ObjectListView to create a list of tracks in a specific directory ....other code.... self.aTrack = [Track(sTitle,sArtist,sAlbum,sSource, sDestDir)] self.TrackOlv.AddObjects(self.aTrack) ....other code.... Now I want to iterate the list and print out a single value of each item list = self.TrackOlv.GetObjects() for item in list: print item.atrTitle This fails with the error AttributeError: type object 'Track' has no attribute 'atrTitle' What really confuses me is if I highlight a single item in the Object List View display and use the following code, it will correctly print out the single value for the highlighted item list = self.TrackOlv.GetSelectedObject() print list.atrTitle

    Read the article

  • ASP MVC: Custom Validation Attribute

    - by user323395
    I'm trying to write my own Custom Validation attribute but i'm having some problems. The attribute i'm trying to write is that when a user logs in, the password will be compared against the confirmation password. namespace EventCompanion.Data.Attributes { public class ComparePassword : ValidationAttribute { public string PasswordToCompareWith { get; set; } public override bool IsValid(object value) { if (PasswordToCompareWith == (string)value) { return true; } return false; } } Now my problem is when i'm trying to set the attribute like this in the model file: [Required] [ComparePassword(PasswordToCompareWith=ConfirmPassword)] public string Password { get; set; } [Required] public string ConfirmPassword { get; set; } } I get the following error: Error 1 An object reference is required for the non-static field, method, or property 'Project.Data.Models.GebruikerRegistreerModel.ConfirmPassword.get' It seems that VS is not accepting the confirmpassword in the "PasswordToCompareWith=ConfirmPassword" part Now my question: What am i doing wrong? Thanks in advance!!!

    Read the article

  • Attribute lost with yield

    - by Nelson
    Here's an interesting one... There is some code that I'm trying to convert from IList to IEnumerable: [Something(123)] public IEnumerable<Foo> GetAllFoos() { SetupSomething(); DataReader dr = RunSomething(); while (dr.Read()) { yield return Factory.Create(dr); } } The problem is, SetupSomething() comes from the base class and uses: Attribute.GetCustomAttribute(new StackTrace().GetFrame(1).GetMethod(), typeof(Something)) Yield ends up creating MoveNext(), MoveNext() calls SetupSomething(), and MoveNext() does not have the [Something(123)] attribute. I can't change the base class, so it appears I am forced to stay with IList or implement IEnumerable manually (and add the attribute to MoveNext()). Is there any other way to make yield work in this scenario?

    Read the article

  • DebuggerDisplay attribute does not work as expected!

    - by mark
    Dear ladies and sirs. I know that this attribute should work in C# and yet, in my case it does not. I have a class with a lazy property Children. Accessing this property may have a side effect of roundtripping to the server. So, naturally, I do not want this to happen when I just watch it in the debugger watch window. Omitting all the irrelevant details the source looks pretty ordinary: [DebuggerDisplay("(Frozen) {m_children}")] public IList<IEntityBase> Children { get { if (m_children == null) { m_children = FetchChildrenFromDB(this); } return m_children; } } And yet, when I watch the object and expand this in the watch window I do not see (Frozen) in the display, meaning the debugger simply ignores the attribute. Provided the image link is still valid it should be visible below: http://i28.tinypic.com/2zxo9s5.jpg The attribute is really there, according to Reflector. I use VS2008. Any ideas?

    Read the article

  • Find HTML based on partial attribute

    - by Kirean
    Is there a way with javascript (particularly jQuery) to find an element based on a partial attribute name? I am not looking for any of the selectors that find partial attribute values as referenced in these links: starts with [name^="value"] contains prefix [name|="value"] contains [name*="value"] contains word [name~="value"] ends with [name$="value"] equals [name="value"] not equal [name!="value"] starts with [name^="value"] but more something along the lines of <div data-api-src="some value"></div> <div data-api-myattr="foobar"></div> and $("[^data-api]").doSomething() to find any element that has an attribute that starts with "data-api".

    Read the article

  • CoreData could not fulfill a fault when adding new attribute

    - by cagreen
    I am receiving a "CoreData could not fulfill a fault for ..." error message when trying to access a new attribute in a new data model. If I work with new data I'm ok, but when I attempt to read existing data I get the error. Do I need to handle the entity differently myself if the attribute isn't in my original data? I was under the impression that Core Data could handle this for me. My new attribute is marked as optional with a default value. I have created a new .xcdatamodel (and set it to be the current version) and updated my NSPersistentStoreCoordinator initialization to take advantage of the lightweight migration as follows: NSDictionary *options = [NSDictionary dictionaryWithObjectsAndKeys: [NSNumber numberWithBool:YES], NSMigratePersistentStoresAutomaticallyOption, [NSNumber numberWithBool:YES], NSInferMappingModelAutomaticallyOption, nil]; NSError *error = nil; persistentStoreCoordinator = [[NSPersistentStoreCoordinator alloc] initWithManagedObjectModel:[self managedObjectModel]]; if (![persistentStoreCoordinator addPersistentStoreWithType:NSSQLiteStoreType configuration:nil URL:storeUrl options:options error:&error]) { NSLog(@"Unresolved error %@, %@", error, [error userInfo]); abort(); } Any help is appreciated.

    Read the article

  • Creating an Attribute to check for Exceptions

    - by BiffBaffBoff
    I'm creating an attribute so that whenever an exception occurs on my site, I'll receive an email detailing the exception. I've got so far but my Attribute code doesn't seem to fire if an exception occurs: public class ReportingAttribute : FilterAttribute, IExceptionFilter { public void OnException(ExceptionContext filterContext) { // This will generate an email to me ErrorReporting.GenerateEmail(filterContext.Exception); } } Then above my Controller I'm doing: [ReportingAttribute] public class AccountController : Controller The other way to do it is ofcourse putting ErrorReporting.GenerateEmail(ex) inside my catch blocks? There must be a simpler way? Thats why I thought of creating the Attribute to handle this

    Read the article

< Previous Page | 17 18 19 20 21 22 23 24 25 26 27 28  | Next Page >