Search Results

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

Page 76/496 | < Previous Page | 72 73 74 75 76 77 78 79 80 81 82 83  | Next Page >

  • Convert an HTML form field to a JSON object with inner objects.

    - by Tawani
    Given the following HTML form: <form id="myform"> Company: <input type="text" name="Company" value="ACME, INC."/> First Name: <input type="text" name="Contact.FirstName" value="Daffy"/> Last Name: <input type="text" name="Contact.LastName" value="Duck"/> </form> What is the best way serialize this form in javascript to a JSON object in the format: { Company:"ACME, INC.", Contact:{FirstName:"Daffy", LastName:"Duck"} } Also note that there might be more than 1 "." sign in the field name.

    Read the article

  • is it possible to have an sqlite database in a sqlserver field?

    - by Behrooz
    I think my question seems to be vague. I am trying to save user settings in SQLServer, but the problem can be expressed in this term:"it needs 20 tables with circular dependencies. and i have enough tables to fill 3 database diagrams", so the best way encountered to my brain is to save it as a sqlite database in a field, like this: Index |Name |Data 1 |Behrooz |*sqlite database here* 2 |User1 |*sqlite database here* ... is this way the right way?is it stupid? should i create more tables instead of doing all these? does it increase database fragmention?

    Read the article

  • Is it possible to populate HTML form field data in an iPhone UIWebView using external accessory fram

    - by Jon Smallberries
    I have an iPhone app where I'd like to load a remotely served HTML form into a UIWebView and then populate that form as data becomes available from an external accessory using the "External Accessory Framework." Right now the data is entered by hand. The proposed flow is: Fetch an HTML page containing a form and put it into a UIWebView When data becomes available from the external accessory, populate the form field(s) Submit the form Is it possible to do this by "injecting" data from the external accessory into the UIWebView when all required data has been retrieved from the external accessory? I cannot seem to find any good examples on how to use the external accessory framework to achieve this.

    Read the article

  • How can I create an HTML text field that has scrolling background images before it is clicked?

    - by Jeffrey
    I'm looking to add a textbox on my website that captures a single email address. Behind it, I would like a scrolling (or sliding) images to be a "hint" for what the field should be. Example: http://steamboat.com/ - the "Newsletter sign up" toward the top of the page. I can find plenty of jQuery plugins that provide a plain text "hint". Where should I start looking to add this additional affect. Note: I do not want to add any flash elements on the page.

    Read the article

  • Display a boolean model field in a django form as a radio button rather than the default Checkbox.

    - by Lakshman Prasad
    This is how I went about, to display a Boolean model field in the form as Radio buttons Yes and No. choices = ( (1,'Yes'), (0,'No'), ) class EmailEditForm(forms.ModelForm): #Display radio buttons instead of checkboxes to_send_form = forms.ChoiceField(choices=choices,widget=forms.RadioSelect) class Meta: model = EmailParticipant fields = ('to_send_email','to_send_form') def clean(self): """ A workaround as the cleaned_data seems to contain u'1' and u'0'. There may be a better way. """ self.cleaned_data['to_send_form'] = int(self.cleaned_data['to_send_form']) return self.cleaned_data As you can see in the code above, I need a clean method that converts input string to an integer, which may be unnecessary. Is there a better and/or djangoic way to do this. If so, how? And no, using BooleanField seems to cause a lot more problems. Using that seemed obvious to me; but it isn't. Why is it so.

    Read the article

  • Auto insert date and time in form input field?

    - by Mo Boho
    Using javascript, how can we auto insert the current DATE and TIME into a form input field. I'm building a "Problems" form to keep track of user submitted complaints about a certain service. I'm collecting as much info as possible. I want to save the staff here from having to manually enter the date and time each time they open the form. I have this snippet of code: <input id="date" name="date" value="javascript:document.write(Date()+'.')"/> but it's not working. many thanks for any help.

    Read the article

  • Is it possible to "merge" the values of multiple records into a single field without using a stored

    - by j0rd4n
    A co-worker posed this question to me, and I told them, "No, you'll need to write a sproc for that". But I thought I'd give them a chance and put this out to the community. Essentially, they have a table with keys mapping to multiple values. For a report, they want to aggregate on the key and "mash" all of the values into a single field. Here's a visual: --- ------- Key Value --- ------- 1 A 1 B 1 C 2 X 2 Y The result would be as follows: --- ------- Key Value --- ------- 1 A,B,C 2 X,Y They need this in SQLServer 2005. Again, I think they need to write a stored procedure, but if anyone knows a magic out-of-the-box function that does this, I'd be impressed.

    Read the article

  • Native (non-jqueryui) way to set prompt() input field inline.

    - by Anthony
    I might just be using the wrong keywords on Google, but what I have in mind is: -------------------------------- | What is your mailbox? | | | | [ ]@mail.example.org | | | | [OK] [Cancel] | -------------------------------- The idea being that the input field is followed right behind by the mail server name, to help avoid instances where: If I don't make it follow right behind, the user puts in the whole thing, If I default it to "[email protected]" they delete the server name. In either case, it's not too big a deal, as I will know that if the returned value does have the server, to remove it and if doesn't, I know what server it belongs to, but I think this visual aid will be a better user experience and lower the amount of validation worries I tend to get.

    Read the article

  • How do you get the glyph for a character encoded as '&#333;' from a utf-8 encoded database field usi

    - by AE
    I have a MySQL database table with a collation of 'utf8_general_ci' and the value in the field is: x & #299; bán yá wén (without the spaces). When this is converted (for example by StackOverflow's editor) it looks like this: xī bán yá wén where the second character looks like a lower case i with a bar over the top. In PHP, what function converts the & #299 ; entity into the ī character? I've tried using html_entity_decode($str,ENT_COMPAT,'UTF-8'), however I get characters like the following: yÄ«n wén or zhÅ•ng wén I'm pretty sure there's something I don't understand about the decoding, which is why I'm using the wrong function. Can anyone shed some light on how to get the single character glyph that's represented by the entity & #299 and similar high-number characters above 255? Many thanks, AE

    Read the article

  • jQuery: using select onchange event to fill sibling text field?

    - by gsquare567
    <select onchange="$(self).siblings('input[type=text]').val( $(self).val() ); $(self).siblings('input[type=checkbox]').attr('checked','checked')"> that does not work before the select box, there are these inputs (examples): <input type="text" value="" id="product[14][value]" name="product[14][value]"> <input type="checkbox" value="1" id="product[14][enabled]" name="product[14][enabled]"> after debugging in firebug, i found that it is in fact finding the siblings, and the part that is failing is filling the text field with the select's value: .val( $(self).val() ); what's wrong with it? thanks!

    Read the article

  • Is it possible to remember the filename from a fileupload field and then later launch that file via

    - by Pieter Breed
    I have a HTML file upload field from which I'm reading the file name of the file that the user specifies. The actual contents of the file is never uploaded. At a later stage, is it possible to construct a link using this file name information so that if the user clicks on this link, the original file is launched into a new browser window? If not, what are the reason for disallowing this behaviour? The purpose of such a feature is to store links to documents that are available on a mapped local drive or a network share.

    Read the article

  • Algorithms to trim leading zeroes from a SQL field?

    - by froadie
    I just came across the interesting problem of trying to trim the leading zeroes from a non-numeric field in SQL. (Since it can contain characters, it can't just be converted to a number and then back.) This is what we ended up using: SELECT REPLACE(LTRIM(REPLACE(fieldWithLeadingZeroes,'0',' ')),' ','0') It replaces the zeroes with spaces, left trims it, and then puts the zeroes back in. I thought this was a very clever and interesting way to do it, although not so readable if you've never come across it before. Are there any clearer ways to do this? Any more efficient ways to do this? Or any other ways to do this period? I was intrigued by this problem and would be interested to see any methods of getting around it.

    Read the article

  • mysql: can I do a for-each on a comma separated field?

    - by Tillebeck
    Just ran into a problem I know these integers, $integers: 3,5,15,20 I only want to select the rows from this following table where all comma separated INT's from the field NUMBERS are found. TABLE: number_table Uid Numbers ------------------------ 1 3,5,15 OK, since all of NUMBERS are in $integers 2 5,15,20 OK, since all of NUMBERS are in $integers 3 3,4,5,15 NOT OK, since 4 is not found in $integers 4 2,15,20,25 NOT OK, since 2 and 25 is not found in $integers Is it possible to to a "for-each" on a comma separated string or another way to do this SELECT?

    Read the article

  • Display value of a django form field in a template?

    - by Eran Kampf
    I have a form with an email property. When using {{ form.email }} in case of some validation error, django still renders the previous value in the input tag's value attribute: <input type="text" id="id_email" maxlength="75" class="required" value="[email protected]" name="email"> I want to render the input tag myself (to add some javascript code and an error class in case of an error). For example this is my template instead of {{ form.email }}: <input type="text" autocomplete="on" id="id_email" name="email" class="email {% if form.email.errors %}error{% endif %}"> However this does not display the errorneous value ("[email protected]" in this example) to the user. How do I get the field's value in the template?

    Read the article

  • how can i see the profile field on registration page?

    - by Nitz
    Hey Guys, I have made customized user registration page. and i have made that on theme layer. But now i want to see the the fields which i have made in profile module. as i have written like this for <?php print drupal_render($form['account']['name']); ?> this code will show the user name field. which is default. now i want to see the profile fields which i have created on the profile module. So can any one tell me what i have to write in drupal_render[?]? Thanks in advance. Nitish Panchjanya Corporation

    Read the article

  • Drupal 7: cancel user registration if a wrong field value has been submitted.

    - by Alexander Farber
    Hello, I have a Drupal 7 with 1 field added to registration form - a List with possible values Robot / Male / Female: # select * from field_data_field_gender; entity_type | bundle | deleted | entity_id | revision_id | language | delta | field_gender_value -------------+--------+---------+-----------+-------------+----------+-------+-------------------- user | user | 0 | 6 | 6 | und | 0 | Male user | user | 0 | 5 | 5 | und | 0 | Male user | user | 0 | 7 | 7 | und | 0 | Female user | user | 0 | 1 | 1 | und | 0 | Male The first value Robot is a default value - to prevent SPAM robots from registering at my site. Is there a way to cancel user registration, when a new user submits the registration web form with the default Robot value? (i.e. only Male and Female values are allowed). I've looked at the core Trigger module, but don't see anything suitable there. I've looked at the hook_user_presave and hook_user_insert API docs, but don't see a way there to cancel an ongoing user registration. (I was expecting to do that by returning a special value from those methods...) Thank you! Alex

    Read the article

  • How to send a Timestamp field to Oracle stored proc. from Java despite the DB config?

    - by Alfabravo
    I'm making a request from a java webapp to an Oracle' stored procedure which happens to have a Timestamp IN parameter. In the testing environment, it works sending: SimpleDateFormat dateFormat = new SimpleDateFormat("dd-MMM-yyyy hh:mm:ss a"); input.setTimestampField(dateFormat.format(new Date())); But in the production environment, it raises an exception ORA-01830: date format picture ends before converting entire input string. I know the testing environment should be a replica of the production site, but it is not in my hands to set them properly. And I need to send the Timestamp field despite the way they setup the database. Any ideas? Thanks in advance.

    Read the article

  • What is the best practice for mvc2 confirm password field?

    - by Andrey
    I have asked a similar question recently but getting no answers i am taking a step back with a more broad approach. I am looking to create a confirm password field using asp.net MVC2 that works on the client. All my other client validation is done with MicrosoftMvcValidation.js by just adding the Html.EnableClientValidation(); call. Some of my considerations. Should the confirm password be part of the model object? Using that approach i have created server side validation by creating my own model binder. Are there any projects out there that have done this?

    Read the article

  • custom list field with more than one row(image and text), and can be populated using a vector

    - by Jisson
    In my app I want show a list,and when user click in any list item ,some new items must be added to the same list.Now I use default ListField of bb and a vetcor to add or remove elements to or from it.Now I want the list to hold more than one row(an image and some text), i searched for it I got some good sample but it not suitable for me(http://stackoverflow.com/questions/1872160/how-to-customize-list-field-in-blackberry). I need a custom listfield which have atleast two rows and can be populated using a vector from the MainScreen class.I want only one object of custom class.If any one have idea please help.

    Read the article

  • MSSQL STOREDPROC SELECTING FROM A FIELD FROM 1 TABLE USING LIKE TO CREATE MORE THAN 1 COLUM IN A DAT

    - by djshortbus
    I have a ASPX.NET DataGrid and im trying to USE a select LIKE 'X'% from a table that has 1 field called location. im trying to display the locations that start with a certain letter (example wxxx,axxx,fxxx,) in different columns in my data grid. SELECT DISTINCT LM.LOCATION AS '0 LOCATIONS' , LM.COUNTLEVEL AS 'COUNTLEVEL' FROM SOH S WITH(NOLOCK) JOIN LOCATIONMASTER LM ON LM.LMID = S.LMID WHERE LM.COUNTLEVEL = 1 AND LM.LOCATION NOT IN ('RECOU','PROBLEM','TOSTOCK','PYXVLOC') AND LM.LOCATION LIKE '0%' SELECT DISTINCT LM.LOCATION AS 'A LOCATIONS' , LM.COUNTLEVEL AS 'COUNTLEVEL' FROM SOH S WITH(NOLOCK) JOIN LOCATIONMASTER LM ON LM.LMID = S.LMID WHERE LM.COUNTLEVEL = 1 AND LM.LOCATION NOT IN ('RECOU','PROBLEM','TOSTOCK','PYXVLOC') AND LM.LOCATION LIKE 'A%'

    Read the article

  • C++: warning: '...' declared with greater visibility than the type of its field '...::<anonymous>'

    - by Albert
    I'm getting these two warnings (with GCC 4.2 on MacOSX): /Users/az/Programmierung/openlierox/build/Xcode/../../src/main.cpp:154:0 /Users/az/Programmierung/openlierox/build/Xcode/../../src/main.cpp:154: warning: 'startMainLockDetector()::MainLockDetector' declared with greater visibility than the type of its field 'startMainLockDetector()::MainLockDetector::<anonymous' /Users/az/Programmierung/openlierox/build/Xcode/../../src/main.cpp:154:0 /Users/az/Programmierung/openlierox/build/Xcode/../../src/main.cpp:154: warning: 'startMainLockDetector()::MainLockDetector' declared with greater visibility than its base 'Action' In this code: struct Action { virtual ~Action() {} virtual int handle() = 0; }; static void startMainLockDetector() { /* ... */ struct MainLockDetector : Action { bool wait(Uint32 time) { /* ... */ } int handle() { /* ... */ } }; /* ... */ } I'm not exactly sure what these warnings mean (what visibility?) and how to fix them. (I really want the class MainLockDetector to be local for that function only.) I have already compiled the same code with a lot of other compilers (clang, GCC 3.*, GCC 4.0, GCC 4.4, etc) and never got any warning for this code.

    Read the article

  • How can I serialize the values of checked checkboxes in an iFrame into a hidden form field on clicki

    - by Frank Bailey
    I have an iFrame like so: <iframe width="100%" frameborder="0" height="470" allowtransparency="true" name="productframe" id="productframe" style="border-bottom:1px solid #eee"></iframe> The iframe contains several line items drawn from a sql server db, and I can check any of the checkboxes I want to perform a task with - in this case delete them. I have a button in the parent document that says "Delete selected", and I'd like to be able to click this button and populate a hidden field in my parent page with the values of the selected checkboxes in the child iframe. My checkboxes look like this: <input id="Checkbox1" type="checkbox" value="47" title="Select this row" name="selectItem"/> I have an instance of jquery on my parent page so I can make use of jquery selectors, I just have no clue as to the syntax needed to do this. Thanks in advance to anyone who can help me on this.

    Read the article

  • How to replace the nth column/field in a comma-separated string using sed/awk?

    - by Peter Meier
    assume I have a string "1,2,3,4" Now I want to replace, e.g. the 3rd field of the string by some different value. "1,2,NEW,4" I managed to do this with the following command: echo "1,2,3,4" | awk -F, -v OFS=, '{$3="NEW"; print }' Now the index for the column to be replaced should be passed as a variable. So in this case index=3 How can I pass this to awk? Because this won't work: echo "1,2,3,4" | awk -F, -v OFS=, '{$index="NEW"; print }' echo "1,2,3,4" | awk -F, -v OFS=, '{$($index)="NEW"; print }' echo "1,2,3,4" | awk -F, -v OFS=, '{\$$index="NEW"; print }' Thanks for your help!

    Read the article

  • Show extra info for Preference screens when CheckboxPreference summary field is not enough long?

    - by Pentium10
    I have situation when you can enabled/disable modules for my Android application. For this I use a CheckboxPreference screen. This is all good, but the summary field gets cut off if longer descriptions are added than 2 lines. Suppose I have 4-5 lines of description available for each module, I would like to display this in a helper window. I tried to bind a click event to the CheckboxPreference, but that fires for the whole line, so not only when the checkbox is clicked, and more, where ever you click on the line the checkbox is toggled. So now I am wondering if this can be fixed. So if the user needs more info, just taps the text and the helper opens up, and if want to toggle the settings it taps the checkbox. How would you do it? I am open to other ideas too, if they do work.

    Read the article

< Previous Page | 72 73 74 75 76 77 78 79 80 81 82 83  | Next Page >