Results 1 to 3 of 3

Thread: Urgent!!! PHP: text input field auto creation

  1. #1
    Join Date
    May 2003

    Urgent!!! PHP: text input field auto creation

    Can anyone tell me how to create a new text field upon entering another field?

    Such that when i enter something into the 1st input text field, e 2nd one is created automatically within the same page without page refreshing??

    Is it possible anyway??

    Kinda urgent here, pls help!!!

  2. #2
    Join Date
    Dec 2002
    High on life
    PHP is server side, and thus the page must be refreshed to affect a change. But, you can do this with javascript, if that is a possibility. Take a look at this sample code:

    <script language="javascript" type="text/javascript">
    function showField() {
    	if (document.myform.text01.value != "") {
    		document.myform.text02.style.display = "block";
    <form name="myform">
    <input type="text" name="text01" onkeyup="showField();">
    <input type="text" name="text02" style="display:none">

    Personal website http://www.ryanbrill.com/
    Business website: http://www.infinitywebdesign.com/
    TypeSpace http://www.typespace.org/

    I reject your reality and substitute it with my own!

  3. #3
    Join Date
    May 2003
    your code was helpful but how can i create the fields endlessly and in an array form like in PHP??:

    something like this :<input type=text name=elect[]>

    where all inputs are kept in an array and at the same time i wish to put it in a table display??

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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