help with JavaScript in PHWeb screen

Edis, Bob bob.edis@fleetpride.com
Wed, 27 Jun 2001 11:54:26 -0500


You are right Richard, the syntax should be PH_ACTION.value NOT
PH_ACTION.action.  I have corrected that oversite.

-----Original Message-----
From: Richard Sheehan [mailto:sheerich@isu.edu]
Sent: Wednesday, June 27, 2001 11:27 AM
To: Edis, Bob
Cc: 'powerh-l@list.swau.edu'
Subject: Re: help with JavaScript in PHWeb screen


Try the following:

Bob,

Without seeing all of the source, I would suspect a few things.

"Edis, Bob" wrote:

> A runtime error has occurred.
> 
> Error: 'self.document.form1.PH_ACTION' is not an object
> -------------------------------------------------------

* Your form does not have name, add <form name="form1" ....
This may be why javascript cannot find the object PH_ACTION.

Please continue further down.

> 
> 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;

"action" is probably not a property of the object PH_ACTION, however, if
your using the default generated input tag <input type="hidden"
name="PH_ACTION" value="">, value is a property of the object PH_ACTION.

Try the following:
    self.document.form1.PH_ACTION.value = 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
> 
> = = = = = = = = = = = = = = = = = = = = = = = = = = = =
> Mailing list: powerh-l@lists.swau.edu
> Subscribe: "subscribe" in message body to powerh-l-request@lists.swau.edu
> Unsubscribe: "unsubscribe" in message body to
powerh-l-request@lists.swau.edu
> http://lists.swau.edu/mailman/listinfo/powerh-l
> This list is closed, thus to post to the list you must be a subscriber.

-- 
Richard Sheehan,
Administrative Systems - IT Programmer Analyst Associate
Idaho State University Computing & Communications
Campus Box 8037, Pocatello, ID 83209-8037
Phone: 208.282.3861 - Fax: 208.282.3673
Email: sheerich@isu.edu