Amar-ms
asked on
jqGrid response after Add/Edit/Delete?
Hi,
I am trying to use the jqGrid +jQuery with edit, add, delete can i display a message on the grid, whether the save/update/delete was successful or not?
an java/spring example would be perfect.
I am trying to use the jqGrid +jQuery with edit, add, delete can i display a message on the grid, whether the save/update/delete was successful or not?
an java/spring example would be perfect.
As Nithyanandhan said is correct !!
ur using jGrid define in jsp that time u can define the div tag ....
Other wise u can set msg (succes or failer ) in ur controller at request scope
and u can get the resuest scope variable in JSP using JSTL tag ....
ur using jGrid define in jsp that time u can define the div tag ....
Other wise u can set msg (succes or failer ) in ur controller at request scope
and u can get the resuest scope variable in JSP using JSTL tag ....
ASKER
Thanks guys, but what i am looking for is displaying the message on the form pop-up not the actual page.
then its simple..
do this in your javascript...
var status = <your AJAX call response>;
if(status){
alert("Your operation failed");
}else{
alert("Your operation completed successfully");
}
if you want to do a popup window instead of alert then you can use window.open
do this in your javascript...
var status = <your AJAX call response>;
if(status){
alert("Your operation failed");
}else{
alert("Your operation completed successfully");
}
if you want to do a popup window instead of alert then you can use window.open
ASKER
want to show it on the form itself not as a alert or a pop-up.
what do you mean by "form itself"?
Early you have mentioned "form pop-up"...
Do you have a form in a pop-up and want to display the message there? In that case you can do the same logic which I mentioned... using <DIV>
logic doesn't change based on your target place for message display...
Please make your statements clear.. it will save both of our time!!
Early you have mentioned "form pop-up"...
Do you have a form in a pop-up and want to display the message there? In that case you can do the same logic which I mentioned... using <DIV>
logic doesn't change based on your target place for message display...
Please make your statements clear.. it will save both of our time!!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
1) Place a <DIV it="myStatus"> just above the table, which can display your add/update/delete status
2) Based on the response of your AJAX call, decide your message
for example if AJAX call failed for ADD
if(failed){
document.getElementById("m
}