SHOW !!!! Thank you, Thank you, Thank you.
Latest posts made by Prayol
-
RE: Open graphical representation when you click a Script for the server
-
RE: Open graphical representation when you click a Script for the server
@phildunlap
Your help, I have already been very helpful. I do not want to be inopportune, but by putting it this way: (var s = "<div> <onclick = " window.location.href = 'http: // localhost: 8080 / ScadaBR / views.shtm? ViewId = 8' ; \ "> <\ div>";) - I lose the click and redirect function. thankful -
RE: Open graphical representation when you click a Script for the server
@phildunlap said in Open graphical representation when you click a Script for the server:
var s = "<button onclick="window.location.href = 'http://localhost:8080/view_edit.shtm?viewId=1';">";
Thank you my friend. It worked! Now I'm just taking the button shape that was created around the chart to look perfect! It's possible ?
-
RE: Open graphical representation when you click a Script for the server
@phildunlap said in Open graphical representation when you click a Script for the server:
Have you tried a <script> tag that changes the window.location ?
I tried this way: onclick = 'javascript: window.location.href =' http: // localhost: 8080 / ScadaBR / views.shtm? ViewId = 5 ";
The problem, that is JavaScript is not my native language, so it is not a will and I do not know if it is correct what I did. -
RE: Open graphical representation when you click a Script for the server
@phildunlap Hello phildunlap, thanks for the help.
See, I use a variation of Mango here in Brazil called ScadaBR. As for DAO, it is working correctly in this variation. My problem is that I'm not sure how to insert the redirect after a click into the server script. I have to direct the user to this representation: views.shtm? ViewId = 8, how do I? I can not do it alone. Thank you -
Open graphical representation when you click a Script for the server
Good morning gentlemen,
please need to direct the user to a graphical representation after clicking on a graph created by the script for the server through onclick. Someone to help. Thank you.My code:
var dpDao = new com.serotonin.mango.db.dao.PointValueDao(); var dpVo = dpDao.getLatestPointValue('78'); var s = ""; if (dpVo.value=="true") s += "<img style='cursor:pointer;' src='graphics/Leds48/led48_green_1.png' onclick='mango.view.setPoint("+ point.id +", \""+ pointComponent.id +"\", \"false\");return false;'/>"; else s += "<img style='cursor:pointer;' src='graphics/Leds48/led48_white_0.png' onclick='mango.view.setPoint("+ point.id +", \""+ pointComponent.id +"\", \"true\");return false;'/>"; return s;