Javascript
function changeInitial(init,alter)
{
<!--alert(alter);-->
init.parent().hide();
alter.parent().show();
}
Html
<div class="form_item">
<div class="form_label">
<label>Account</label>
</div>
<span id="new_ac">
<input type="text"/>
<a id="create_ac" onclick ='changeInitial($("#create_ac, #select_ac"));'>
Select Existing Account
</a>
</span>
<span id="existing_ac">
<select>
<option>Select an account</option>
<option>Customer</option>
<option>Competitor</option>
<option>Investor</option>
<option>Partner</option>
<option>Reseller</option>
<option>Supplier</option>
</select>
<a id="select_ac">Create new Account</a>
</span>
</div>
Firebug keeps telling me that "alter" is undefined. Please is there something I am missing? "init" is working fine.