help with JavaScript in PHWeb screen
Edis, Bob
bob.edis@fleetpride.com
Wed, 27 Jun 2001 11:11:30 -0500
G'day all
Environment:
PH Web 2.21D3
PH 4GL 8.21D4
I.E. 5.0
Windows NT 4.0 sp6
I am trying to create a button on a PH Web HTML template where the button
will trigger a designer procedure. When I run the template in IE5.0 and
click on the resulting button I get this JavaScript error:
-------------------------------------------------------
A runtime error has occurred.
Error: 'self.document.form1.PH_ACTION' is not an object
-------------------------------------------------------
Anybody know what the problem here is (besides me)?
Using the example in the documentation I have I have coded some JavaScript
as follows:
<script language="JavaScript">
<!--
function UserAction( action )
{
self.document.form1.PH_ACTION.action = action;
self.document.form1.submit();
}
//-->
</script>
</head>
<body bgcolor="grey">
<!--PH:RECORD-->
<form action="/cgi-bin/phcgi.exe" method="POST">
The syntax used to in the body of the form is:
<input type="button" onclick="UserAction('CINV')" value="Select Specific
Invoice">
Regards,
Blue