Forum


03:37

04/12/2008

Hi
In the jQuery('#id').navGrid I have a custom URL for each action, like this:
jQuery('#list').navGrid('#pager',
// options
{},
// edition
{url:'/contacts/update/idperson/<?php echo $this->id; ?>'},
// add
{url:'/contacts/add/' },
// delete
{ url:'/contacts/delete'},
// search;
{}
);
The URL works fine the first time I click to update or add a record.
After update, even if I click on the add button, the update URL is called. After an add action, the URL stay in update even if I click the add button.
I can't use the same URL with the 'oper' or 'add' parameter, because we need different URL for each action to better integration into Zend Framework. I think is easy to change this behavior in JS than to change all the structure or ZF and our application.
Is there any way to "reset" the form action or other solution?
Thank you,
Escrig
11:31

04/12/2008

I tried with custom buttons like this, but the behavior is the same.
Example of custom add button, the edit button is equal whith an other URL:
.navButtonAdd("#pager",
{
caption: 'Add', buttonimg: jq_img+'row_add.gif',
onClickButton: function(rowid)
{
jQuery("#list").editGridRow("new",
{
reloadAfterSubmit:true,
closeAfterAdd: true,
clearAfterAdd: true
url:'/contacts/add/'
})
}
, position: "last", title: 'New' } )
;
The first time I click on add button, the record is sent and stored in database. Then if I select a row (without reload the whole page), edit and send it, a new record is created, because the URL /contacts/add/ is called again (I can see it with Firebug). Also happens in Safari.
06:43

Moderators
30/10/2007

Hello,
Thanks. Fixed.
Regards
Tony
For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.
04:19

Moderators
30/10/2007

Hello,
It should work. Please clear the cache.
Regards
Tony
For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.
Most Users Ever Online: 715
Currently Online:
49 Guest(s)
Currently Browsing this Page:
1 Guest(s)
Top Posters:
OlegK: 1255
markw65: 179
kobruleht: 144
phicarre: 132
YamilBracho: 124
Renso: 118
Member Stats:
Guest Posters: 447
Members: 11373
Moderators: 2
Admins: 1
Forum Stats:
Groups: 1
Forums: 8
Topics: 10592
Posts: 31289
Newest Members:
, razia, Prankie, psky, praveen neelam, greg.valainis@pa-tech.comModerators: tony: 7721, Rumen[Trirand]: 81
Administrators: admin: 66