<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-GB">
	<id>https://ps.wdka.nl/wiki/index.php?action=history&amp;feed=atom&amp;title=Courses%2FDesign_%26_Technique-Essential_Web_Design%2FQ2%2FExample%2FForm</id>
	<title>Courses/Design &amp; Technique-Essential Web Design/Q2/Example/Form - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://ps.wdka.nl/wiki/index.php?action=history&amp;feed=atom&amp;title=Courses%2FDesign_%26_Technique-Essential_Web_Design%2FQ2%2FExample%2FForm"/>
	<link rel="alternate" type="text/html" href="https://ps.wdka.nl/wiki/index.php?title=Courses/Design_%26_Technique-Essential_Web_Design/Q2/Example/Form&amp;action=history"/>
	<updated>2026-04-03T19:18:54Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.45.1</generator>
	<entry>
		<id>https://ps.wdka.nl/wiki/index.php?title=Courses/Design_%26_Technique-Essential_Web_Design/Q2/Example/Form&amp;diff=2535&amp;oldid=prev</id>
		<title>Andre: Created page with &quot;Receive user text input in a form input. Use it in the variable firstName  Example: http://publicationstation.wdka.hro.nl/go-student/examples/user-txt-input.html  Code: &lt;sourc...&quot;</title>
		<link rel="alternate" type="text/html" href="https://ps.wdka.nl/wiki/index.php?title=Courses/Design_%26_Technique-Essential_Web_Design/Q2/Example/Form&amp;diff=2535&amp;oldid=prev"/>
		<updated>2015-12-08T11:02:43Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;Receive user text input in a form input. Use it in the variable firstName  Example: http://publicationstation.wdka.hro.nl/go-student/examples/user-txt-input.html  Code: &amp;lt;sourc...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;Receive user text input in a form input. Use it in the variable firstName&lt;br /&gt;
&lt;br /&gt;
Example: http://publicationstation.wdka.hro.nl/go-student/examples/user-txt-input.html&lt;br /&gt;
&lt;br /&gt;
Code:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;html4strict&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;!DOCTYPE html&amp;gt;&lt;br /&gt;
&amp;lt;html&amp;gt;&amp;lt;head&amp;gt;&lt;br /&gt;
&amp;lt;meta http-equiv=&amp;quot;content-type&amp;quot; content=&amp;quot;text/html&amp;quot; charset=&amp;quot;utf-8&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;script src=&amp;quot;http://code.jquery.com/jquery-1.11.3.min.js&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;
&amp;lt;style&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
form{width: 50%;}&lt;br /&gt;
input{padding: 6px; width:50%; border: 2px solid #ccc; margin-top: 1em; color: #000;}&lt;br /&gt;
input:focus{border: 2px solid yellow;  background-color: rgba(0, 0, 0, 0.75); color: white; font-weight: bold;}&lt;br /&gt;
input[type=&amp;quot;submit&amp;quot;]{font-weight: bold; width: auto;  }&lt;br /&gt;
input[type=&amp;quot;submit&amp;quot;]:focus{ color: yellow; background-color: rgba(0, 0, 0, 0.75);}&lt;br /&gt;
#instruction{display: none; }&lt;br /&gt;
&amp;lt;/style&amp;gt;&lt;br /&gt;
&amp;lt;/head&amp;gt;&lt;br /&gt;
&amp;lt;body&amp;gt;&lt;br /&gt;
&amp;lt;h1 id=&amp;quot;question&amp;quot;&amp;gt;Tell me you name...&amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;form id=&amp;quot;greeting&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;input name=&amp;quot;firstName&amp;quot; id=&amp;quot;firstName&amp;quot; required=&amp;quot;&amp;quot; placeholder=&amp;quot;Your first name&amp;quot; type=&amp;quot;text&amp;quot;&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
  &amp;lt;input value=&amp;quot;Send&amp;quot; type=&amp;quot;submit&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/form&amp;gt;&lt;br /&gt;
    &amp;lt;h2 id=&amp;quot;instruction&amp;quot;&amp;gt;Now &amp;lt;span class=&amp;quot;userName&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;, I want you to walk 10 steps away from where you are now.&amp;lt;/h2&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
&amp;lt;script&amp;gt;&lt;br /&gt;
    var firstName; // variable that will store user name&lt;br /&gt;
    $(&amp;quot;form#greeting&amp;quot;).submit(function(event){&lt;br /&gt;
        console.log( $(&amp;#039;#firstName&amp;#039;).val() );&lt;br /&gt;
        firstName = $(&amp;#039;#firstName&amp;#039;).val();&lt;br /&gt;
 &lt;br /&gt;
        event.preventDefault();&lt;br /&gt;
        $(&amp;quot;#firstName&amp;quot;).val(&amp;#039;&amp;#039;); //clean input#firstName&lt;br /&gt;
        $(&amp;#039;form, #question&amp;#039;).css(&amp;#039;display&amp;#039;, &amp;#039;none&amp;#039;); //hide form&lt;br /&gt;
        $(&amp;#039;#instruction&amp;#039;).css(&amp;#039;display&amp;#039;, &amp;#039;block&amp;#039;); //show instruction&lt;br /&gt;
        $(&amp;#039;span.userName&amp;#039;).text(firstName); //Add name to span.userName&lt;br /&gt;
 &lt;br /&gt;
    })&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;/script&amp;gt;&lt;br /&gt;
&amp;lt;/body&amp;gt;&amp;lt;/html&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>Andre</name></author>
	</entry>
</feed>