Wednesday, March 14, 2012

Processing fields in PHP

I noticed that some students are trying to refer to the form fields by their names in the php form processing program. You cannot do that and have to refer to the variables by also mentioning that the system has to get them from the POST flow that you use to post your html m to the server for processing by PHP.
Therefore all names from the html form will look like $_POST["your field name"] and should be addressed in such way (with added prefix $_POST[...]).

Tuesday, March 6, 2012

Ajax in Projects

In week 7 (Ajax) you will learn how to support the ability of various areas on the page to live their own cycles with own small roundtrips to the server. This makes a Web page something very different from what it was seen before.
Week 6 had a goal of allowing you to understand how to manipulate the XML (and HTML) information delivered in various ways (including Ajax - where in week8 the focus will be on the delivery mechanism). JavaScript can analyze and modify documents delivered to the client in all possible ways. This is a good mechanism of adding your interpretations, design, filtering and additional content to the XML and html files that do not have to be delivered as tables but after you get (via DOM/JavaScript) the info - it can be shown in some nice html/css format with additional text. W8 shows how to get those files (XML, HTML) for THE FOLLOWING JavaScript processing - this is a good way of project enhancement of the simplified labs. You can get an XML file from the server and then parse its DOM by JavaScript, get the necessary info out and present it in a nice html/css.

Thursday, March 1, 2012

More on W6 Labs


To summarize what is happening during the labs and how XML DOM works with javascript:
1. Loading XML documents by XMLHttpRequest() or by ActiveXObject("Microsoft.XMLHTTP") with a few supporting operations (that we will learn in detail when we get to Ajax) sends the request to the server and gets the xml file (if you are trying to get an xml file).
2. The main focus of this week is in what you can do with this xml file using JavaScript and XML DOM. Here important to understand that JavaScript works on the client and whatever it does – will not change the original xml file on the server. It changes only the file loaded into RAM for further processing and presentation. Here JavaScript and XML DOM can allow you to modify the received document and change its presentation in any way you want.

W6 XML Labs additional info

I noticed that W3Schools site doesn't clearly state in large print that you should run loadxml() function and all your examples on any web server but NOT ON YOUR LOCAL FILE SYSTEM by just clicking on the html file. For example, you can use Web server from phobos by uploading all necessary files (your html file, xml file, and js file with loadxml()) there and running them from the phobos-based location.