SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Wizard
    Join Date
    May 2012
    Posts
    1,104
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Post submitting form problem

    Hi, I need some help please...i am submitting form via jquery.ajax,and i am creating textbox dynamically in the form.now my problem is i want to get the value of my dynamic text box using classname.

    I tried this but it's not working.

    Code:
    txt = $('.infoclass').val();

    Code:
       $('#txtform').click(function(){
    	   $('.mydiv').append('<input type="text" name="info[]" class="infoclass">');
         });

    Thank yoiu in advance.

  2. #2
    Gre aus'm Pott gold trophysilver trophybronze trophy
    Pullo's Avatar
    Join Date
    Jun 2007
    Location
    Germany
    Posts
    5,938
    Mentioned
    214 Post(s)
    Tagged
    12 Thread(s)
    Hi jemz,

    You should be able to get the value of a dynamically created text element in the normal way.
    Here's a demo.

    The problem must lie elsewhere.
    Can you supply more code?

  3. #3
    SitePoint Wizard
    Join Date
    May 2012
    Posts
    1,104
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Pullo View Post
    Hi jemz,

    You should be able to get the value of a dynamically created text element in the normal way.
    Here's a demo.

    The problem must lie elsewhere.
    Can you supply more code?

    Hi pullo,

    Thank you for this i got it now


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •