SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Guru
    Join Date
    May 2012
    Posts
    996
    Mentioned
    0 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,313
    Mentioned
    178 Post(s)
    Tagged
    8 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 Guru
    Join Date
    May 2012
    Posts
    996
    Mentioned
    0 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
  •