I'm working on a new product and it is going very well.
I've added my cpnav file and am working on my admin functions and I would like to use javascript to get a confirmation before something is deleted.
I've tried printing that directly out, closing the php tags, etc, but I can't seem to get javascript from inside the admincp.
for example, I've trried the following:
PHP Code:
if ($_REQUEST['do'] == 'equipment')
{
print "testing";
?>
<script language="javascript" type="text/javascript">
alert('123');
</script>
<?php
print_cp_header($vbphrase['lf_settings']);
print_table_break();
----- snip------
and also
PHP Code:
if ($_REQUEST['do'] == 'equipment')
{
print "testing";
print "<script language=\"javascript\" type=\"text/javascript\">alert('123');</script>";
print_cp_header($vbphrase['lf_settings']);
print_table_break();
----- snip ------
In both cases when do == equipment I get the cp header, but no javascript is printed.