ajaxSubmitButton refuses to work

Hi I’m having trouble getting the ajaxSubmitButton to work for passing POST variables to another view. It should be straightforward but I’ve already spend an entire day trying to figure it out. Help?

Here’s the simplified version of the code.


<?php echo CHtml::beginForm(); ?>

	<td><img src = "<?php echo Yii::app()->request->baseUrl;?>images/username.png"/></td>

	<td><input type="text" name ="username" id="username"/></td>


	<td><?php echo CHtml::ajaxSubmitButton('',array('loggingIn/index'),array('update'=>'#post_test',));?></td>

<?php echo CHtml::endForm(); ?>

<div id="post_test">...</div>



	$this->layout = false;

	$userID = $_POST['username'];

	echo $userID;


Replacing echo $userID; with echo "blah"; works as expected.

It appears that POST variables are not getting passed.

Any suggestions welcome.

Problem resolved. It was a table issue.