I am using the below code for retrieving the host ip address:
<script type="text/javascript" src="http://l2.io/ip.js"></script>
I need to retrieve the ip address from the above url and construct another URL something like this:
<script type="text/javascript" src="http://<above_ip_address>:8080/MonarchDemo/.."></script>
Both the scripts are present inside the <body>
tag of the html file like this:
<html>
<body>
<script type="text/javascript" src="http://l2.io/ip.js"></script>
<script type="text/javascript" src="http://<ip_address>:8080/MonarchDemo/.."></script>
</body>
</html>
Running this html file, the first script
is displaying the correct IP address but I am not able to replace that IP address in the second script
. Please guide.