Ewon TechForum
Providing technical solutions to technical requests



Create a dynamic link in Javascript to a LAN device through M2Web
simon Offline
eWON Support
#1
Not Solved
Hello,

Since we changed the M2Web proxy mechanisms, the URL used are different.

If your viewON project uses a javascript to open new Tab towards some LAN devices web interface through M2Web, here is the script to use :


Code:
var s=window.location.href;
if(s.indexOf('m2web.talk2m.com')==-1){
    win = window.open('http://'+IP);
    win.focus();
}
else{
    win = window.open("https://" + window.location.host.split("-")[1] + "/hashid/" + window.location.host.split(".")[0] + '/proxy/' + IPLAN);
    win.focus();
}

where IPLAN is the IP of the LAN device.

Simon
Reply




Possibly Related Threads…
17-05-2023, 03:51 PM
Last Post: simon
19-10-2022, 11:56 AM
Last Post: simon
29-10-2021, 01:21 PM
Last Post: simon
  Download from m2web Started by Julien_G
7 Replies - 5.345 Views
26-08-2021, 05:10 PM
Last Post: simon
06-04-2021, 07:04 PM
Last Post: nunober
04-07-2020, 03:02 PM
Last Post: ziozetti
21-01-2020, 04:38 PM
Last Post: LewisH304
  javascript on text input Started by AngelaT
0 Replies - 2.932 Views
07-01-2019, 10:13 PM
Last Post: AngelaT
03-09-2018, 01:47 PM
Last Post: samore



Users browsing this thread:
1 Guest(s)



Theme © Ewon 2019 - Forum software by © MyBB - Cookie policy