|
|
| index | search | post | contact | |
|
Progressive Enhancement exampleIntro | Step 1: The universal form | Step 2 | Step 3 Back in the day of the static DOM, you'd have written the UI so that clicking the "edit" link sent you to another page, where the user fills in the form and submits it to another page. (When was that day? Depending on who you talk to, it ended in the early 90's with ECMAscript, or in 2005 when "Ajax" became a buzzword, or somewhere in between. That's not the point.)
Billy Ray was a
preacher's son
We can still write it that way. The form above is pure form submission 101, and is rendered with the following code:
<div id="view" class="data" style="display:block">
Billy Ray was a
<a href="staticForm.php"
id="link">preacher's son</a>
</div>
[the following markup is in the staticForm.php file]
<form action="progressive_enhancement_tutorial.php">
<span>Billy Ray was a </span>
<input type="text" name="billyray" value="preacher's son" />
<input type="submit"
value="Save changes" />
<a href="progressive_enhancement_tutorial.php">Return without changing</a>
</form>
< Introduction | Step 2: The Javascript handler >
|
|||||||||||||||||||||||||||||||||