Announcement

Collapse
No announcement yet.

HTML and Links.htm

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    HTML and Links.htm

    I was wondering if it is possible to write html code on my links.htm page that will display the device status of "A3". Thanks.

    #2
    Beach,
    You could change your links.htm file to redirect to an asp page and od any thing you want.

    Add this to you links.htm file:
    PHP Code:
    <HTML>
    <
    HEAD>
    </
    HEAD>
    <
    BODY>
      <
    SCRIPT language="Javascript" src="/links.asp"></SCRIPT>
    </
    BODY>
    </
    HTML
    Then create a file called links.asp and put your links in that file like
    PHP Code:
    links "<center><A href=""/quickview.asp"">Quick View</a>" &_
     
    "| <A href=""/calendar.asp"">Calender</a>" &_

     
    "| <A href=""/mail"">E-Mail</a>" 
     
    on error resume next
        
    if hs.MailMsgCount 0 then
            links 
    links "<img src=""/new_messages.gif"" border=""0"">" 
        
    end if
     
    links links "| <A href=""/tope"">Events</a>" &_
     
    "</center>"
    Response.Write "document.write('" links "');" 
    This example shows a gif if you have new mail.
    💁‍♂️ Support & Customer Service 🙋‍♂️ Sales Questions 🛒 Shop HomeSeer Products

    Comment


      #3
      Ok, but I am using doo menu bar. I just want to add some html code under the bar that gives the status of my homeseer, which would either be "Awake" or "Sleep" mode. Depending on the mode, my hs responds in different ways. I would also like to add the temperature somewhere under the bar. Can I do this with html, or do I have to use asp? I know html will work for links and stuff, but I don't know how to put sevice status in html. Thanks.

      Comment


        #4
        Dynamic data needs asp.
        💁‍♂️ Support & Customer Service 🙋‍♂️ Sales Questions 🛒 Shop HomeSeer Products

        Comment


          #5
          Thanks. Could I do an include attached to the html file and only have it put the one line under doo menu in asp?

          Comment


            #6
            Beach,

            There is a user of DooMenubar that is doing something similar to what you want. He inserts his voice mail count in one of the captions for a menu item. Based on the e-mail conversation I had with him, here is what he is doing:

            1. Place "Voice Mail #VM_COUNT#" in the caption for the menu item.
            2. Check the option to use an alternate links file, see general settings on /doomenubar_config calling the file altlinks.htm.
            3. Create an event to replace #VM_COUNT# with the value of the device and write out the links.htm with this update and triggered on a change to that device. Here is a script snippet that should do this:

            Code:
             
            sub main()
            dim fso, ts, NewFile, strFileContents, strInFile, strOutFile
            strInFile = "C:\program files\homeseer\html\altlinks.htm"
            strOutFile = "C:\program files\homeseer\html\links.htm"
            set fso = CreateObject("Scripting.FileSystemObject")
             
            'get the contents of alt links
            set ts = fso.OpenTextFile(strInFile)
            strFileContents = ts.ReadAll
            ts.Close
            set ts = Nothing
            'replace the value of the device
            strFileContents = replace(strFileContents, "#VM_COUNT#", hs.DeviceString("A3"))
            'write out the new links
            set NewFile = fso.CreateTextFile(strOutFile, true)
            NewFile.Write strFileContents
            NewFile.Close
            set NewFile = Nothing
            set fso = Nothing
            end sub
            Hopefully this will spark some ideas,
            Phil Spencer

            Comment


              #7
              Matrix,

              Thanks for helping. That's not exactly what I want to do. I would like to add another bar underneath the doo menu bar, similar to Tom kern's, and place info from hs in that bar like hs status, temperature, etc. I'll look into it more.

              Comment

              Working...
              X