request ajax

thread: 6 messages  |  last: a year ago  |  started: tuesday, march 9, 2010, 10:40 am pst


#1  |  Leonardo (Minas Gerais) Brazil
Tuesday, March 9, 2010, 10:40 AM PST

Hello everyone, want a help please.
When I do an ajax request on my page it rises to the top, and I have to scroll down the scrollbar to continue where it was.

Some know any solution?

#2  |  VexedPanda (Calgary, AB) Canada
Tuesday, March 9, 2010, 3:15 PM PST

An ajax request won't cause the page to be move at all. Something must be causing the entire page to reload. Are you sure you don't have it using a QServerAciton instead?

#3  |  Leonardo (Minas Gerais) Brazil
Tuesday, March 9, 2010, 8:04 PM PST

i will check

#4  |  Leonardo (Minas Gerais) Brazil
Wednesday, March 10, 2010, 6:55 AM PST

The page is not reloaded, only leads to the top of the page.

#5  |  Zbyszek Czarnecki (Warsaw, PL) Poland
Wednesday, March 10, 2010, 7:27 AM PST

You probably use QLinkButton which is rendered as a tag <a href=“#”>

Probably you need to add QTeminateAction to the control something like this:

$this->btnSubmit->AddAction(new QClickEvent(), new QAjaxAction('btnSubmit_Click'));
$this->btnSubmit->AddAction(new QClickEvent(), new QTerminateAction());

or edit the control to make html it renders doesn't containt the #.

Hope it helps if not please post some code.

#6  |  Leonardo (Minas Gerais) Brazil
Wednesday, March 10, 2010, 10:14 AM PST

Thank you very much.

You helped me a lot.

You were right was because the control is a QLinkButton.

Case Resolved.



Copyright © 2005 - 2012, Quasidea Development, LLC
This open-source framework for PHP is released under the terms of The MIT License.