Add text boxes Dyanamically.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Ajinkya
    New Member
    • Nov 2007
    • 21

    Add text boxes Dyanamically.

    Hello Sir,

    I am code for shopping cart . I give facility to admin to add from_quantity to to_quantity of product with their respective Price . in start I give 5-5 text boxes for from_quantity to to_quantity respectively. If admin wants to add more than 5 quantities then I want give link "Add more " to add more 5 layers of text boxes . Now If admin wants also more layers then he click on "Add more" then lyers are increase.Now Sir, I want to do this by Java Script.

    The layer is in form :-
    Product Range : <input type='text' name='from_qty' > to <input type='text' name='to_qty'> = <input type='text' name='price'>

    Help me Sir !

    Ok !

    Bye !

    Take Care !
  • acoder
    Recognized Expert MVP
    • Nov 2006
    • 16032

    #2
    You could use innerHTML or something like:
    [code=javascript]//assuming parentDiv is the container for the text boxes:
    parentDiv.appen dChild(document .createTextNode ("Product Range : "));
    var textbox = document.create Element("input" );
    textbox.type='t ext';
    textbox.name='f rom_qty';
    parentDiv.appen dChild(textbox) ; //and so on...[/code]

    Comment

    • Ajinkya
      New Member
      • Nov 2007
      • 21

      #3
      Thanks Sir,
      I try to implements this java script in my code and inform you for results.
      Ok !
      Bye !

      Comment

      Working...