Open graphical representation when you click a Script for the server
-
This post is deleted! -
@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 -
Have you tried a <script> tag that changes the window.location ?
-
@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. -
This was my test, worked to get my from the view page to the edit page.
var s = "<button onclick=\"window.location.href = 'http://localhost:8080/view_edit.shtm?viewId=1';\">"; if( value < 50 ) return s+"<b>HELLO WORLD</b></button>"; else return s+"<b>GOODBYE WORLD</b></button>";
-
@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 ?
-
Certainly welcome (although consider using Mango :P). You can use a <div> tag, and a closing </div> instead of the <button></button>
-
@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 -
var s = "<div onclick=\"window.location.href = 'http://localhost:8080/view_edit.shtm?viewId=1';\">"; if( value < 50 ) return s+"<b>HELLO WORLD</b></div>"; else return s+"<b>GOODBYE WORLD</b></div>";
-
SHOW !!!! Thank you, Thank you, Thank you.