Search Results

Search found 12392 results on 496 pages for 'backing field'.

Page 41/496 | < Previous Page | 37 38 39 40 41 42 43 44 45 46 47 48  | Next Page >

  • How i can enter this input field ??

    - by piter
    Hello. I have a problem with fill the input field on my webaplication. When i use selenium ide, and record my steps and next play in slow mode - all works good. But when i try to use that when i build a java script i have a problem. On the selenium ide its looks like that: selenium.type("//div[@id='startPoint']/div/div[2]/div[2]/input", "krakow"); when i run it on selenium rc i have error like: ERROR: Element //div[@id='startPoint']/div/div[2]/div[2]/input not found Anyone know how can i solve that problem ? (sorry for my eng.)

    Read the article

  • Problem updating a database field from my controller

    - by ben
    I have an update method in my users controller that I call from a HTTPService in Flex 4. The update method is as follows: def updateName @user = User.find_by_email(params[:email]) @user.name = params[:nameNew] render :nothing => true end This is console output: Processing UsersController#updateName (for 127.0.0.1 at 2010-05-24 14:12:49) [POST] Parameters: {"action"="updateName", "nameNew"="ben", "controller"="users", "email"="[email protected]"} User Load (0.6ms) SELECT * FROM "users" WHERE ("users"."email" = '[email protected]') LIMIT 1 Completed in 20ms (View: 1, DB: 1) | 200 OK [http://localhost/users/updateName] But when I check my database, the name field is never updated. What am I doing wrong? Thanks for reading.

    Read the article

  • Replace newline from MySQL TEXT field to parse w/ JSON

    - by dr3w
    Hi, "replace newline" seems to be a question asked here and there like hundred times already. But however, i haven't found any working solution for myself yet. I have a textarea that i use to save data into DB. Then using AJAX I want to get data from the DB in the backend that is in TEXT field and to pass it to frontend using JSON. But pasing JSON returns an error, as new lines from DB are not valid JSON syntax, I guess i should use \n instead... But how do i replace newlinew from DB with \n? I've tried this $t = str_replace('<br />', '\n', nl2br($t)); and this $t = preg_replace("/\r\n|\n\r|\r|\n/", "\n", $t); and using CHAR(13) and CHAR(10), and still I get an error the new line in textarea is equivalent to, i guess $t = 'text with a newline'; it gives the same error. And in notepad i clearly see that it is crlf

    Read the article

  • django admin app error (Model with property field): global name 'full_name' is not defined

    - by rxin
    This is my model: class Author(models.Model): first_name = models.CharField(max_length=200) last_name = models.CharField(max_length=200) middle_name = models.CharField(max_length=200, blank=True) def __unicode__(self): return full_name def _get_full_name(self): "Returns the person's full name." if self.middle_name == '': return "%s %s" % (self.first_name, self.last_name) else: return "%s %s %s" % (self.first_name, self.middle_name, self.last_name) full_name = property(_get_full_name) Everything is fine except when I go into admin interface, I see TemplateSyntaxError at /bibbase2/admin/bibbase2/author/ Caught an exception while rendering: global name 'full_name' is not defined It seems like the built-in admin app doesn't work with a property field. Is there something wrong with my code?

    Read the article

  • django admin gives warning "Field 'X' doesn't have a default value"

    - by noam
    I have created two models out of an existing legacy DB , one for articles and one for tags that one can associate with articles: class Article(models.Model): article_id = models.AutoField(primary_key=True) text = models.CharField(max_length=400) class Meta: db_table = u'articles' class Tag(models.Model): tag_id = models.AutoField(primary_key=True) tag = models.CharField(max_length=20) article=models.ForeignKey(Article) class Meta: db_table = u'article_tags' I want to enable adding tags for an article from the admin interface, so my admin.py file looks like this: from models import Article,Tag from django.contrib import admin class TagInline(admin.StackedInline): model = Tag class ArticleAdmin(admin.ModelAdmin): inlines = [TagInline] admin.site.register(Article,ArticleAdmin) The interface looks fine, but when I try to save, I get: Warning at /admin/webserver/article/382/ Field 'tag_id' doesn't have a default value

    Read the article

  • Django admin.py missing field error

    - by user782400
    When I include 'caption', I get an error saying EntryAdmin.fieldsets[1][1]['fields']' refers to field 'caption' that is missing from the form In the admin.py; I have imported the classes from joe.models import Entry,Image Is that because my class from models.py is not getting imported properly ? Need help in resolving this issue. Thanks. models.py class Image(models.Model): image = models.ImageField(upload_to='joe') caption = models.CharField(max_length=200) imageSrc = models.URLField(max_length=200) user = models.CharField(max_length=20) class Entry(models.Model): image = models.ForeignKey(Image) mimeType = models.CharField(max_length=20) name = models.CharField(max_length=200) password = models.URLField(max_length=50) admin.py class EntryAdmin(admin.ModelAdmin): fieldsets = [ ('File info', {'fields': ['name','password']}), ('Upload image', {'fields': ['image','caption']})] list_display = ('name', 'mimeType', 'password') admin.site.register(Entry, EntryAdmin) admin.site.register(Image)

    Read the article

  • CSS :after pseudo element on INPUT field

    - by matra
    I am trying to use :after CSS pseudo element on INPUT field, but it does not work. If I use it with SPAN, it works OK. <style type="text/css"> .mystyle:after {content:url(smiley.gif);} .mystyle {color:red;} </style> This works (puts the smily after "buu!" and berfore "some more") <span class="mystyle">buuu!</span>a some more This does not work - it only color someValue in red, but there is no smiley. <input class="mystyle" type="text" value="someValue"> What am I doing wrong? should I use another pseudo selector. Note: I can not add SPAN sround my INPUT; because it is being generated by a third party control. Matraj

    Read the article

  • Trigger jQueryUI datePicker on button click, send result to disabled input field

    - by Enrique
    Hi I've been searching for a way to do this, but could not find anything I want to have a: a disabled input text field, called #XX. This input will store the selected value from datepicker (as this input is disabled I won't be able to use this to trigger the datePicker) A button, besides #XX. When user clicks this button, datePicker will show. User will select the date, and this date will be assigned to disabled input #XX. I want this so user can't change manually -by typing crap- the selected date Also, should I validate if date was entered using #XX.val()? or is there a better way? Thanks

    Read the article

  • Access - how to derive a field upon entry of a record

    - by jonos
    I have an Access database for a media rental company which includes the following tables, among others; LOAN: customer_id (pk), loan_datetimeLeant (pk), loan_dateReturned (pk) LOAN_ITEMS: customer_id (pk), loan_datetimeLeant (pk), item_id (pk), loanItem_cost ITEM: item_id (pk), product_id, item_availability PRODUCT: product_id (pk), product_name, product_type MEDIA_COST: product_type (pk), product_cost So basically the 'product type' (DVD, VHS etc) determines the cost. The 'product id' determines what movie, platform etc each item is. My question is: When creating a form for the Loan_Items table, how can I populate the loanItem_cost field (so it is stored) whenever a new Loan_Item record is added? I need to store it as the cost of the item (product_cost) may change over time and I'd like to record what the customer paid at the time the loan was made. Thanks in advance

    Read the article

  • Query Concatenated Field (using SubSonic)

    - by jwynveen
    Is there a way to query against a concatenated field using MS SQL? For instance, what I want to do is something like: Select FirstName+' '+LastName as FullName from Attendees where FullName like '%Joe Schmoe%' The above doesn't work. What I have found works is: Select * from Attendee where FirstName+' '+LastName like '%Joe Schmoe%' but I can't figure out how to do that using a SubSonic SqlQuery. I have a number of joins and OR statements added dynamically that I don't want to have to write out the sql manually. Any help/ideas?

    Read the article

  • Creating a QLineEdit search field for items displayed in a QListView

    - by krunk
    I want to create a search field that filters the items shown in a QListView. Basically the user could type in "foo" and only items with "foo" in the DisplayRole are shown. I already have a few ideas on how to do this, but thought I'd ask those more experienced than I. My idea would be to use some signals and slots to set a filter in the QAbstractItem model and trigger an update() in the QListView. Are there any helper methods in QListView for filtering I may have missed? Is there a canonical way of handling this I haven't run across?

    Read the article

  • PHPBB Using Custom Field External

    - by moustafa
    Basically I'm using phpbb as a forum of the main site and for images there are captions and in the Control Panel of the forum I added a custom profile field asking if the user if he/she wants amusing or descriptive captions. The below is something i came up with, but it is horrible, i know, and I'm stuck. The default captions should be descriptive, so if ($user->data['is_registered']){ include_once($phpbb_root_path . 'includes/functions_profile_fields.' . $phpEx); $user->get_profile_fields( $user->data['user_id'] ); $user->profile_fields['pf_captions']; if (pf_captions_value == descriptive) echo "Lassoed, Hogtied, and Captured..."; else { echo "Not your typical $18..."; } } There is also code for connecting to phpbb so ask me if you want it.

    Read the article

  • Retrieving text from password field [python][pyqt4]

    - by Dr. Johnson
    def welcomeStage (self): self.test = QtGui.QLineEdit (self) self.test.move (50, 150) QtCore.QObject.connect (self.test, QtCore.SIGNAL ('returnPressed()'), self.passwordStage) def passwordStage (self): self.email = self.test.text() self.test.clear() self.test.setEchoMode (QtGui.QLineEdit.Password) QtCore.QObject.connect (self.test, QtCore.SIGNAL ('returnPressed()'), self.loginStage) def loginStage (self): self.pwd = self.test.text() print self.pwd if len (self.pwd) < 0: welcomeStage () return Simply put, I am making a login form. The user enters their email, then the text field is cleared and echo mode is set to Password mode. The text() function returns the email fine, but when I call text() after I have changed the echo mode, it returns 0. I've been pouring over the documentation looking for anything regarding the text() function and how it operates when Password mode is on, however I have not found anything. Does anybody know how this is done?

    Read the article

  • CSS :after pseudo element on INPUT field

    - by matra
    Hi, I am trying to use :after CSS pseudo element on INPUT field, but it does not work. If I use it with SPAN, it works OK. <style type="text/css"> .mystyle:after {content:url(smiley.gif);} .mystyle {color:red;} </style> This works (puts the smily after "buu!" and berfore "some more") <span class="mystyle">buuu!</span>a some more This does not work - it only color someValue in red, but there is no smiley. <input class="mystyle" type="text" value="someValue"> What am I doing wrong? should I use another pseudo selector. Note: I can not add SPAN sround my INPUT; because it is being generated by a third party control. Matraj

    Read the article

  • Custom field not showing in Custom Content Type

    - by BeraCim
    Hi all: I created a custom column in a custom content type in a Sharepoint Web manually (e.g. /MySite/MyWeb). I now want to programmatically copy this content type across to another web (e.g. /MySite/MyWeb2). However, upon looping through the custom content type in code, I could only find 2 fields: Content Type and Title (expected: Title and custom column). The custom column was missing. I'm very sure that the content type and field are added at the web level. The custom content type is inherited from Item. When I loop through the web's fields, I can see the custom column, and that was copied to the new web. It is only within the content type that the custom column is not showing up. Any ideas why this is happening? Thanks.

    Read the article

  • IIS reveals internal IP address in content-location field - fix

    - by saille
    Referring: http://support.microsoft.com/kb/q218180/, there is a known issue in IIS4/5/6 whereby it will reveal the internal IP of a web server in the content-location field of the HTTP header. We have IIS 6. I have tried the fix suggested, but it has not worked. The website is configured to send all requests to ASP.NET, and I am wondering if this is why the fix, which addresses IIS configuration, has not worked for us. If this is the case, how would we fix this in ASP.NET? We need to fix this issue in order to pass a security audit.

    Read the article

  • Asp.NET hyperlink to get eval from field in Gridview

    - by MarceloRamires
    I have a gridview, with a template field that has an HyperLink: <asp:TemplateField ItemStyle-Width="12%" HeaderText="VER" HeaderStyle-HorizontalAlign="Center" SortExpression="Ver" ItemStyle-HorizontalAlign="Center"> <ItemTemplate> <asp:HyperLink ID="HyperLink1" NavigateUrl="~/Admin/Teste/Teste.aspx?rac=<%#Eval('idApontamento')%>" runat="server">TEXT</asp:HyperLink> </ItemTemplate> </asp:TemplateField> I am getting The server tag is not well formed. in the HyperLink line. What should I do in order to directly build a querystring in an HyperLink ?

    Read the article

  • Timestamp as int field, query performance

    - by Kirzilla
    Hello, I'm storing timestamp as int field. And on large table it takes too long to get rows inserted at date because I'm using mysql function FROM_UNIXTIME. SELECT * FROM table WHERE FROM_UNIXTIME(timestamp_field, '%Y-%m-%d') = '2010-04-04' Is there any ways to speed this query? Maybe I should use query for rows using timestamp_field >= x AND timestamp_field < y? Thank you I've just tried this query... SELECT * FROM table WHERE timestamp_field >= UNIX_TIMESTAMP('2010-04-14 00:00:00') AND timestamp_field <= UNIX_TIMESTAMP('2010-04-14 23:59:59') but there is no any performance bonuses. :(

    Read the article

  • Django Initial for a ManyToMany Field

    - by gramware
    I have a form that edits an instance of my model. I would like to use the form to pass all the values as hidden with an inital values of username defaulting to the logged in user so that it becomes a subscribe form. The problem is that the normal initial={'field':value} doesn't seem to work for manytomany fields. how do i go about it? my views.py @login_required def event_view(request,eventID): user = UserProfile.objects.get(pk=request.session['_auth_user_id']) event = events.objects.get(eventID = eventID) if request.method == 'POST': form = eventsSusbcribeForm( request.POST,instance=event) if form.is_valid(): form.save() return HttpResponseRedirect('/events/') else: form = eventsSusbcribeForm(instance=event) return render_to_response('event_view.html', {'user':user,'event':event, 'form':form},context_instance = RequestContext( request )) my forms.py class eventsSusbcribeForm(forms.ModelForm): eventposter = forms.ModelChoiceField(queryset=UserProfile.objects.all(), widget=forms.HiddenInput()) details = forms.CharField(widget=forms.Textarea(attrs={'cols':'50', 'rows':'5'}),label='Enter Event Description here') date = forms.DateField(widget=SelectDateWidget()) class Meta: model = events exclude = ('deleted') def __init__(self, *args, **kwargs): super(eventsSusbcribeForm, self).__init__(*args, **kwargs) self.fields['username'].initial = (user.id for user in UserProfile.objects.filter())

    Read the article

  • How to extract a specific input field value from external webpage using Javascript

    - by Tom
    Hi, i get the webpage content from an external website using ajax but now i want a function which extract a specific input field value which is already autofilled. the webpage content is like this: ......... <input name="fullname" id="fullname" size="20" value="David Smith" type="text"> <input name="age" id="age" size="2" value="32" type="text"> <input name="income" id="income" size="20" value="22000$" type="text"> ......... I only want to get the value of fullname, maybe with some javascript regex, or some jQuery dom parser, i know i can do it easily with php but i want it using Javascript or jQuery. Note: this inputs are not hosted in my page, they are just pulled from other website through Ajax. Thanks

    Read the article

  • (My)SQL performance: updating one field vs many unneccesary fields

    - by changokun
    i'm processing a form that has a lot of fields for a user who is editing an existing record. the user may have only changed one field, and i would typically do an update query that sets the values of all the fields, even though most of them don't change. i could do some sort of tracking to see which fields have actually changed, and only update the few that did. is there a performance difference between updating all fields in a record vs only the one that changed? are there other reasons to go with either method? the shotgun method is pretty easy...

    Read the article

  • Compute divergence of vector field using python

    - by nyvltak
    Is there a function that could be used for calculation of the divergence of the vectorial field? (in matlab http://www.mathworks.ch/help/techdoc/ref/divergence.html) I would expect it exists in numpy/scipy but I can not find it using google :(. # I need to calculate div[A * grad(F)], where F = np.array([[1,2,3,4],[5,6,7,8]]) (2D numpy ndarray) A = np.array([[1,2,3,4],[1,2,3,4]]) (2D numpy ndarray) so grad(F) is a set of 2D ndarrays # I know, I can calculate divergence like this: http://en.wikipedia.org/wiki/Divergence#Application_in_Cartesian_coordinates but do not want to reinvent the wheel. (and also I expent there is some optimized function)

    Read the article

  • I have Person.Surname field implemented as a string if I change the implementation of the field to a

    - by AndyM
    This is me going right back to basics with TDD for learning purposes. I originally implemented Person.Surname as field of type object (the simplest possible way of passing the test. I then added a test setting Person.Surname stating that the return value should be a string and set Person.Surname=20. I 'fixed' the test by changing the implementation to use string rather than object. The test now long compiles due to static type checking, so I commented it out. So I'm left with no way of leaving my intention in the test. Is there a way of having a failing test in this circumstance?

    Read the article

  • How do I hide data/field in a List in J2ME

    - by pi
    Hi, I am working on a J2ME app which has dynamically generated Lists. Items on this list may be consequently selected, and the selection processed within the commandAction block. Is there a way to have the IDs of variables populating the List (from a remote database) included in the List item definition as in: this.append("A", null); this.append("B", null); or: String[] arrayOfValues = {"A", "B"}; new List("Menu", List.IMPLICIT, arrayOfValues, null); such that when an item is selected, perhaps A, I can also have its database ID for perhaps further processing. Is it possible to hide a field/data? Thanks.

    Read the article

  • I would like to make a field part of a many to many relationship

    - by jona
    I have the following table called stores id store zip 1 Market 1 01569 2 Market 2 01551 3 Market 3 10468 4 Market 4 10435 Zip code table INSERT INTO `zip_codes` (`restaurants_locations_id`, `zip`, `state`, `latitude`, `longitude`, `city`, `full_state`) VALUES (1, '06001', 'CT', ' 41.789698', ' -72.86431', 'Avon', 'Connecticut'), (2, '06002', 'CT', ' 41.832798', ' -72.72642', 'Bloomfield', 'Connecticut'), (3, '06010', 'CT', ' 41.682249', ' -72.93365', 'Bristol', 'Connecticut'), (4, '06013', 'CT', ' 41.758415', ' -72.94642', 'Burlington', 'Connecticut'), (5, '06016', 'CT', ' 41.909097', ' -72.54393', 'Windsorville', 'Connecticut'), (6, '06018', 'CT', ' 42.023510', ' -73.31103', 'Canaan', 'Connecticut'), (7, '06019', 'CT', ' 41.834247', ' -72.89174', 'Canton', 'Connecticut'), etc.... what I want is to create a table which will connect the zip field in the stores tables where one store will be found in several zicodes... How would that table would look like? Thanks

    Read the article

< Previous Page | 37 38 39 40 41 42 43 44 45 46 47 48  | Next Page >