<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="https://wiki.paskvil.com/skins/common/feed.css?303"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://wiki.paskvil.com/index.php?action=history&amp;feed=atom&amp;title=Short_Notes_on_Web</id>
		<title>Short Notes on Web - Revision history</title>
		<link rel="self" type="application/atom+xml" href="https://wiki.paskvil.com/index.php?action=history&amp;feed=atom&amp;title=Short_Notes_on_Web"/>
		<link rel="alternate" type="text/html" href="https://wiki.paskvil.com/index.php?title=Short_Notes_on_Web&amp;action=history"/>
		<updated>2026-04-10T18:33:37Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.22.0</generator>

	<entry>
		<id>https://wiki.paskvil.com/index.php?title=Short_Notes_on_Web&amp;diff=84&amp;oldid=prev</id>
		<title>Admin: Created page with &quot;== Multiple Submit Buttons and/or Multiple Forms on Page ==  Just add a name to the submit button, and in the handler action code check if the corresponding value is set in GET/P...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.paskvil.com/index.php?title=Short_Notes_on_Web&amp;diff=84&amp;oldid=prev"/>
				<updated>2012-06-01T20:15:49Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;quot;== Multiple Submit Buttons and/or Multiple Forms on Page ==  Just add a name to the submit button, and in the handler action code check if the corresponding value is set in GET/P...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;== Multiple Submit Buttons and/or Multiple Forms on Page ==&lt;br /&gt;
&lt;br /&gt;
Just add a name to the submit button, and in the handler action code check if the corresponding value is set in GET/POST data (depending on the &amp;lt;tt&amp;gt;method&amp;lt;/tt&amp;gt; of the form):&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;form name=&amp;quot;form1&amp;quot; method=&amp;quot;post&amp;quot; action=&amp;quot;the/one/action&amp;quot;&amp;gt;&lt;br /&gt;
  ...&lt;br /&gt;
  &amp;lt;input type=&amp;quot;submit&amp;quot; name=&amp;quot;submit1&amp;quot; value=&amp;quot;1st submit in this form&amp;quot; /&amp;gt;&lt;br /&gt;
  &amp;lt;input type=&amp;quot;submit&amp;quot; name=&amp;quot;submit2&amp;quot; value=&amp;quot;2nd submit in this form&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/form&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;form name=&amp;quot;form2&amp;quot; method=&amp;quot;post&amp;quot; action=&amp;quot;the/one/action&amp;quot;&amp;gt;&lt;br /&gt;
  ...&lt;br /&gt;
  &amp;lt;input type=&amp;quot;submit&amp;quot; name=&amp;quot;submit3&amp;quot; value=&amp;quot;one more form on the same page!&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/form&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
In &amp;lt;tt&amp;gt;the/one/action&amp;lt;/tt&amp;gt; just check which of the ''submit1'', ''submit2'', or ''submit3'' values is set in POST, and you'll know which submit button was pressed.&lt;br /&gt;
&lt;br /&gt;
== Make 'float' Elements Appear One under Another ==&lt;br /&gt;
&lt;br /&gt;
If you have multiple &amp;lt;tt&amp;gt;float: right;&amp;lt;/tt&amp;gt; elements, they appear one next to another, in the right-to-left order as they appear in HTML.&lt;br /&gt;
&lt;br /&gt;
To make them appear one under another, you have to &amp;quot;clear&amp;quot; after each element where you want the break to appear:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;div style=&amp;quot;float: right;&amp;quot;&amp;gt;...&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;float: right;&amp;quot;&amp;gt;...&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;float: right;&amp;quot;&amp;gt;...&amp;lt;/div&amp;gt;            &amp;lt;!-- these 3 will appear in one row, if they can fit --&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;float: right; clear: right;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt; &amp;lt;!-- the &amp;quot;cut&amp;quot; --&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;float: right;&amp;quot;&amp;gt;...&amp;lt;/div&amp;gt;            &amp;lt;!-- these 2 will appear in a new row --&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;float: right;&amp;quot;&amp;gt;...&amp;lt;/div&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
The &amp;lt;tt&amp;gt;clear: right;&amp;lt;/tt&amp;gt; means that no &amp;lt;tt&amp;gt;float: right;&amp;lt;/tt&amp;gt; element can appear on the same row anymore.&lt;br /&gt;
&lt;br /&gt;
Similarly, &amp;lt;tt&amp;gt;clear: both;&amp;lt;/tt&amp;gt; will make all other elements appear below the given element.&lt;br /&gt;
&lt;br /&gt;
== Upload a File via Form ==&lt;br /&gt;
&lt;br /&gt;
The main thing is - POST and &amp;lt;tt&amp;gt;enctype=&amp;quot;multipart/form-data&amp;quot;&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;form action=&amp;quot;name/of/action&amp;quot; method=&amp;quot;POST&amp;quot; enctype=&amp;quot;multipart/form-data&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;input type=&amp;quot;file&amp;quot; name=&amp;quot;uploaded-file&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;input type=&amp;quot;submit&amp;quot; value=&amp;quot;Upload the file&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/form&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
If you use different &amp;lt;tt&amp;gt;enctype&amp;lt;/tt&amp;gt;, you'll get only the name of the file in the POST, and not the file itself.&lt;br /&gt;
&lt;br /&gt;
== Override the IE's Problem with &amp;lt;tt&amp;gt;width&amp;lt;/tt&amp;gt; ==&lt;br /&gt;
&lt;br /&gt;
IE does not parse correctly the CSS's &amp;lt;tt&amp;gt;min-width&amp;lt;/tt&amp;gt;/&amp;lt;tt&amp;gt;max-width&amp;lt;/tt&amp;gt;. To override this, use &amp;lt;tt&amp;gt;auto !important&amp;lt;/tt&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;style=&amp;quot;max-width: 400px; width: auto !important; width: 400px;&amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Make an Element Fill In All the Remaining Space ==&lt;br /&gt;
&lt;br /&gt;
Sometimes you want the last element on the &amp;quot;line&amp;quot; take up all space left. To achieve this, you can let the left element float, or to be sure, let both of them float; if there is no non-floating element, don't forget to &amp;quot;clear&amp;quot; afterwards:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;div style=&amp;quot;width: 500px; margin: 0; padding: 0;&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;div style=&amp;quot;float: left; width: 200px; padding: 0;&amp;quot;&amp;gt;left content&amp;lt;/div&amp;gt;&lt;br /&gt;
  &amp;lt;div style=&amp;quot;float: right;&amp;quot;&amp;gt;right content&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Admin</name></author>	</entry>

	</feed>