Using of ColdFusion to create dynamic WAP pages is much easier than using other languages like PHP, ASP or JSP (a very hard one!). In fact, ColdFusion is a very good for one new to the WAP world to learn how to create dynamic WAP pages because it is very easy to learn. Before we begin, keep these things in mind:
- You should have experience with HTML, the Web, ColdFusion and WML.
- We recommend that you use ColdFusion 4.5 Pro or ColdFusion 5 Pro. Note that we do not recommend that you use ColdFusion MX to start with. The reason is very simple - ColdFusion MX is harder to control. But if you are confidant that you can use the MX version, then you should use it.
- You need a WAP browser and a text editor. Your choice of WAP browser depends on your experience, but we recommend that you use the NOKIA WAP TOOL KIT, ERICSSON WAP TOOL KIT or the easy-to-use WIN WAP Pro. You'll also need a text editor, and our recommendation is to use Notepad, or ColdFusion editors like ColdFusion Studio MX, DreamWeaver MX or HomeSite +.
- In this article we assume that you are using Windows 98, PWS, ColdFusion 5 Pro and Notepad.
- You can download ColdFusion 5, NOKIA WAP Tool Kit, ERICSSON WAP Tool Kit and WIN WAP from the following sites: http://www.allaire.com http://www.nokia.com http://www.ericsson.com http://www.winwap.com
If you don't see preview as shown above in your WAP browser, make sure that:
- Your web server and ColdFusion server are RUNNING.
- You typed the address CORRECTLY in WAP browser's address bar.
- You typed all the given code CORRECTLY in the file.
- Your web server and ColdFusion servers are ATTACHEDcorrectly.
- When you use <CFSET>, all rules of variable naming should obey usual naming conventions (variable names can't start with number, etc.)
- The ending tag </CFOUTPUT> of <CFOUTPUT> is necessary.
- To print a variable's value, the variable must appear between <CFOUTPUT> and </CFOUTPUT> with start and ending # (pound) signs, or else an error will occur.
Next
Now it's time to make a guestbook with our WAP pages. You know that guestbook is very important in a Web/WAP site. If you can make a guestbook, you can also make an order form.
Save given file as wmlform.wml in your server's root directory:
-==-
Now we should make a more ColdFusion template, which will process submitted information.
This code will create file called "user_comments.txt" in your WEB Server's root directory. This file will have all submitted Comment.
-==-
You can find comments in user_commets.txt file in you Root Directory.
Note: This code is very simple don't try this is at commercial web/WAP site.
For more information please feel free to contact me any time.
Written by Amnat Ali Goher. Send your comments to yadish_sahar@hotmail.com.
No comments yet. Be the first to comment!