I found something like what I want and modified it for my needs (Thank you community server forums!). Here is the JS I have...
Code:
function togglePanel( targetID, buttonID, trackerID )
{
if ( document.getElementById )
{
var target = document.getElementById( targetID ); // ID of the Div to show or hide
if ( target != null )
{
target.style.display = ( target.style.display != "none" ) ? "none" : "";
}
var button = document.getElementById( buttonID ); // ID of the button to change values
if ( button != null )
{
button.value = ( target.style.display != "none" ) ? "Minimize this comment form" : "Print a repair pass with comments";
}
var tracker = document.getElementById( trackerID );
if ( tracker != null )
{
tracker.value = ( target.style.display == "none" ) ? "True" : "False";
}
return false;
}
return true;
}
And here is the HTML and trigger...
Code:
<input id="problem_tracker_1" name="problem_tracker_1" type="hidden" value="True" /><input type="button" id="problem_1_clicker" name="problem_1_clicker" onclick="return togglePanel('gate_pass_form_1', 'problem_1_clicker', 'problem_tracker_1');" value="Print a repair pass with comments" />
<div id="gate_pass_form_1" style="display: none;">
<form method="POST" action="http://localhost/nummi/admin/gate_pass.php?vid=363&sid=bf7ba23385319c8871eb7a92846f4260" target="_blank" name="gate_pass_problem_1">
<table border="0" cellpadding="0" cellspacing="0" width="90%" align="center">
<tr>
<td style="border-bottom: solid 1pt #98AAB1; padding-left: 10px;" height="25" colspan="3" align="left" valign="middle">
<span class="nav">Why is this pass needed? <br /></span>
<span class="gen"><input type="checkbox" name="itembox_1"> PEP Repair <input type="checkbox" name="itembox_2"> QA Analysis <input type="checkbox" name="itembox_3"> Other Repair <input type="checkbox" name="itembox_4"> Other Analysis</span>
</td>
</tr>
<tr>
<td style="border-bottom: solid 1pt #98AAB1; padding-left: 10px;" height="25" colspan="3" align="left" valign="middle">
<span class="nav">What items need repair? <br /></span>
<span class="gen"><input type="checkbox" name="itembox_5"> Glass <input type="checkbox" name="itembox_6"> Body <input type="checkbox" name="itembox_7"> Metal <input type="checkbox" name="itembox_8"> Paint <input type="checkbox" name="itembox_9"> Light Repair <input type="checkbox" name="itembox_10"> Heavy Repair <input type="checkbox" name="itembox_11"> Other</span>
</td>
</tr>
<tr>
<td style="border-bottom: solid 1pt #98AAB1; padding-left: 10px;" height="25" colspan="3" align="left" valign="middle">
<span class="nav">Describe the work to be done, line by line: <br /></span>
<span class="gen">Line 1: <input type="text" name="item_desc_1" class="post" size="80" maxlength="80" /></span><br />
<span class="gen">Line 2: <input type="text" name="item_desc_2" class="post" size="80" maxlength="80" /></span><br />
<span class="gen">Line 3: <input type="text" name="item_desc_3" class="post" size="80" maxlength="80" /></span><br />
<span class="gen">Line 4: <input type="text" name="item_desc_4" class="post" size="80" maxlength="80" /></span><br />
</td>
</tr>
<tr>
<td class="row1" height="25" colspan="3" align="center" valign="middle">
<input type="hidden" name="vid" value="363" />
<input type="submit" name="submit" value="Make a Gate Pass" class="mainoption" />
</td>
</tr>
</table>
</form>
</div>
This actually works exactly as I want it to. Is there a way using your code (again, I am not that savvy in JS) to close one DIV and open another with one click of the button?
BTW, Thanks for the response. I really appreciate it.