Search Results

Search found 13249 results on 530 pages for 'field guy'.

Page 4/530 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Auto populate a text field based on another text field

    - by Syed Aslam
    I am trying to auto-populate a text field based on the value of another input field. Currently trying to do this using observe_field helper like this: <%= observe_field( :account_name, :function => "alert('Name changed!')", :on => 'keyup' ) %> <% form_for(@account, :html => { :id => 'theform' }) do |f| %> <label for="accountname"> Account name </label> <%= form.text_field :name, :tabindex => '1' %> <label for="subdomain"> Subdomain </label> <%= form.text_field :subdomain, :tabindex => '2' %> <% end %> When the user enters text in the account_name text_field, I want to copy that convert into a subdomain (downcase and join by '-') and populate to subdomain text_field. But, in the process getting this error: element is null var method = element.tagName.toLowerCase(); protot...9227640 (line 3588) Where exactly am I going wrong here? Or is there a better way to do this?

    Read the article

  • PHP preg_match: a pattern which satisfies all MySQL field names (including 'table.field' formations)

    - by gsquare567
    i need a pattern which satisfies mysql field names, but also with the option of having a table name before it examples: mytable.myfield myfield my4732894__7289FiEld here's what i tried: $pattern = "/^[a-zA-Z0-9_]*?[\.[a-zA-Z0-9_]]?$/"; this worked for what i needed before, which was just the field name: $pattern = "/^[a-zA-Z0-9_]*$/"; any ideas why my addition isnt working? maybe i'm making up regex, so i'll explain what i added... the first '?' is to say that it isn't greedy, ie. it will stop if the next part, namely "[.[a-zA-Z0-9_]]?" is satisfied. now, that second part is just the same as the first except it is optional (hence the '?' at the end) and it starts with a period (hence the '[.' and ']' wrapping my old clause. and obviously, the "^" and "$" rep the beginning and end of the string so... any ideas? (also, i'm a tad confused as to why i need to put in those "/"s in the begining/end anyways, so if you could tell me why it's required, that'd be awesome) thanks a lot! (and thanks for reading this all if you actually did... it's quite a ramble)

    Read the article

  • What is the syntax for combining Word field codes?

    - by MADCookie
    I want to create a hyperlink to the location of my Word document. The document is on an web server so its path is like http://myserver.com/folder/worddocument.docx. I can use the field code "FILENAME" and the field code "HYPERLINK", but I can't figure out how to use them together. File name: { FILENAME \* Lower \p \* MERGERFORMAT } Hyperlink: { HYPERLINK "http://myserver.com/folder/worddocument.docx" }

    Read the article

  • How do I add a version number field to an office 2007 docx document?

    - by Jon Cage
    I've been having a crack at using fields in Word 2007 and have hit a slight stumbling block. I want to add a field which I can use in several parts of the document to represent the current version (something of the form v0.1 but I can't see an obvious way to do it). The only provision I've found for this is something called RevNum but that gets updated every time I save the document. Is there a field I've missed or a way of adding custom fields or something?

    Read the article

  • why search field in not displayed at the Iphone MKMapView?

    - by Mishal
    Hi, In My application i am using MKMapview to display the googleMap,but it is not displaying the search field in the Map. I have downloaded the Maps application from the Appstore in my real device and which is disaplying the seach field in the map. can any body have any solution for displaying the search field in the Existing Map, as i want to search the text into the search field and want to display its content to the Map? Pls provide any solution, which would be appreaciated. Thanks, Mishal Shah

    Read the article

  • Hidden Field asp.net

    - by user329419
    I want to hide columns in asp.net in GridView then access the values in GridViewSelectIndexChanged using vb.net. I am using hidden fields in the GridView. When I try to access gives me an error object reference not set to an instance here is the code <asp:GridView ID="GridView1" runat="server" OnSorting="GridView1_OnSorting" AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False" BorderStyle="Outset" CellPadding="4" DataSourceID="odsA02_Tracking" ForeColor="#333333" GridLines="Vertical" Style="border-right: #0000ff thin solid; table-layout: auto; border-top: #0000ff thin solid; font-size: x-small; border-left: #0000ff thin solid; border-bottom: #0000ff thin solid; font-family: Arial; border-collapse: separate" Font-Size="Small" PageSize="30"> <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" /> <RowStyle BackColor="#EFF3FB" /> <EditRowStyle BackColor="#2461BF" /> <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" /> <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" /> <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" /> <AlternatingRowStyle BackColor="White" /> <Columns> <asp:CommandField ShowSelectButton="True" /> <asp:boundfield datafield="Since" HeaderText="Submit Date" ReadOnly=true SortExpression="Since" /> <asp:BoundField DataField="Started_By" HeaderText="Submitted By" SortExpression="Started_By" /> <asp:BoundField DataField="Client_FullName" HeaderText="Client Name" ReadOnly="True" SortExpression="Client_FullName" /> <asp:BoundField DataField="Product_Desc" HeaderText="Product" ReadOnly="True" SortExpression="Product_Desc" /> <asp:BoundField DataField="Branch_List" HeaderText="Branch" ReadOnly="True" SortExpression="Branch_List" /> <asp:BoundField DataField="Event_AssignedID" HeaderText="Assigned To" ReadOnly="True" SortExpression="Event_AssignedID" /> <asp:BoundField DataField="DaysElapsed" HeaderText="Days Open" ReadOnly="True" SortExpression="DaysElapsed" /> <asp:BoundField DataField="Status" HeaderText="Status" SortExpression="Status" /> <asp:TemplateField HeaderText=Instance_ID > <ItemTemplate> <asp:HiddenField ID=lblInstanceID Value='<%#Eval("Instance_ID") %>' runat=server> </asp:HiddenField> </ItemTemplate> </asp:TemplateField> <asp:TemplateField HeaderText=Seq_ID> <ItemTemplate> <asp:HiddenField ID=lblSeqID Value='<%#Eval("Seq_ID") %>' runat=server/> </ItemTemplate> </asp:TemplateField> <asp:TemplateField HeaderText=Form_Code> <ItemTemplate> <asp:HiddenField ID=lblFormCode Value='<%#Eval("Form_Code") %>' runat=server/> </ItemTemplate> </asp:TemplateField> </Columns> </asp:GridView> Protected Sub GridView1_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles GridView1.SelectedIndexChanged Dim Instance_ID As String Dim Seq_ID As String Dim Form_Code As String Dim PARMS As String Dim DestinationURL As String Dim DestinationParms As String Dim instanceID As String = CType(GridView1.FindControl("lblInstanceID"), HiddenField).Value End sub

    Read the article

  • Does form with enctype="multipart/form-data" cause problems accessing a hidden field

    - by Ankur
    I have created a hidden form element <form name="UploadImage" enctype="multipart/form-data" method="post" action="UploadImage"> <label> </label> <input name="imgUploadObjId" id="imgUploadObjId" value="52" type="hidden"> //rest of the form here </form> And I am trying to get the value with this line in a servlet (as I have done before): int objId = Integer.parseInt(request.getParameter("imgUploadObjId")); But I get this (line 33 is the line above): java.lang.NumberFormatException: null java.lang.Integer.parseInt(Unknown Source) java.lang.Integer.parseInt(Unknown Source) web.objects.UploadImage.doPost(UploadImage.java:33) javax.servlet.http.HttpServlet.service(HttpServlet.java:637) javax.servlet.http.HttpServlet.service(HttpServlet.java:717) Is there something different about a form with enctype="multipart/form-data"? Or can you see some other error.

    Read the article

  • Increment non unique field during SQL insert

    - by phill
    I'm not sure how to word this cause I am a little confused at the moment, so bare with me while I attempt to explain, I have a table with the following fields: OrderLineID, OrderID, OrderLine, and a few other unimportant ones. OrderLineID is the primary key and is always unique(which isn't a problem), OrderID is a foreign key that isn't unique(also not a problem), and OrderLine is a value that is not unique in the table, but should be unique for any OrderIDs that are the same...so if that didn't make sense, perhaps a picture OrderLineID, OrderID, OrderLine 1 1 1 2 1 2 3 1 3 4 2 1 5 2 2 For all OrderIDs there is a unique OrderLine. I am trying to create an insert statement that gets the max OrderLine value for a specific OrderId so I can increment it, but it's not working so well and I could use a little help. What I have right now is below, I build the sql statement in a program and replace OrderID # with an actual value. I am pretty sure the problem is with the nested select statement, and incrementing the result, but I can't find any examples that do this since my google skills are weak apparently.... INSERT INTO tblOrderLine (OrderID, OrderLine) VALUES (<OrderID #>, (SELECT MAX(OrderLine) FROM tblOrderLine WHERE orderID = <same OrderID #>)+1) any help would be nice.

    Read the article

  • implementing a read/write field for an interface that only defines read

    - by PaulH
    I have a C# 2.0 application where a base interface allows read-only access to a value in a concrete class. But, within the concrete class, I'd like to have read/write access to that value. So, I have an implementation like this: public abstract class Base { public abstract DateTime StartTime { get; } } public class Foo : Base { DateTime start_time_; public override DateTime StartTime { get { return start_time_; } internal set { start_time_ = value; } } } But, this gives me the error: Foo.cs(200,22): error CS0546: 'Foo.StartTime.set': cannot override because 'Base.StartTime' does not have an overridable set accessor I don't want the base class to have write access. But, I do want the concrete class to provide read/write access. Is there a way to make this work? Thanks, PaulH Unfortunately, Base can't be changed to an interface as it contains non-abstract functionality also. Something I should have thought to put in the original problem description. public abstract class Base { public abstract DateTime StartTime { get; } public void Buzz() { // do something interesting... } } My solution is to do this: public class Foo : Base { DateTime start_time_; public override DateTime StartTime { get { return start_time_; } } internal void SetStartTime { start_time_ = value; } } It's not as nice as I'd like, but it works.

    Read the article

  • Different analyzers for each field

    - by user72185
    Hi, How can I enable different analyzers for each field in a document I'm indexing with Lucene? Example: RAMDirectory dir = new RAMDirectory(); IndexWriter iw = new IndexWriter(dir, new StandardAnalyzer(Lucene.Net.Util.Version.LUCENE_CURRENT), true, IndexWriter.MaxFieldLength.UNLIMITED); Document doc = new Document(); Field field1 = new Field("field1", someText1, Field.Store.YES, Field.Index.ANALYZED, Field.TermVector.WITH_POSITIONS_OFFSETS); Field field2 = new Field("field2", someText2, Field.Store.YES, Field.Index.ANALYZED, Field.TermVector.WITH_POSITIONS_OFFSETS); doc.Add(field1); doc.Add(field2); iw.AddDocument(doc); iw.Commit(); The analyzer is an argument to the IndexWriter, but I want to use StandardAnalyzer for field1 and SimpleAnalyzer for field2, how can I do that? The same applies when searching, of course. The correct analyzer must be applied for each field.

    Read the article

  • Ajax auto-populate from field when another form field is filled out

    - by Jon
    Has anyone used javascript/ajax to take data from one form field and put it into another? I'm trying to create a form that when one text input is filled out a second is auto-populated with the first letter of the word that is in the first text input. I'm thinking I can limit the second text input to one character to help get the desired result, but I'm not having luck finding the javascript to get the second text input to auto-populate from the first. Any suggestions?

    Read the article

  • Django Custom Field: Only run to_python() on values from DB?

    - by Adam Levy
    How can I ensure that my custom field's *to_python()* method is only called when the data in the field has been loaded from the DB? I'm trying to use a Custom Field to handle the Base64 Encoding/Decoding of a single model property. Everything appeared to be working correctly until I instantiated a new instance of the model and set this property with its plaintext value...at that point, Django tried to decode the field but failed because it was plaintext. The allure of the Custom Field implementation was that I thought I could handle 100% of the encoding/decoding logic there, so that no other part of my code ever needed to know about it. What am I doing wrong? (NOTE: This is just an example to illustrate my problem, I don't need advice on how I should or should not be using Base64 Encoding) def encode(value): return base64.b64encode(value) def decode(value): return base64.b64decode(value) class EncodedField(models.CharField): __metaclass__ = models.SubfieldBase def __init__(self, max_length, *args, **kwargs): super(EncodedField, self).__init__(*args, **kwargs) def get_prep_value(self, value): return encode(value) def to_python(self, value): return decode(value) class Person(models.Model): internal_id = EncodedField(max_length=32) ...and it breaks when I do this in the interactive shell. Why is it calling to_python() here? >>> from myapp.models import * >>> Person(internal_id="foo") Traceback (most recent call last): File "<console>", line 1, in <module> File "/usr/local/lib/python2.6/dist-packages/django/db/models/base.py", line 330, in __init__ setattr(self, field.attname, val) File "/usr/local/lib/python2.6/dist-packages/django/db/models/fields/subclassing.py", line 98, in __set__ obj.__dict__[self.field.name] = self.field.to_python(value) File "../myapp/models.py", line 87, in to_python return decode(value) File "../myapp/models.py", line 74, in decode return base64.b64decode(value) File "/usr/lib/python2.6/base64.py", line 76, in b64decode raise TypeError(msg) TypeError: Incorrect padding I had expected I would be able to do something like this... >>> from myapp.models import * >>> obj = Person(internal_id="foo") >>> obj.internal_id 'foo' >>> obj.save() >>> newObj = Person.objects.get(internal_id="foo") >>> newObj.internal_id 'foo' >>> newObj.internal_id = "bar" >>> newObj.internal_id 'bar' >>> newObj.save() ...what am I doing wrong?

    Read the article

  • Naming boolean field that is a verb

    - by dnhang
    In Java, by convention getter and setter for boolean fields will be isField() and setField(). This works perfectly fine with field names that are adjectives like active, visible, closed, etc. But how do I name a field that has meaning of a verb, like haveChildren? Add _ing to the verb (havingChildren), maybe? Edit: to clarify, I don't have control of the method names (getter and setter), they are auto-generated by the IDE. So what I need is an appropriate field name so that when the IDE generate a getter for it, it make senses. For example, hasChildren is a perfect field name, but when the IDE generate the getter for the field it would be isHasChildren. How do I solve this?

    Read the article

  • Field Trip Automatically Alerts You to Local Places of Interest

    - by Jason Fitzpatrick
    Android: Field Trip is a free mobile app that acts like a local tour guide, alerting you to landmarks, historical sites, and unique local attractions. A simple walk around your city’s down town can turn into a history lesson or lead to the discovery of a new hang out. To use Field Trip simply install it on your GPS-enabled Android smartphone and start it up. You can configure the app to notify you of certain types of things (historic places, outdoor art, food and drink, and more), refine the results over time by telling the app which tidbits you enjoyed, and more. Field Trip even has a driving mode where you can turn it on and, as you drive through a city or across the countryside, it will narrate your journey by telling you about interesting sites you’re passing. Field Trip is free, Android only. Hit up the link below to take it for a spin. Field Trip [via Geek News Central] 8 Deadly Commands You Should Never Run on Linux 14 Special Google Searches That Show Instant Answers How To Create a Customized Windows 7 Installation Disc With Integrated Updates

    Read the article

  • Algorithm to calculate trajectories from vector field

    - by cheeesus
    I have a two-dimensional vector field, i.e., for each point (x, y) I have a vector (u, v), whereas u and v are functions of x and y. This vector field canonically defines a set of trajectories, i.e. a set of paths a particle would take if it follows along the vector field. In the following image, the vector field is depicted in red, and there are four trajectories which are partly visible, depicted in dark red: I need an algorithm which efficiently calculates some trajectories for a given vector field. The trajectories must satisfy some kind of minimum denseness in the plane (for every point in the plane we must have a 'nearby' trajectory), or some other condition to get a reasonable set of trajectories. I could not find anything useful on Google on this, and Stackexchange doesn't seem to handle the topic either. Before I start devising such an algorithm by myself: Are there any known algorithms for this problem? What is their name, for which keywords do I have to search?

    Read the article

  • user model password field default password field in django

    - by imran-glt
    Hi, I've created a custom user model in my application. This user model is working fine, but there are a couple of problems I have with it. 1) The change password link in the my register.html page doesn't work? 2) The default password box on the add/edit page for a user is a little unfriendly. Ideally, what I'd like is the two password fields from the change password form on the add/edit user form in the admin, which will automatically turn convert the entered password into a valid encrypted password in Django. This would make the admin system MUCH friendlier and much more suited to my needs, as a fair number of user accounts will be created and maintained manually in this app, and the person responsible for doing so will likely be scared off at the sight of that admin field, or just type a clear text password and wonder why it doesn't work. Is this possible / How do I do this?

    Read the article

  • [JQuery] Highlight a Radio field and then pop up an input text box field

    - by kwokwai
    Hi all, I am trying to make some dynamic effect to a HTML page using JQuery. 1. When the user clicks a Radio feild, the field will be highlighted. 2. When the user clicks the Radio 'Man', a Input text box will be provided immeditely just below it. Here is my simple HTML page, but I don't know how to do with the JQuery part: <Table> <TR> <TD>Gender</TD> <TD> Man: <INPUT type=radio name="gender" value="M"><Br/> Woman: <INPUT type=radio name="gender" value="F"> </TD> </TR> <?Table>

    Read the article

  • Using jQuery to auto-populate a form field from another form field

    - by Jon
    Has anyone used jquery to take data from one form field and put it into another? I'm trying to create a form that when one text input is filled out a second is auto-populated with the first letter of the word that is in the first text input. I'm thinking I can limit the second text input to one character to help get the desired result, but I'm not having luck getting jquery to get the second text input and auto-populate once the first is entered. Here is the code I'm using: <script type="text/javascript"> jQuery(document).ready(function($) { $('#textBox1').keyup(function(){ if($.trim($('#textBox2').val()) == '') $('#textBox2').val($(this).val().substring(0, 1); }); }); </script> Also, do I need to have any in the text input fields of the form other than matching "textBox1" id/names? Any suggestions?

    Read the article

  • PHP: form input field names containing square brackets like field[index]

    - by gidireich
    Hi, I've seen lot of code that handle forms, which creates input fields with names containing square brackets. I understand that this is being somehow converted to PHP arrays when a PHP script examines the $_POST variable. My questions about this: What is the mechanism behind? At which point this names that merely contain brackets are converted to arrays? Is this a feature of the HTPP protocol? Of web servers? Of the PHP language? Continuing the previous question, is this a commonly used hack or a normal programming tool? What are (all) the rules of using brackets in input field names? Can multidimensional arrays be created this way? Thanks, Gidi

    Read the article

  • add dynamic field near his parent field?

    - by Kaps Hasija
    hi in my web page i am using Add Dynamic Field Functionality by using jquery. I am adding new div bu clicking on Existing div Like <div class="divA">divA1 </div> <div class="divB" >DivB1 </div> <div class="divC" />DivC1 </div> by clicking on parent div i am creating new daynamic div <div class="divA">DivA2 </div> its coming end of the all div's like that <div class="divA">divA1 </div> <div class="divB" >DivB1 </div> <div class="divC" />DivC1 </div> <div class="divA">DivA2 </div> But i need along with his parent div Like that <div class="divA">divA1 </div> <div class="divA">DivA2 </div> <div class="divB" >DivB1 </div> <div class="divC" />DivC1 </div> any idea Thanks. This is My Jquery Code newTextBoxDiv = $(document.createElement('div')) .attr("id", text).attr("class", 'test0 ' + text); newTextBoxDiv.html('<div style=" width:150px; class="DivA" float: left"> </div>'); } newTextBoxDiv.appendTo("#contents"); contents is id of main div

    Read the article

  • Creating metadata value relationships

    - by kyle.hatlestad
    I was recently asked an question about an interesting use case. They wanted content to be submitted into UCM with a particular ID in a custom metadata field. But they wanted that ID to be translated during submission into an employee name in another metadata field upon submission. My initial thought was that this could be done with a dependent choice list (DCL). One option list field driving the choices in another. But this didn't work in this case for a couple of reasons. First, the number of IDs could potentially be very large. So making that into a drop-down list would not be practical. The preference would be for that field to simply be a text field to type in the ID. Secondly, data could be submitted through different methods other then the web-based check-in form. And without an interface to select the DCL choices, the system needed a way to determine and populate the name field. So instead I went the approach of having the value of the ID field drive the value of the Name field using the derived field approach in my rule. In looking at it though, it was easy to simply copy the value of the ID field into the Name field...but to have it look up and translate the value proved to be the tricky part. So here is the approach I took... First I created my two metadata fields as standard text fields in the Configuration Manager applet. Next I create a table that stores the relationship between the IDs and Names. I then create a View into that table and set the column to the EmployeeID. I now create a new Application Field and set it as an option list using the View I created in the previous step. The reason I create it as an Application field is because I don't need to display the field or store a value in it. I simply need to make use of the option list in the next step... Finally, I create a Rule in which I select the Employee Name field and turn on the 'Is derived field' checkbox. I edit the derived value and add a new condition. Because the option list is a Application field and not an Information field, I can't use the Compute button. Instead, I insert this line directly in the Value field: @getFieldViewValue("EmployeeMapping",#active.xEmployeeID, "EmployeeName") The "EmployeeMapping" parameter designates that the value should be pulled from the EmployeeMapping Application field that I had created in the previous step. The #active.xEmployeeID field is the ID value that should be pulled from what the user entered. "EmployeeName" is the column name in the table which has the value which corresponds to the ID. The extracted name then becomes the value within our Employee Name field. That's it. You can then add additional Rules to make the Name field read-only/hidden on the check-in page and such.

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >