anonymous
Log in
Log out
Search
Recents:
v3.0
My subscriptions
My posts
My profile
gxenglish-l
Using confirm in Web environment for a jqGrid custom button
03/03/14 06: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?
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?
Replies
Back to gxenglish-l