Reply to Re: Data Entry Repeat Field

Your name:

Reply:


Posted by Vince Morgan on 12/22/06 08:22

"Jeff North" <jnorthau@yahoo.com.au> wrote in message
news:8l0no2dnum82u70tu519l00hg4ljtpj6rb@4ax.com...
> On Fri, 22 Dec 2006 16:02:55 +1000, in alt.php "Vince Morgan"
> <vinhar@REMOVEoptusnet.com.au>
> <458b74e5$0$23531$afc38c87@news.optusnet.com.au> wrote:
> >| The OP will need these new inputs to be elements of a form when they
are
> >| added.
> >| As a matter of interest, will the above method, or similar, allow
placement
> >| of these new elements at the bottom of the form Moot? I only ask as
I'm not
> >| sure how to do that myself, and will need to know soon enough.
> >| Regards,
> >| Vince Morgan
>
> I got this code from somewhere awhile back so I can't give the proper
> credits.
> ----------------------------------------------------------------------
> <script type="text/javascript">
> //Expand form with a new fields if needed.
> var nfiles = 0;
> function Expand()
> {
> nfiles++;
> if( nfiles < 10 )
> {
> var adh = "<select name='lbAO" + nfiles + "' ID='lbAO" + nfiles +
> "' size='1' id='select'>";
> adh += "<option value='AND'>And</option>";
> adh += ""<option value='OR'>Or</option>";
> adh += "<option value='NOT'>but Not</option>";
> adh += "</select>&nbsp;&nbsp;&nbsp;&nbsp;";
> adh += "<input name='tf" + nfiles + "' id='tf" + nfiles + "'
> type='text' size='30' maxlength='30' value='' />";
> adh += "<br />";
> files.insertAdjacentHTML('BeforeEnd',adh);
> }
> return false;
> }
> </script>
>
> ---html area ----
> <input name="Button" type="button" value="Additional Item"
> onclick="return(Expand());" />
> <div id="files"> </div>
>
> But since this is being returned to php you could substitute
> name='lbAO" + nfiles ... with name='lbAO[]"
> name='tf" + nfiles ... with name='tf[]"
>
> HTH
> ---------------------------------------------------------------
Thank you very much Jeff. Much appreciated.
Vince Morgan

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация