onclick event

Hello,
here is a delete button I need to put this onclick event inside the delete
<TD colspan=\"0\" class=\"bouton\" ><INPUT name='delete' type=\"submit\" value=\"".BTN_DELETE."\" class=\"btn\" ></TD>

*****

onclick=\"getOpaque(true); var id = window.showModalDialog('/identification/form.php?action=password', '', 'dialogHeight: 150px; dialogWidth: 200px; center: yes; help: no; resizable: no; scroll: no; status: no;'); getOpaque(false); if (id) { document.getElementById('idUser').value = id; document.getElementById('submitbtn').click(); }
usmbayAsked:
Who is Participating?
 
b0lsc0ttIT ManagerCommented:
You should just need ...

<TD colspan=\"0\" class=\"bouton\" ><INPUT name='delete' type=\"submit\" value=\"".BTN_DELETE."\" class=\"btn\" onclick=\"getOpaque(true); var id = window.showModalDialog('/identification/form.php?action=password', '', 'dialogHeight: 150px; dialogWidth: 200px; center: yes; help: no; resizable: no; scroll: no; status: no;'); getOpaque(false); if (id) { document.getElementById('idUser').value = id; document.getElementById('submitbtn').click(); }\"></TD>

The onclick you had looked good.  I added the closing double quote for the onclick event in the element.  If that doesn't work then look at the browser's html source and look for a Javascript error.  Post that info here.

Let me know if you have a question.

bol
0
 
Antonio EstradaTech Leader / Senior Web DeveloperCommented:
If I understand correctly, try this:

<head>
<script language="JavaScript">
<!--
function doActions() {
getOpaque(true); var id = window.showModalDialog('/identification/form.php?action=password', '', 'dialogHeight: 150px; dialogWidth: 200px; center: yes; help: no; resizable: no; scroll: no; status: no;'); getOpaque(false); if (id) { document.getElementById('idUser').value = id; document.getElementById('submitbtn').click();
document.forms["YOURFORMNAMEHERE"].submit();
}
//-->
</script>
</head>

<TD colspan=\"0\" class=\"bouton\" ><INPUT name='delete' type=\"button\" value=\"".BTN_DELETE."\" class=\"btn\" onClick="doActions();" /></TD>

HTH

-V
0
 
b0lsc0ttIT ManagerCommented:
I'm glad I could help.  Thanks for the grade, the points and the fun question.

bol
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.