I've searched thoroughly and attempted quite a few different methods to achieve what i'm looking to achieve basically i want to know if upon success of an ajax function i can switch to a different php case without reloading the page, for example:
<?php case"1": ?> <form action="#" method="post" id="form1" name="form"> <input name="eg1" type="text" value="value1"> <input type="submit" value="Add Item" name="dosubmit" /> <?php break;?> <?php case"2": ?> <form action="#" method="post" id="form1" name="form"> <input name="eg1" type="text" value="<? echo $value?>"> <input type="submit" value="Update Item" name="dosubmit" /> <?php break;?>
I am using jquery and a typical mvc methodology and have the success function posting back that the item is added in case"1" however i also wish to in the success function switch to case 2 so it displays after success. Any help would be greatly appreciated.