2
I have a list of titles presented dynamically to the user:
[ x ] - [ + ] - Título 1
[ x ] - [ + ] - Título 2
[ x ] - [ + ] - Título 3
[ x ] - [ + ] - Título 4
The number of items is variable and the values for Title also depend on the user’s previous choices.
The first button [ X ]
is for RULE OUT the record, the second [ + ]
is for EDIT.
In the of RULE OUT I need a window of Prompt
that CONFIRM the deletion of the record.
I did so: onClick="javascript:window.confirm('Deseja realmente excluir?')"
But the two buttons of the prompt do the same action. This is OK deletes and CANCEL also.
Does anyone have any idea how to make this work?
Helio, you have to put a piece of HTML here to understand it better. When you say "DELETE the record" you mean delete the set
[ x ] - [ + ] - Título 1
clicked?– Sergio
It’s not HTML, Beast, it’s ASP. E mounts the list with a loop, like: While NOT Rstemp.EOF Response.write "<p>" Response.write "<a href=delete.Asp? ID=" & Rstemp("id") Response.write " onClick="&Chr(34)&"javascript:window.confirm Response.write "('Do you really want to delete?')"&Chr(34)&" Response.write ">" Response.write "[ X ]</a> - " Response."write<a href=Edit.Asp? ID=" & Rstemp("id") & ">" Response.write "[ + ]</a> - " Response.write Rstemp("title") Response.write "<br>" Rstemp.Movenext Wend
– Helio Souza
I’m sorry, I don’t understand why the formatting I apply is eliminated. There’s this tile that even I can’t understand. What a turd...
– Helio Souza
You are using ASP to build HTML. In this particular case, I think you should use pure HTML since the event
onclick
is static and does not vary depending on certain situations.– w35l3y