We help IT Professionals succeed at work.

onclick event

usmbay
usmbay asked
on
253 Views
Last Modified: 2013-12-13
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(); }
Comment
Watch Question

Antonio EstradaEngineering Manager / Architect
CERTIFIED EXPERT

Commented:
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
IT Manager
CERTIFIED EXPERT
Commented:
Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION
b0lsc0ttIT Manager
CERTIFIED EXPERT

Commented:
I'm glad I could help.  Thanks for the grade, the points and the fun question.

bol
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a sample view!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.