get hostname from a page

get hostname from a page

  
hi there.

I'm trying to develop an application and i need to get the current page hostname to put in a dynamic url from a external site.

example: http://tivtms:40919/cgi-bin/PCREMOTE/startsession.cgi?RemoteControl=Crystal.RC&Controller=BPC0D&Target=BPC0DES

in this example i want to substitute BPC0D for the current page hostname


I tried using the XIF HTTPRequestHandler but no action is working.

there is some action that give me the hostname????
Hi Filipe,

I think you can use the GetBookmarkableURL built-in function and some string functions to achieve what you want.

Cheers,
Tiago Simões
Hi thanks for the help.

with this function i get the hub url, but wat i need is

display their local computer name (i.e. the name of the computer the browser is running on).



cheers
Hi Filipe,

I'm not sure you can get the client computer name, but you can use HTTPRequestHandler extension's GetIP action to get the IP address of the client browser.

Cheers,
Tiago Simões
Hi Tiago

Has i said in the first post i tried the actions from the HttpRequestHandler but isn't work.

One question: to pass the value from variable into a url is #variablexpto# rigth?

maby helps if i use javascript (i'll go investigate).


thanks for the help

cheers

Filipe
Hi there

I find the solution for my problem whit the XIF GetMachineName


thanks for the help
Filipe
Hi there!


Now there is another problem.
I need to obtain the client machine name.
With the GetMachineName solution i get the server machine name, and now i need the client machine name that is using the web service.

I'm using javascripts function but the result is the same as the Xif GetMachineName

Another question, how can i put the result from a javascript function into a local variable.

thanks

Filipe
Hi,

I have the same problem with Mr. Filipe of getting the client's machine name.

Did someone found a workaround for this?

Thanks.

Boyet
Boyet,

Use javascript to get it, put the value in a (hidden) input widget, read the input widget's value (via the bound variable) server side.