I've tried the details in this post and although it does return values,
the
values are the IP for both vars.
I've used the same code except for changing the column ID's to my
particular ID's.
I've also confirmed that I'm not pointing the same var to both column ID's.
Why would I not get a hostname returned?
I've tested from within my corporate env behind the firewalls and also out
in the public.
My system details are:
Solaris 2.8 (both server and mid-tier)
AR server 6.3 patch 13
Mid-tier 6.3 patch 13
Apache web server
New Atlanta 5.x
Thx,
Kirk
----------------------------------------------------------------
On Wed, 13 Apr 2005 10:34:18 -0500, Grooms, Frederick W
<[EMAIL PROTECTED]> wrote:
>The only thing with 6.3 that you have to remember is that these
>functions only work in a .jsp file. You can not just put the functions
>in the Web Header (or Web Footer) Content, you must use an include of an
>actual .jsp file so the web server will process the functions. Here is
>what I do:
>
>Save the functions into their own .jsp file (mine is in
>/arsys/shared/get_client_info.jsp)
> --- file /arsys/shared/get_client_info.jsp contains: ---
> function env_ip_var()
> {
> var return_value = "<%=request.getRemoteAddr()%>";
> return (return_value)
> }
> function env_hostname()
> {
> var return_value = "<%=request.getRemoteHost()%>";
> return (return_value)
> }
> --------------------------------------------------------
>
>In the Web Header (or Web Footer) content add
> <SCRIPT src="/arsys/shared/get_client_info.jsp"
>language="JavaScript"></SCRIPT>
>
>To set a field with the data from the JavaScript functions do the
>following in an active link:
> Run Process Command Line:
>javascript:window.F(536870923).DoSet(env_hostname());
> Run Process Command Line:
>javascript:window.F(536870924).DoSet(env_ip_var());
> (Use your own field IDs of course ;)
>
>Note: If you are using a 5.1.2 ARS server you have to open the form
>with the 6.3 Admin tool and go to
>Form -> Current View -> Properties -> Appearance -> Edit Web Header (or
>Web Footer) Content and add the script include line. This is the only
>time ever to use an Admin tool that is a different version than the ARS
>server you are running.
>
>Fred
>
>
>-----Original Message-----
>From: Action Request System discussion list(ARSList)
>[mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED]
>Sent: Wednesday, April 13, 2005 8:31 AM
>To: [email protected]
>Subject: Mid-Tier 6.3 - Get IP Address and Host Name
>
>Mid-Tier ARS 6.3, Server ARS 6.3 patch 5
>
>Here is what I have in the web header (Form -> Current View ->
>Properties -
>>Appearance -> Edit Web Header Content):
>
><SCRIPT language=JavaScript>
><!-- Hiding JavaScript from HTML
>function env_ip_var()
>{
> var return_value = "<%=request.getRemoteAddr()%>";
> return (return_value)
>}
>function env_hostname()
>{
> var return_value = "<%=request.getRemoteHost()%>";
> return (return_value)
>}
>// End hiding JavaScript -->
></SCRIPT>
>
>
>Here are the two AL Run Process commands used to pull the values into
>the fields on the Remedy form:
>
>javascript: document.getElementById('arid536871086').value =
>env_ip_var();
>
>javascript: document.getElementById('arid536871081').value =
>env_hostname ();
>
>
>Instead of the actual IP Address and Host Name the fields are being set
>to:
><%=request.getRemoteAddr()%>
><%=request.getRemoteHost()%>
>
>I have tried this with Standard view and Fixed view.
>
>What commands do I need to get this information into a Remedy form?
>
>TIA.
>
>__________________________________________________________________________
_____
>UNSUBSCRIBE or access ARSlist Archives at http://www.ARSLIST.org
>(Support: mailto:[EMAIL PROTECTED])
>========================================================================
_______________________________________________________________________________
UNSUBSCRIBE or access ARSlist Archives at http://www.wwrug.org