Unanswered question

How to find the Servers name, in javascript

How Can I find the name of the server that a given request is going to in javascript?

If the server selected in the drop down is Test1 I need to alter the path for the page.

Stephen

Stephen L.
Stephen L.

Stephen L.

Level
0
5 / 100
points

Answers

Nouredine A.
Nouredine A.

Nouredine A.

Level
4
5000 / 5000
points
Team

There's no Javascript method to grab the current server name except if you use a NeoLoad variable in the hostname field of your server definition. In that case you could get the current value for that variable

But i'm not sure to understand your use case. Do you mean that you do not know the server that will be hit in advance?

At which point do you want to modify the URL path? Is it in a middle of your script or at the beginning?