anonymous Log in
Search
Recents:
v3.0
gxenglish-l
Using confirm in Web environment for a jqGrid custom button
03/03/14 07:39

Jannie Louw

Replies: 0


I would like to set up a confirm for the custom buttons in jqGrid,
specifically to ask for confirmation before deleting in a web environment.

As there is no specific object that I can link the confirm to, I cannot use
JSEvent

I picked up that the following code is an alternative:



form.HeaderRawHTML += 'function eliminar()'
form.HeaderRawHTML += '{'
form.HeaderRawHTML += 'var vf=confirm("┬┐Esta seguro que desea Eliminar este
Proyecto?");'
form.HeaderRawHTML += 'if(vf)'
form.HeaderRawHTML += 'return true;'
form.HeaderRawHTML += 'else'
form.HeaderRawHTML += 'return false;'
form.HeaderRawHTML += '}'
form.HeaderRawHTML += '/script>'

and

reemplazar "<" por <

&Html += 'td class="links">"<"a href="heliminar.aspx?pry,' +
trim(str(PryCod)) + '" onclick="return eliminar();">"<"img
src="images/14x14/delete-page-red.gif" border="0" alt="Eliminar"
title="Eliminar" />"<"/a>"<"/td>'


but I cannot get it to work. I do not know HTML programming,. Do I place the
last &Html line in the sub where I execute the jqGrid delete button, and
what does the line look like exactly as I get an error with the line

Or are there any other suggestions?



Back to gxenglish-l