Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Do like what user user1370958 said, or you could just have it on one line, which i would do for production</p> <p>within each checkbox <code>onclick</code> add </p> <pre><code>`onclick`='return CheckMember(0)' onclick='return CheckMember(1)' </code></pre> <p>and for the CheckMember function try</p> <pre><code>function CheckMember(isMember) { /* if(document.getElementById('checkbox')){ var ismember = document.getElementById('checkbox').value; }*/ // Check if ismember = 0 if (isMember == '1') { document.getElementById("forms").innerHTML = "&lt;table width='25%' border='0' cellpadding='5' cellspacing='5' bgcolor='#&lt;?php echo $tablebg; ?&gt;'&gt;&lt;tr&gt;&lt;td align='center' colspan='3'&gt;&lt;span class='style1'&gt;Already a Member?&lt;/span&gt;&lt;input id='checkbox' type='checkbox' value='1' name='ismemeber' class='style2' onclick='return CheckMember(0)' checked /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td nowrap='nowrap'&gt;&lt;div align='center'&gt;&lt;span class='style1'&gt;&lt;h3&gt;Please enter username and password&lt;/h3&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td align='center'&gt;&lt;span class='style1'&gt;Login:&lt;/span&gt;&lt;br /&gt;&lt;input type='input' name='access_login' class='style2' /&gt;&lt;br /&gt;&lt;span class='style1'&gt;Password:&lt;/span&gt;&lt;br /&gt;&lt;input type='password' name='access_password' class='style2' /&gt;&lt;p&gt;&lt;/p&gt;&lt;input type='submit' name='Submit' value='Submit' class='style2' /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;"; // If ismember is anything else } else { document.getElementById("forms").innerHTML = "&lt;table width='25%' border='0' cellpadding='5' cellspacing='5' bgcolor='#&lt;?php echo $tablebg; ?&gt;'&gt;&lt;tr&gt;&lt;td align='center'&gt;Already a Member? &lt;input id='checkbox' type='checkbox' name='ismemeber' onclick='return CheckMember(1)' /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td nowrap='nowrap'&gt;&lt;div align='left'&gt;&lt;span class='style1'&gt;First Name&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td&gt;&lt;span class='style1'&gt;:&lt;/span&gt;&lt;/td&gt;&lt;td&gt;&lt;div align='left'&gt;&lt;input type='text' name='ffname' class='style2' maxlength='25' /&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td nowrap='nowrap'&gt;&lt;div align='left'&gt;&lt;span class='style1'&gt;Middle Initial&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td&gt;&lt;span class='style1'&gt;:&lt;/span&gt;&lt;/td&gt;&lt;td&gt;&lt;div align='left'&gt;&lt;input name='fmname' type='text' class='style2' size='3' maxlength='1' /&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td nowrap='nowrap'&gt;&lt;div align='left'&gt;&lt;span class='style1'&gt;Last Name&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td&gt;&lt;span class='style1'&gt;:&lt;/span&gt;&lt;/td&gt;&lt;td&gt;&lt;div align='left'&gt;&lt;input type='text' name='flname' class='style2' maxlength='25'/&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td colspan='3'&gt;&lt;input type='hidden' name='submitted' value='1' /&gt;&lt;span class='style1'&gt;Yes&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;No&lt;/span&gt;&lt;/center&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td colspan='3'&gt;&lt;center&gt;&lt;input type='submit' value='Submit' /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;input type='reset' value='Reset' /&gt;&lt;/center&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td colspan='3' nowrap='nowrap'&gt;&lt;center&gt;&lt;span class='style5'&gt;All Fields are Required&lt;/span&gt;&lt;/center&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;"; } }; </code></pre> <p>. </p> <pre><code>&lt;div id="forms"&gt;&lt;script&gt;CheckMember()&lt;/script&gt;&lt;/div&gt; </code></pre> <p>you will need to tweek the checkbox to hold the checked value, see if that helps</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload