Professional Web Applications Themes

dynamically creating a input box, can this be done? - PHP Development

hello everyone, Im going to try to simplify my problem as much as i can: Lets say I have a single form element (an input box). and a button next to it. I would like this button when pressed to create a second input box and second button right below that one (exactly the same button and input box). Then if i were to press that second button, a third row of input box and button would be created below, and so on and so on. Can any one shed some light for me how i would go about doing ...

  1. #1

    Default dynamically creating a input box, can this be done?

    hello everyone,

    Im going to try to simplify my problem as much as i can:

    Lets say I have a single form element (an input box).
    and a button next to it. I would like this button when pressed to create a
    second input box and second button right below that one (exactly the same
    button and input box). Then if i were to press that second button, a third
    row of input box and button would be created below, and so on and so on.

    Can any one shed some light for me how i would go about doing this?

    Thanks.


    jj Guest

  2. #2

    Default Re: dynamically creating a input box, can this be done?

    En las nuevas, el jj escribió: 

    This is Javascript, not PHP.

    Please check out Javascript-related sites and focus on DOM (Doent Object
    Model) functions. Yes. It can be done.

    This is a good place to start:
    http://www.w3schools.com/js/js_obj_htmldom.asp


    countach Guest

  3. #3

    Default Re: dynamically creating a input box, can this be done?

    I noticed that Message-ID: <net> from countach
    contained the following:
     
    >
    >This is Javascript, not PHP.[/ref]
    Well you could do it with PHP, but I'd like to know more details of the
    problem.

    --
    Geoff Berrow 0110001001101100010000000110
    001101101011011001000110111101100111001011
    100110001101101111001011100111010101101011
    Geoff Guest

  4. #4

    Default Re: dynamically creating a input box, can this be done?

    Geoff Berrow wrote: 
    >>
    >> This is Javascript, not PHP.[/ref]
    > Well you could do it with PHP, but I'd like to know more details of
    > the problem.[/ref]

    To do it by posting back with each item entered, you could use PHP. To do it
    without posting to the server would require Javascript.

    Of course, it wouldn't work for those with Javascript turned off.

    Another resource to try is comp.lang.javascript

    --
    Tony Garcia
    Web Right! Development
    Riverside, CA
    www.WebRightDevelopment.com


    Tony Guest

  5. #5

    Default Re: dynamically creating a input box, can this be done?

    Sure you can. First button posts with a hidden value "1" then it reads off
    and adds to the value and outputs as many boxes as the amount of value
    dictates. So, there will be next page generated with 2 boxes and hidden
    value of 2 (or you can do session, whatever).

    "jj" <com> wrote in message
    news:vktBe.5779$bellglobal.com... 


    Hello Guest

  6. #6

    Default Re: dynamically creating a input box, can this be done?

    On 2005-07-14, Geoff Berrow <co.uk> wrote: 
    >>
    >>This is Javascript, not PHP.[/ref]
    > Well you could do it with PHP, but I'd like to know more details of the
    > problem.[/ref]

    You couldn't do it *dynamically* with php
    richard Guest

Similar Threads

  1. Dynamically creating CSS
    By Nathan Sokalski in forum ASP.NET Building Controls
    Replies: 1
    Last Post: October 8th, 04:58 AM
  2. Replies: 20
    Last Post: September 11th, 08:54 AM
  3. Dynamically formatting text for input
    By FunkyJunk in forum Macromedia Director Lingo
    Replies: 2
    Last Post: January 23rd, 04:40 PM
  4. Creating Fields Dynamically
    By Steven P. webforumsuser@macromedia.com in forum Macromedia Director Lingo
    Replies: 1
    Last Post: September 24th, 11:06 AM
  5. Creation of input fields dynamically
    By Bob Barrows in forum ASP
    Replies: 1
    Last Post: August 22nd, 01:12 AM

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
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139