|
![Picture of Pete Clark Picture of Pete Clark](/graphics/unknown.gif) Pete Clark - 2009-04-09 20:55:40
I am embarrassed to ask a real beginners question - but -
I have read the long html documentation page, and watched a lot of the 4 hour video. But I can't find the answer...
Is this class designed to create a form at "design time", and then the programmer copies the results to a HTML page, which is used in the "live" version?
Or should the class be used in the "live" version?
I see different versions of the same file in the download - for example,
form_auto_complete.php
test_auto_complete.html
test_auto_complete.php
but I can't see why!
Tell me I have missed it in the documents! Or on the Video!!
![Picture of Manuel Lemos Picture of Manuel Lemos](/picture/user/1.jpg) Manuel Lemos - 2009-04-10 03:42:30 - In reply to message 1 from Pete Clark
The form_auto_complete.php script has a plug-in class that extends the main forms class that is in forms.php script.
The purpose of this plug-in is to auto-complete the text type in a text input with a list of possible completion words.
The test_auto_complete.php script is just an example of how to use this plug-in in practice.
The test_auto_complete.html is just a sample output of an HTML page generated by the test_auto_complete.php script, so you can view the in a browser without having to install the PHP scripts in a Web server. You may ignore this file.
The test_mdb2_auto_complete.php, test_metabase_auto_complete.php and test_mysql_auto_complete.php scripts are examples of how to use variants of the auto-complete plug-in to retrieve the possible completion words from a database using different database API (MySQL, Metabase and PEAR-MDB2).
You may want to look into these examples if you want to use the auto-complete feature using a large list of completion words stored in a database, instead of building a static array with all possible completion words.
![Picture of Pete Clark Picture of Pete Clark](/graphics/unknown.gif) Pete Clark - 2009-04-10 07:53:33 - In reply to message 2 from Manuel Lemos
Thanks, Manuel,
You answered the second part of the question very well.
This is where my confusion lies, which made me ask the first part of my question:
>Is this class designed to create a form at "design time", and
>then the programmer copies the results to a HTML page, which
>is used in the "live" version?
>Or should the class be used in the "live" version?
It appears, from the fact that you have a html page (rather than a php page), that the main forms class should be used at "design time" to create a page that will be used in the production version.
>The test_auto_complete.html is just a sample output
>of an HTML page generated by the test_auto_complete.php script
To clarify, I am asking:
Should test_auto_complete.php be used by the programmer, when developing the program, to create test_auto_complete.html? And the programmer should then load test_auto_complete.html to the server?
Or should test_auto_complete.php be loaded up to the server?
![Picture of Manuel Lemos Picture of Manuel Lemos](/picture/user/1.jpg) Manuel Lemos - 2009-04-10 08:31:06 - In reply to message 3 from Pete Clark
As I mentioned above, the test_auto_complete.html is just a sample output of an HTML page generated by the test_auto_complete.php script, so you can view the in a browser without having to install the PHP scripts in a Web server. You may ignore this file.
In case it was not clear, you are supposed to only use the PHP class scripts in your site.
The test_*.php files are just example scripts so you can easily learn how to use the classes in your applications.
The HTML pages in this package were generated by the test_*.php scripts. The HTML pages were only made available within this package so you can open it in the browser and see how it looks like. They have no other use in the development of your sites with these classes.
![Picture of Pete Clark Picture of Pete Clark](/graphics/unknown.gif) Pete Clark - 2009-04-10 09:53:59 - In reply to message 4 from Manuel Lemos
Manuel,
Thank you for your clear and concise explanation.
|