Forum
Topic RSS
11:16
08/04/2009
OfflineHello,
I have searched the Help forum without an answer I can copy/deduce from. I want to
capture what is returned from the editurl POST. I have the following:
onSelectRow: function(id)
{
if (id && id !== lastsel)
{
jQuery('#insertErrors').restoreRow(lastsel);
jQuery('#insertErrors').editRow(id, true, '',
refresh, '', '', savedResponse, '', '');
lastsel = id;
}
},
editurl: 'upload_row_validate.php?&manuf=' + manuf + '&link=' +
errorlink + '&postdt=' + postdt
refresh fires (in the successfunc parameter role) which changes the url and
reloads the grid after upload_row_validate.php has done its thing – working fine.
I have created functions for the different option in editRow (e.g. oneditfunc) to
make sure my parameters were correct – they all fire except the aftersavefunc
(called savedResponse here).
The editurl returns in Firefox firebug:
<?xml version='1.0' encoding='utf-8'?>
<row><saved>True</saved><insertcnt>1</insertcnt><errorcnt>12</errorcnt></row>
I thought the savedReponse would then supply the rowid & server
response so the function reads:
{
alert(rowid);
alert(responseXML);
}
savedResponse does not fire.
I tried inserting the line
after
and as soon as I edit the row - saveRow fires (and
savedResponse is called) which again suggests my parameters
are correctly positioned though I want saveRow to fire
after editRow 'enter' is received.
The POST response of the editurl is 200 OK so I don't know
what 'triggers' aftersavefunc.
I thought perhaps it is the successfunc that returns the
info so I tried that - I get an object XMLHttpRequest passed
to it which is not what I need.
Any help/pointers appreciated.
Thank you,
[What jqGrid can do and how you can mix and match - very impressive.]
11:35
Moderators
30/10/2007
OfflineHello,
It is a long story to explain - short maybe it should be fixed.
1. in successfunc is passed the response - so you should response.responseXML (in your case)
2. in aftersavefunc is passed response.responseText
The fix should pass the response on both events.
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.
13:37
08/04/2009
OfflineHi Tony,
Thanks for the help. Just to complete the thread.
Using successfunc (in my case called 'refresh') with what you said
reads something like
function refresh(response)
{
var xml = response.responseXML.documentElement;
alert(xml.getElementsByTagName("errorcnt")[0].firstChild.data):
}
gives me the number inside <errorcnt>12</errorcnt>.
Thanks,
03:59
Moderators
30/10/2007
OfflineHello,
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.
Most Users Ever Online: 994
Currently Online:
42 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
Log In
Home