Error Loading Page Using Jquerymobile When Saving Image (Photo)

If I try to upload a photo, I get an error loading page (jquerymobile message) as soon as I try to upload a file using the $model->image->saveAs(’/path/to/file’); as explained in the Yii Wiki: How to upload a file using a model

It causes the error even when forcing my validation rule to safe. Of course, removing jquerymobile rectifies the issue but is not acceptable in my situation. If there are any examples out there for me to look at using jquerymobile with Yii (especially for the upload and ajax validation) I would greatly appreciate the links. Thanks!