You are here: Re: Continuous Form « PHP Programming Language « IT news, forums, messages
Re: Continuous Form

Posted by www.gerardvignes.com on 08/10/07 14:33

On Aug 10, 5:03 am, Daniel <d_pinea...@hotmail.com> wrote:
> Hello,
>
> Could someone explain/demonstrate how I can create a 'continuous
> form' (similar to access) but in a webpage using php. What I am
> trying to do is have and entry input, if the user enters info then
> make another input available and so on. This way they can enter as
> many items as they need. Then loop through each of their entry and
> perform my action. If there is a proper web term for what I am trying
> to accomplish could you please let me know so I start using the proper
> terminology.
>
> Thank you for the help.
>
> Daniel


Hi Daniel,

I've seen this done using DHTML (JavaScript and DOM). If you support
only the later versions of most major browsers, it should be cross-
browser enough to be viable. If you go all the way back to IE4/NN4,
you will probably run into critical differences between those two
browsers. Pain.

An event (either on a text box, radio button, check box or button)
invokes a JavaScript that adds additional elements to a form.
JavaScript can manimulate the web page (and thus the form) via the
Document Object Model. This is a standard API which allows you to
create additional nodes (div, input, ...).

You could do it with only HTML and PHP, but it would require a round
trip to the server each time the user needs to add another input. That
is a bad thing.

You can also use an Ajax solution to process input back to the server
as it is typed in the browser by the client. This is a fancy version
of the DHTML solution I suggested earlier. This is probably also a bad
approach, since the traffic generated could easily overwhelm a busy
server. A complex and inefficient solution. The worst of both worlds.

I wonder if the Dojo toolkit can handle this problem? I believe it
integrates well with Cake or ZendFramework.

I hope this helps you.

Gerard Vignes

 

Navigation:

[Reply to this 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

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