CodeCharge Studio
search Register Login  

Visual PHP Web Development

Visually Create Internationalized Web Applications, Web Reports, Calendars, and more.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> PHP

 Change Navigator Link

Print topic Send  topic

Author Message
smdesign

Posts: 7
Posted: 05/18/2007, 2:26 AM

Hi,

Question is: Is there any way to change link on navigator? I am using ajax to dynamicaly load data and I need to change "Prev - Next" link from:

...page.php?page_transPage=2 to something like:

<a href="#" onClick="javascript:function('page_transPage=2');">Prev..Next</a>

Is there any way to "hack" navigator like this?
Thanks.
View profile  Send private message
smdesign

Posts: 7
Posted: 05/18/2007, 3:50 AM

OK, I found out the trick..
View profile  Send private message
Wkempees
Posted: 05/18/2007, 6:08 AM

So tell us!
smdesign

Posts: 7
Posted: 05/18/2007, 6:42 AM

Well, maybe solution is not so elegant but it works!

First, I made a copy of Navigator.php file and called it Navigator_Ajax.php. Then on page I had to change include page (and made CCS code white) from include(RelativePath . "/Navigator.php"); to include(RelativePath . "/Navigator_Ajax.php");

In Navigator.php you have construction for every link, I mean separate for Prev, Next,Last.. I just needed "Prev" and "Next" link. So I found in code line for Next link, something similar like:

$Tpl->SetVar("Next_URL", $this->FileName . "?" . CCAddParam($QueryString, $this->TargetName . "Page", ($this->PageNumber + 1)));

then I changed to :

$Tpl->SetVar("Next_URL", '#" onclick="javascript:ajax_loadContent(\'div_name_on_page\',\''.'page_to_load.php'. "?" . CCAddParam($QueryString, $this->TargetName . "Page", ($this->PageNumber + 1)).'\');');

On this way you get link like # and on click execute javascript.

I hope you can understand what I wrote. Anyway I think you have to experiment to get right results.





View profile  Send private message
Wkempees
Posted: 05/18/2007, 7:00 AM

Tx, W
username

Posts: 24
Posted: 09/13/2007, 4:01 AM

thanks
please give me example for ajax ccs :-{}
View profile  Send private message
smdesign

Posts: 7
Posted: 09/13/2007, 4:38 AM

This will be our new website and its still not finished. Everything was made with CCS and on portfolio page you have sample Ajax and CCS.
http://www.smdesign-usa.com/portfolio.php?cid=31
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Internet Database

Visually create Web enabled database applications in minutes.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.