I had a small app running under 1.1 and have just upgraded to 2.0. The app seems to run OK, however, none of the Ajax calls work. The little icon spins, but nothing happens. Have I missed something in the upgrade?
Do you see any errors in the Apache logs? Also, it would help to run Firebug to see what's going on on the wire (what's getting returned for your Ajax requests).
I'm having the same problem with an interface I built. It worked with 1.1 but doesn't with 2.0.2. If I use QAjaxAction, the wait icon spins but I am dumped back to the page. If I switch it to QServerAction, it appears to process my form and return results but my QCheckBox never sets its Checked field when the checkbox is checked.
QServerAction reaches Form_Validate with unset checkbox
QAjaxAction doesn't reach Form_Validate
Could there be some configuration for 2.0.2 that I'm missing for Ajax?
I've used Firebug and checked Apache2 access and error logs but nothing jumps out.
Don't quite understand why it didn't work but I figured out how to fix it.
There must be cleaner code requirements in 2.0.2 that my sloppy stuff
didn't pass.
Fix: My RenderBegin() needed to be moved to the top of the code.
Now everything is happy and I'll adjust the balance of my code as necessary.
***
By the way, QCubed rocks! I was able to throw together a solid, professional
looking interface to a MySQL driven application in a fairly short amount of
time. In fact, this problem was one of the only things I bumped into along
the way that I couldn't resolve right away. All my questions were pretty
much answered through pre-existing forum posts.
Thanks to everyone that asked questions in addition to those providing
solutions - and, of course, those keeping it all together.
QCubed 1.1.1 worked with the code as follows (QCubed 2.0.2 didn't):
RenderBegin / End basically output the <(/)form> tags, so you'll note that in your non-working solution, the open was inside a table and the close was outside of it. I'm not entirely sure why 1.1 was more forgiving, but yes, we do require valid HTML in order to function predictably. :)
Hi Ken,
Do you see any errors in the Apache logs? Also, it would help to run Firebug to see what's going on on the wire (what's getting returned for your Ajax requests).
Hello kenmc,
Do you use firefox and firbug? If not I would strongly recommend using it and see what happens in the Ajax call.
Cheers
Helge
Did anyone ever resolve this?
I'm having the same problem with an interface I built. It worked with 1.1 but doesn't with 2.0.2. If I use QAjaxAction, the wait icon spins but I am dumped back to the page. If I switch it to QServerAction, it appears to process my form and return results but my QCheckBox never sets its Checked field when the checkbox is checked.
QServerAction reaches Form_Validate with unset checkbox
QAjaxAction doesn't reach Form_Validate
Could there be some configuration for 2.0.2 that I'm missing for Ajax?
I've used Firebug and checked Apache2 access and error logs but nothing jumps out.
Thanks,
Kevin.
My AJAX works now!
Don't quite understand why it didn't work but I figured out how to fix it.
There must be cleaner code requirements in 2.0.2 that my sloppy stuff
didn't pass.
Fix: My RenderBegin() needed to be moved to the top of the code.
Now everything is happy and I'll adjust the balance of my code as necessary.
***
By the way, QCubed rocks! I was able to throw together a solid, professional
looking interface to a MySQL driven application in a fairly short amount of
time. In fact, this problem was one of the only things I bumped into along
the way that I couldn't resolve right away. All my questions were pretty
much answered through pre-existing forum posts.
Thanks to everyone that asked questions in addition to those providing
solutions - and, of course, those keeping it all together.
QCubed 1.1.1 worked with the code as follows (QCubed 2.0.2 didn't):
<?phprequire('../includes/header_login.inc.php');
?>
<table border=0 width="100%" height="100%"">
<tr height="99%" valign="top" align="center">
<td>
<br />
<?php $this->RenderBegin() ?>
<?php echo $this->session_timed_out; ?>
<table align="center" border=0 cellpadding=4 cellspacing=0>
<?php $this->objDefaultWaitIcon->Render('Position=absolute','Top=0px','Left=430px'); ?>
<tr align="center"><td align="right"><b>Username</b>:</td><td width="8"> </td><td><?php $this->txtUsername->RenderWithError(); ?></td></tr>
<tr align="center"><td colspan=3 align="left"><font color="#AA0000"><?php echo $this->lblUsername->Render(); ?> </font></td></tr>
<tr align="center"><td align="right"><b>Password</b>:</td><td width="8"> </td><td><?php $this->txtPassword->RenderWithError(); ?></td></tr>
<tr align="center"><td colspan=3 align="left"><font color="#AA0000"><?php echo $this->lblPassword->Render(); ?> </font></td></tr>
<tr align="center"><td colspan=3 align="left"><?php echo $this->chkAdmin->Render(); ?></td></tr>
<tr align="center"><td colspan=3 align="center"><br /><?php $this->btnContinue->Render(); ?></td></tr>
</table>
</td>
</tr>
</table>
<br />
<?php $this->RenderEnd() ?>
<?php require('../includes/footer.inc.php'); ?>
In Qcubed 2.0.2, the RenderBegin() needed to be moved to the top:
<?phprequire('../includes/header_login.inc.php');
?>
<?php $this->RenderBegin() ?>
<table border=0 width="100%" height="100%"">
<tr height="99%" valign="top" align="center">
<td>
<br />
<?php echo $this->session_timed_out; ?>
<table align="center" border=0 cellpadding=4 cellspacing=0>
<?php $this->objDefaultWaitIcon->Render('Position=absolute','Top=0px','Left=430px'); ?>
<tr align="center"><td align="right"><b>Username</b>:</td><td width="8"> </td><td><?php $this->txtUsername->RenderWithError(); ?></td></tr>
<tr align="center"><td colspan=3 align="left"><font color="#AA0000"><?php echo $this->lblUsername->Render(); ?> </font></td></tr>
<tr align="center"><td align="right"><b>Password</b>:</td><td width="8"> </td><td><?php $this->txtPassword->RenderWithError(); ?></td></tr>
<tr align="center"><td colspan=3 align="left"><font color="#AA0000"><?php echo $this->lblPassword->Render(); ?> </font></td></tr>
<tr align="center"><td colspan=3 align="left"><?php echo $this->chkAdmin->Render(); ?></td></tr>
<tr align="center"><td colspan=3 align="center"><br /><?php $this->btnContinue->Render(); ?></td></tr>
</table>
</td>
</tr>
</table>
<br />
<?php $this->RenderEnd() ?>
<?php require('../includes/footer.inc.php'); ?>
RenderBegin / End basically output the <(/)form> tags, so you'll note that in your non-working solution, the open was inside a table and the close was outside of it. I'm not entirely sure why 1.1 was more forgiving, but yes, we do require valid HTML in order to function predictably. :)