Announcement

Collapse
No announcement yet.

Forms - Inputs using variables?

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

    Forms - Inputs using variables?

    I want to have a form use inputs with all items as a variable... here's what I've tried:


    #2
    I'll assume the first line is inside the script tags (<% %> ). To use a script variable in the html part of your asp put it in script tags:

    <td><form method="get" action="HomeControl.asp"><input<%=gOn%>></form></td>


    Paul

    Comment


      #3
      Can you check out what I'm doing and let me know what you think?
      I'm trying to write an ASP page that will evaluate a device string and change the images it displays depending on the result of the string.

      Basically, trying to make a clickable dim graphic bar that changes with the device status.

      I have attached the ASP page. The parts I'm working on are labeled:

      ' Dim Graph Display Function

      and

      <%'* Test *%>
      Attached Files

      Comment


        #4
        That's been a battle to work into my control.asp structure but I think I've beat it. Here's my current control.asp. I just cleaned it up and put some comments in. Check out the WriteDimBarIcon and ImageCommandButton functions. I'm using a mix of FormCommandButton and ImageCommandButton in the table row for "Upstairs Hall". In the next row, "Paul's Computer Light", I'm just using ImageCommandButton so there's no need for any form tags there - each ImageCommandButton is it's own form. To keep the image buttons grouped together they're in a table within a table. The style="margin:0" keeps the forms lined up right in Internet Explorer, Audrey's browser ignores them but looks alright anyway.


        Paul
        Attached Files

        Comment


          #5
          I would like to extend this to actually change the graphic icons based on the status. I want to use the "controls" as the device status display. So if the light is dimmed to 50%, then the first few bars would be 'lit' (I created dim bard with yellow for 'lit') and the rest would be "dimmed"

          This would eliminate the need for a dedicated status icon.

          Comment


            #6
            Cool idea! How about this? I added 2 functions, WriteDimBarControlFor and DimBarButton. I added another "Paul's Computer Light" row to my table to test it out.


            Paul
            Attached Files

            Comment

            Working...
            X