Search Results

Search found 3437 results on 138 pages for 'append'.

Page 7/138 | < Previous Page | 3 4 5 6 7 8 9 10 11 12 13 14  | Next Page >

  • Django | how to append form field to the urlconf

    - by MMRUser
    I want to pass a form's field value to the next page (template) after user submit the page, the field could be user name, consider the following setup def form_submit(request): if request.method == 'POST': form = UsersForm(request.POST) if form.is_valid(): cd = form.cleaned_data try: newUser = form.save() return HttpResponseRedirect('/mysite/nextpage/') except Exception, ex: return HttpResponse("Ane apoi %s" % str(ex)) else: return HttpResponse('Error') "nextpage" is the template that renders after user submit the form, so I want to know how to append the form's field (user name) to the url and get that value from the view in order to pass it to the next page.. thanks.

    Read the article

  • Append INPUT to TEXTAREA as being types in JQuery

    - by Ricky
    I have an INPUT text box. As someone types into the INPUT text box, i need it to append/add-to a TEXTAREA value. Lets say user types '12345' into the text box. The textarea (default value="Comment: ") will automatically add: 'Comment: 12345'. Adding '12345' as they type.

    Read the article

  • Append or modify keys in conf files using sed/bash one-liner

    - by Jeff
    I often have to modify files such as sysctl.conf, and I'm familiar with using sed to replace existing values. Is there a way to append the new key/value pair to the file if sed wasn't able to replace it? For instance, using this example: modify config file using bash script sed -c -i "s/\($TARGET_KEY *= *\).*/\1$REPLACEMENT_VALUE/" $CONFIG_FILE How could I add the $TARGET_KEY = $REPLACEMENT_VALUE new line to $CONFIG_FILE using the same sed expression with slight changes? And on a related topic, how can I force creation of $CONFIG_FILE if it didn't exist?

    Read the article

  • how to use append function in file

    - by sadia
    I want to write in a file but in a way that it should not delete existing data in that file rather it should append that file. Can anybody please help by giving any example related to appending a file? Thank you

    Read the article

  • Add login / logout to drupal menu that's not a primary or secondary menu

    - by user367766
    Hello, Im trying to append an item to a menu that I created. I know its get the primary and secondary menus using "menu_secondary_local_tasks()" etc, and then add items within preprocess page. How would I go about this with a menu that I created? Here is the code I am using to check is the user is logged in... function themeName_check_login() { global $user; if ($user->uid) { print l("Log out, " . $user->name,"logout"); } else { print l("Log In ","user"); } } Thanks in advance, -Matt

    Read the article

  • Add entry to list and remove first one in Python

    - by wagglewax
    I have a list of about 40 entries. And I frequently want to append an item to the start of the list (with id 0) and want to delete the last entry (with id 40) of the list. how do i do this the best? like: (example with 5 entries) [0] = "herp" [1] = "derp" [2] = "blah" [3] = "what" [4] = "da..." after adding "wuggah" and deleting last it should be like: [0] = "wuggah" [1] = "herp" [2] = "derp" [3] = "blah" [4] = "what" or appending one and deleting first. And I don't want to end up manually moving them one after another all of the entries to the next id.

    Read the article

  • When a li is appended, does it not become a part of the ul "for real"?

    - by Noor
    I have right now this code: <ul><li class="listitem">text<li></ul> jQuery: $('.listitem').click(function() { $("#elname").text($(this).text()); $('#slists').css('visibility','hidden') $('#elname').css('visibility','visible') $('#elname').css('display','inline-block') }); This is supposed to hide a div and it does, but when I append items to the ul (with the class listitem) nothing happens with the appended item, the class it gets is correct, the title, and the value too. Can this have something to do with the code above being in the document ready function to do?

    Read the article

  • Replacing the end of the line by SED in makefile

    - by Masi
    How can you append to the end of a line by SED controlled by makefile? I run paste -d" " t.tex tE.tex | sed 's@$@XXX@' > tM.tex where the problem is in the use of the mark $ for the end of the line. I get #paste -d" " t.tex tE.tex | sed -e s/" "/\\\&/g | sed -r "s/XXX/" > tM.tex sed: -e expression #1, char 10: unterminated `s' command make: *** [all] Error 1 I have the command just after the "all:" tag in my makefile which contains only the two lines. The parameters -n and -e do not help here. The command works as expected run when it is run directly in terminal.

    Read the article

  • How to add a list-item at specific position

    - by Germanico Brismal
    Hi, I'd like to add a <li> at a specific position, for example: <ul id="list"> <li>Position 1</li> <li>Position 2</li> <li>Position 4</li> <ul> Let's say that I want to add a new <li> below/after <li>Position 2</li>, how can I do it using jQuery? I've tried to do it using the code below: $('#list li:eq(1)').append('<li>Position 3</li>'); But, it didn't work, because it appends the <li> inside the <li>Position 2</li>, instead add the <li> below/after the <li>Position 2</li>. Can someone give me some help? Thank you.

    Read the article

  • jquery remove selected element and append to another

    - by KnockKnockWhosThere
    I'm trying to re-append a "removed option" to the appropriate select option menu. I have three select boxes: "Categories", "Variables", and "Target". "Categories" is a chained select, so when the user selects an option from it, the "Variables" select box is populated with options specific to the selected categories option. When the user chooses an option from the "Variables" select box, it's appended to the "Target" select box. I have a "remove selected" feature so that if a user "removes" a selected element from the "Target" select box, it's removed from "Target" and put back into the pool of "Variables" options. The problem I'm having is that it appends the option to the "Variables" items indiscriminately. That is, if the selected category is "Age" the "Variables" options all have a class of "age". But, if the removed option is an "income" item, it will display in the "Age Variables" option list. Here's the HTML markup: <select multiple="" id="categories" name="categories[]"> <option class="category" value="income">income</option> <option class="category" value="gender">gender</option> <option class="category" value="age">age</option> </select> <select multiple="multiple" id="variables" name="variables[]"> <option class="income" value="10">$90,000 - $99,999</option> <option class="income" value="11">$100,000 - $124,999</option> <option class="income" value="12">$125,000 - $149,999</option> <option class="income" value="13">Greater than $149,999</option> <option class="gender" value="14">Male</option> <option class="gender" value="15">Female</option> <option class="gender" value="16">Ungendered</option> <option class="age" value="17">Ages 18-24</option> <option class="age" value="18">Ages 25-34</option> <option class="age" value="19">Ages 35-44</option> </select> <select height="60" multiple="multiple" id="target" name="target[]"> </select> And, here's the js: /* This determines what options are display in the "Variables" select box */ var cat = $('#categories'); var el = $('#variables'); $('#categories option').click(function() { var class = $(this).val(); $('#variables option').each(function() { if($(this).hasClass(class)) { $(this).show(); } else { $(this).hide(); } }); }); /* This adds the option to the target select box if the user clicks "add" */ $('#add').click(function() { return !$('#variables option:selected').appendTo('#target'); }); /* This is the remove function in its current form, but doesn't append correctly */ $('#remove').click(function() { $('#target option:selected').each(function() { var class = $(this).attr('class'); if($('#variables option').hasClass(class)) { $(this).appendTo('#variables'); sortList('variables'); } }); });

    Read the article

  • jQuery autocomplete for dynamically created inputs

    - by Jamatu
    Hi all! I'm having an issue using jQuery autocomplete with dynamically created inputs (again created with jQuery). I can't get autocomplete to bind to the new inputs. Autocomplete $("#description").autocomplete({ source: function(request, response) { $.ajax({ url: "../../works_search", dataType: "json", type: "post", data: { maxRows: 15, term: request.term }, success: function(data) { response($.map(data.works, function(item) { return { label: item.description, value: item.description } })) } }) }, minLength: 2, }); New table row with inputs var i = 1; var $table = $("#works"); var $tableBody = $("tbody",$table); $('a#add').click(function() { var newtr = $('<tr class="jobs"><td><input type="text" name="item[' + i + '][quantity]" /></td><td><input type="text" id="description" name="item[' + i + '][works_description]" /></td></tr>'); $tableBody.append(newtr); i++; }); I'm aware that the problem is due to the content being created after the page has been loaded but I can't figure out how to get around it. I've read several related questions and come across the jQuery live method but I'm still in a jam! Any advice?

    Read the article

  • adding a div with data()

    - by Dizzy Bryan High
    Hi people am generating a list of flash swfs, the information comes from an ajax call which returns a json object which i loop through to create the rows of data using my makeAppRow function. makeAppRow = function(myData){ var myStr = '<div class="fileEntry">' myStr = myStr +'<div class="appDate">'+dateFormat(myData.date_swf, "dS mmmm, yyyy, h:MM TT")+'</div>' myStr = myStr +'<div class="appName">'+myData.name_swf+'</div>' myStr = myStr +'<div class="appOptions" data>' myStr = myStr +'<div class="gotoAppBtn" data-options="'+myData+'">Open App</div>' myStr = myStr +'</div>' myStr = myStr +'</div>' $('#appData').append(myStr); } I need the json data to be attached to the gotoAppBtn so that when its clicked i can read in the data from the attached json object and use it in my click function, as you can see ive been trying to embed the data using the html5 data but i cant get it to work. <div class="gotoAppBtn" data-options="'+myData+'">Open App</div> i have a function so that when the button is clicked it loads in an swf. $('.gotoAppBtn').live('click', function(){ //alert('button clicked') var myData = $(this).data("options") alert('../userfiles/'+myData.id_ugp+'/'+myData.id_swf+'/'+myData.launchfile_swf+'') console.log(myData); var flashvars = {}; var params = {}; params.menu = "false"; params.quality = "best"; params.scale = "noscale"; var attributes = {}; attributes.id = "flashAppDisplay"; attributes.name = "flashAppDisplay"; swfobject.embedSWF( '../userfiles/'+myData.id_ugp+'/'+myData.id_swf+'/'+myData.launchfile_swf+'', 'flashAppDisplay', myData.width_swf, myData.height_swf, myData.version_swf ,"../FAVideo/expressInstall.swf", flashvars, params, attributes) }); but the data does not seem to be there, any pointers on where i am going wrong, or a better way to achive this???

    Read the article

  • mysql select update

    - by Tillebeck
    Hi I have read quite a few selcet+update questions in here but cannot understand how to do it. So will have to ask from the beginning. I would like to update a table based on data in another table. Setup is like this: - TABLE a ( int ; string ) ID WORD 1 banana 2 orange 3 apple - TABLE b ( "comma separated" string ; string ) WORDS TEXTAREA 0 banana -> 0,1 0 orange apple apple -> BEST:0,2,3 ELSE 0,2,3,3 0 banana orange apple -> 0,1,2,3 Now I would like to for each word in TABLE a append ",a.ID" to b.WORDS like: SELECT id, word FROM a (for each) -> UPDATE b SET words = CONCAT(words, ',', a.id) WHERE b.textarea like %a.word% Or even better: replace the word found in b.textarea with ",a.id" so it is the b.textarea that ends up beeing a comma separeted string of id's... But I do not know if that is possible.

    Read the article

  • navigation li to create <span></span> around text via jquery

    - by MikesEpitaphSays
    I've been trying all day and reading a few things, but for some reason my code isn't working right What i'm trying to achieve is this: When i create an un ordered list in my index page - I want my jquery to automatically add around the text in the anchor. So i want it to look like this <li><a href="index.htm"><span>Home</span></a></li> while I am only adding: <li><a href="index.htm">Home</a></li> I want to do this because i have a LOT of list items and instead of writing when i'm adding pages it makes the most sense to save some time in the long run and create a loop that will handle that anytime i add one. This is What i have so far (sorry if it looks ugly): $('document').ready(function () { var begSpan = "<span>"; var endSpan = "</span>"; $('p').each(function () { $(this) prepend(begSpan); }).append(endSpan); }); How can i get that to auto create span tags for me

    Read the article

  • My MS Access control displays no text for appended items following an append query

    - by Zaid
    The control in question is part of a datasheet-style subform that feeds off a multi-field combo-box. The control is bound to the first field of the combo box, an ID field which is hidden from view (column width set to zero). Consequently, the second field (Code) is displayed in the control when an item is selected from the combo box. I'm using a form button action to append values to this datasheet. It seems that because I need to INSERT ID values in, the control is unable to display the corresponding Code value. Nothing is visible, unless I go manually into the combo box and select an item from it. How can I get the control to display the Code value?

    Read the article

  • XML: to append xml document into the node of another document

    - by Bibhaw
    Hi all, I have to insert file1.xml elements into another file2.xml. file2.xml has several node and each node has it's node_id. is there any way to do that. let suppose : file1.xml : <root> <node_1> ......</node_1> </root> file2.xml : <root> <node> <node_id>1</node_id> </node> </root> I want ? file2.xml : <root> <node> <node_1>......</node_1> [here i want to append the file1.xml] </node> </root>

    Read the article

  • Append message to JBoss Console using jboss-log4j.xml

    - by Random Joe
    I'm unable to append messages from my application to the JBoss console. The following are the changes that I made to the jboss-log4j.xml configuration file: <category name="com.tricubes"> <priority value="INFO"/> <appender-ref ref="CONSOLE"/> </category> Here is my code: public class OneToOneValidation2 { private static final Logger logger = Logger.getLogger("com.tricubes"); public boolean validate(byte[] fpImage, byte[] fpTemplate, String desc, String ticket) { ... logger.info("BES INFO: SOCKET MSG SENT " + intToByteArray(x)); ... return b; } } What am I missing? TIA!

    Read the article

  • Can't append to array using string field name [$] when performing update on array fields

    - by Haraldo
    rowsI am attempting to perform a mongodb update on each field in an array of records. An example schema is below: { "_id" : ObjectId("508710f16dc636ec07000022"), "summary" : "", "uid" : "ABCDEF", "username" : "bigcheese", "name" : "Name of this document", "status_id" : 0, "rows" : [ { "score" : 12, "status_id" : 0, "uid" : 1 }, { "score" : 51, "status_id" : 0, "uid" : 2 } ] } So far I have been able to perform single updates like this: db.mycollection.update({"uid":"ABCDEF","rows.uid":1}, {$set:{"rows.$.status_id":1}},false,false) However, I am struggling as to how to perform an update that will update all array records to a status_id of 1 (for instance). Below is how I imagine it should work: db.mycollection.update({"uid":"ABCDEF"}, {$set:{"rows.$.status_id":1}},false,true) However I get the error: can't append to array using string field name [$] I have tried for quite a while with no luck. Any pointers?

    Read the article

  • Access Validation Rule Violations on Append Query

    - by Jacques Tardie
    I'm recieving the following error on trying to run an append query in access. Microsoft Office Access set .... and it didnt't add... 779280 records(s) due to validation rule violations. If I choose to run the query anyways, nothing actually happens. To give some context, I'm simply trying to copy a populated field, consisting of values similar to "16-2009-02, 34-2010-02, et cetera" to another currently unpopulated field. The fields themselves have no set validation rules, and both have the standard text field options. I'm hoping to be able to simply remove those hyphens, and fix the issue. But I guess that's what I'm not sure about, are those hyphens actually a problem? Running SP3 w/ Access 2003. Thanks in advance!

    Read the article

  • How to append html to first occurance of string after selected element

    - by uku
    Hello, I have html like so: <div class=foo> (<a href=forum.example.com>forum</a>) <p> Some html here.... </div> And I want to insert another link after the first one, like so: <div class=foo> (<a href=forum.example.com>forum</a>) <a href=blog.example.com>blog</a> <p> Some html here.... </div> ...but because it is enclosed in () I cannot use: $('div.foo a:first').append(' <a href=blog.example.com>blog</a>'); ...which would place it before the ). So how can I extend my jQuery selection to select the literal ) or do I need to use another solution?

    Read the article

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