No announcement yet.

Need help creating button to show graph

  • Filter
  • Time
  • Show
Clear All
new posts

    Need help creating button to show graph

    Can someone post an example on how to create a button in my quickview page that links to the temperature asp page but to a specific group. I tried but I could not figure it out.



    I added 3 links at the end to my links.htm file to show you how to get to 3 specific Trend graphs. You should be able to follow this example for your specific group definitions.

    The link click is serviced by the javascript submit form function. The form submitted contains the Group parameter delivered via the post method. For each new link you need to add a new form line as well.
    <pre class="ip-ubbcode-code-pre">
    &lt;!-- Start Contents of LINKS.HTM --&gt;
    | &lt;a href="/stat" target="_top"&gt;Status&lt;/a&gt;
    | &lt;a href="/tope" target="_top"&gt;Events&lt;/a&gt;
    | &lt;a href="/ctrl" target="_top"&gt;Control Device&lt;/a&gt;
    | &lt;a href="/logs.asp" target="_top"&gt;System Logs&lt;/a&gt;
    | &lt;a href="/temperature.asp" target="_top"&gt;Temperature&lt;/a&gt;
    | &lt;a href="/controlSystems.asp?Page=Sprinklers" target="_top"&gt;Sprinklers&lt;/a&gt;
    | &lt;a href="/forecast.asp" target="_top"&gt;Weather&lt;/a&gt;
    | &lt;a href="/cdj/NPFrame.asp" target="_top"&gt;Music&lt;/a&gt;
    | &lt;a href="/AVControl.html" target="_top"&gt;AV Control&lt;/a&gt;
    | &lt;a href="/Messages.html" target="_top"&gt;Messages&lt;/a&gt;
    | &lt;a href="/movies.asp" target="_top"&gt;Movies&lt;/a&gt;
    | &lt;a href="/cams.asp" target="_top"&gt;Camera&lt;/a&gt;
    | &lt;a href="/motion.asp" target="_top"&gt;Motion&lt;/a&gt;&lt;/p&gt;
    &lt;a href="/info.asp" target="_top"&gt;Info&lt;/a&gt;
    | &lt;a href="/remote_editor.asp" target="_top"&gt;Edit&lt;/a&gt;
    | &lt;a href="/mcsIniEditor.asp" target="_top"&gt;IniEdit&lt;/a&gt;
    | &lt;a href="/webAgent.asp" target="_top"&gt;WebAgent&lt;/a&gt;
    | &lt;a href="/tasks.html" target="_top"&gt;Tasks&lt;/a&gt;
    | &lt;a href="/UploadDatabase.html" target="_top"&gt;Analysis&lt;/a&gt;
    | &lt;a href="/Performance.asp" target="_top"&gt;Performance&lt;/a&gt;
    | &lt;a href="/X10Status.html" target="_top"&gt;X10 Status&lt;/a&gt;
    | &lt;a href="/remote_editor.asp" target="_top"&gt;Edit&lt;/a&gt;
    | &lt;a href="/comic.asp" target="_top"&gt;Comic&lt;/a&gt;
    | &lt;a href="/calculator.asp" target="_top"&gt;Calculator&lt;/a&gt;
    | &lt;a href="/logs.asp" target="_top"&gt;Logs&lt;/a&gt;
    | &lt;a href="/cdj/spinnertivo.html" target="_top"&gt;Spinner&lt;/a&gt;
    | &lt;a href="/lan.asp" target="_top"&gt;Lan&lt;/a&gt;
    | &lt;a href="/control2.asp" target="_top"&gt;Lights&lt;/a&gt;
    | &lt;a href="/AlarmClock.html" target="_top"&gt;AlarmClock&lt;/a&gt;
    | &lt;a href="/tvlistings/hstvadmin.asp" target="_top"&gt;TV&lt;/a&gt;
    | &lt;a href="javascript:document.default.submit()" target="_top"&gt;Default Graph&lt;/a&gt;
    | &lt;a href="javascript:document.sprinkler.submit()" target="_top"&gt;Sprinkler Trend&lt;/a&gt;
    | &lt;a href="" target="_top"&gt;Weather Trend&lt;/a&gt;
    &lt;form name="default" method="post" action="/temperature.asp"&gt;&lt;input type="hidden" name="Group" value="Default"&gt;&lt;/form&gt;
    &lt;form name="sprinkler" method="post" action="/temperature.asp"&gt;&lt;input type="hidden" name="Group" value="Sprinkler"&gt;&lt;/form&gt;
    &lt;form name="weather" method="post" action="/temperature.asp"&gt;&lt;input type="hidden" name="Group" value="Weather"&gt;&lt;/form&gt;
    &lt;!-- End Contents of LINKS.HTM --&gt;


      Thanks again Michael

      I got it to work by changing it to work with my quickview script. Here is what I used with Ph being the group name.

      response.write "&lt;td class='tablecellcustom' align='center' valign='middle'&gt;"
      response.write "&lt;form name='Ph' method='post' action='/temperature.asp'&gt;"
      response.write "&lt;input type='hidden' name='Group' value='ph'&gt;"
      response.write "&lt;input type='submit'value='PH graph'&gt;"
      response.write "&lt;/td&gt;&lt;/form&gt;"