Forum

November 2nd, 2014
A A A
Avatar

Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

The forums are currently locked and only available for read only access
sp_Feed Topic RSS sp_TopicIcon
Problem with update and add URL
05/12/2008
03:37
Avatar
E.
Member
Members
Forum Posts: 3
Member Since:
04/12/2008
sp_UserOfflineSmall Offline

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

05/12/2008
11:31
Avatar
E.
Member
Members
Forum Posts: 3
Member Since:
04/12/2008
sp_UserOfflineSmall Offline

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.

09/12/2008
06:43
Avatar
tony
Sofia, Bulgaria
Moderator
Members

Moderators
Forum Posts: 7721
Member Since:
30/10/2007
sp_UserOfflineSmall Offline

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.

15/12/2008
04:00
Avatar
E.
Member
Members
Forum Posts: 3
Member Since:
04/12/2008
sp_UserOfflineSmall Offline

How can I correct the incorrect behavior?

I donwloaded the last release but I don't found any change.

Is any SVN available, or the correction will be a part or the next release?

Meanwhile, how can I correct it?

Thank you very much,

E.

15/12/2008
04:19
Avatar
tony
Sofia, Bulgaria
Moderator
Members

Moderators
Forum Posts: 7721
Member Since:
30/10/2007
sp_UserOfflineSmall Offline

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.

Forum Timezone: Europe/Sofia

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.com

Moderators: tony: 7721, Rumen[Trirand]: 81

Administrators: admin: 66

Comments are closed.
Privacy Policy   Terms and Conditions   Contact Information