Search Results

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

Page 60/1497 | < Previous Page | 56 57 58 59 60 61 62 63 64 65 66 67  | Next Page >

  • Get ID of the object saved with association

    - by Pravin
    Hi, Here is my scenario: I have three models Subscriber, Subscription, Plan, with has_many :through relationship between Subscriber and Plans. A subscriber can have multiple plans with one active plan. Whenever a subscriber selects a plan I save it using accepts_nested_attributes_for :subscriptions. I get one plan from the form. Now my problem is I want to get the ID of the record created in subscriptions table.

    Read the article

  • Ruby on Rails collection_select display attribute

    - by New2rails
    I'm new to Rails and am working with the collection_select method. I have two fields I'd like to display in my select box: first_name and last_name So far, I can only display one or the other, not both. Here's the code I'm working with: collection_select(:hour,:shopper_id,@shoppers,:id,"last_name") Thank you.

    Read the article

  • Get the value of an attribute Jquery

    - by Abu Hamzah
    i am trying to get EmployeeId withitn the DOM something like this: var o = obj[$(this).attr("EmployeeId")]; but getting undefined when i debug i see the following: $(this)[0].data data "{EmployeeId: 'A42345'}" here is my source code: $.ajax({ type: "POST", url: url, data: "{EmployeeId: '" + id + "'}", contentType: "application/json; charset=utf-8", dataType: "json", success: function (response) { var obj = (typeof response.d) == 'string' ? eval('(' + response.d + ')') : response.d; var o = obj[$(this).attr("EmployeeId")]; //<<<<undefined

    Read the article

  • AJAX ASP.Net Remove URL ID

    - by Ioxp
    The site im working on is an Ajax enabled ASP.net/C# project and i have a URL like this: http://localhost:2531/(S(lfcvqc55wkabpp55o1x4pvq5))/Logon.aspx How do you get rid of the (S(lfcvqc55wkabpp55o1x4pvq5)) portion of the URL? I have a feeling its a web.config parameter however I'm not really sure what you call this part, GUID, Session ID?

    Read the article

  • jQuery function only inside a specific div ID

    - by user412481
    I have the following function that I only want to run inside a specific div with the id of imgWrapper. I have tried a few things with parent but I cannot seem to figure this out. <script type="text/javascript" language="javascript"> $(document).ready( function () { $("img").each(function () { var src = $(this).attr("src"); if (src.substring(0, 1) == "/") $(this).attr("src", "http://serverName.com/" + src.substring(1)) }); } ); </script>

    Read the article

  • Using RE to retrive an ID

    - by chrissygormley
    Hello, I am trying to use RE to match a changing ID and extract it. I am having some bother getting it working. The String is: m = 'Some Text That exists version 1.0.41.476 Fri Jun 4 16:50:56 EDT 2010' The code I have tried so far is: r = re.compile(r'(s*\s*)(\S+)') m = m.match(r) Can anyone help extract this string. Thanks

    Read the article

  • sql - getting the id from a row based on a group by

    - by user85116
    Table A tableAID tableBID grade Table B tableBID name description Table A links to Table b from the tableBID found in both tables. If I want to find the row in Table A, which has the highest grade, for each row in Table B, I would write my query like this: select max(grade) from TableA group by tableBID However, I don't just want the grade, I want the grade plus id of that row.

    Read the article

  • Handling a colon in an element ID in a CSS selector

    - by sblundy
    JSF is setting the ID of an input field to search_form:expression. I need to specify some styling on that element, but that colon looks like the beginning of a pseudo-element to the browser so it gets marked invalid and ignored. Is there anyway to escape the colon or something? input#search_form:expression { ///... }

    Read the article

  • Fancybox - getting html from element based on id?

    - by kastru
    I have the following snippet; $("a.lightbox_image").each(function () { $(this).fancybox({ 'transitionIn': 'elastic', 'transitionOut': 'elastic', 'speedIn': 600, 'speedOut': 200, 'content': $('#lightbox_image_content_'+this.id.replace('lightbox_image_','')).html() }); }); But the above does not get the content from the element referenced to in the content property - what am i doing wrong?

    Read the article

  • jQuery change id!

    - by Kyle Sevenoaks
    I am a jQuery noobie, and have been trying to add a script to change the id of a div onClick. Here is a jsfiddle example. $(function accept() { $("div:scrollwrap").attr('scrollwrap','highlight'); });? Thanks :)

    Read the article

< Previous Page | 56 57 58 59 60 61 62 63 64 65 66 67  | Next Page >