My problem is as follows. When trying to evaluate the value of a div assigned by PHP with ajax , I can not evaluate the string EMPTY "" as true. Here is a simple example of my problem. messageAjax belongs to a div tag.
<script type="text/javascript">
function comprobar(nick){
var url = '/reg/ControlCampos.php';
var myAjax = new Ajax.Updater( 'mensajeAjax', url, { method: 'get', onComplete: function(){
if (
***document.getElementById("mensajeAjax").innerHTML==""*** //NOT WORKING
)
//ACTION
}});
} </scrip>'
PHP Code of ControlCampos.php
<?php echo ""; ?>'