Nice job!
If you are using a modified version of the D-Link module, you can reduce the top margin (i.e. move the camera image higher) by adding a
DIV with a
STYLE tag and appropriate parameters. For example, here's what you need to change in the
RenderHTML function:
Code:
' >>> Next line was added
strOutput = "<div STYLE=""Position:absolute;Left:7px;Top:-30px;Color:#FFFFFF;width:95%;font-family:Tahoma;font-size:14pt;font-weight:bold;text-align:center;padding-top:2px;border-style:inset;border-color:#A9A9A9;Overflow:auto;"">"
if strAddr = "?.?.?.?" or strAddr = "" then
' >>> Next line was modified
strOutput = strOutput & strHeader & "IP Address not defined!"
else
'output java applet
' >>> Next line was modified
strOutput = strOutput & "<CENTER>"
strOutput = strOutput & "<APPLET name=" & chr(34) & "cvcs" & chr(34) & " CODEBASE=" & chr(34) & "http://" & strAddr & ":" & iPort & "/" & chr(34) & " CODE=" & chr(34) & "xplug.class" & chr(34) & " WIDTH=" & iW & " HEIGHT=" & iH & ">"
strOutput = strOutput & "<param name=" & chr(34) & "RemotePort" & chr(34) & " value=80>"
strOutput = strOutput & "<param name=" & chr(34) & "Timeout" & chr(34) & " value=5000>"
strOutput = strOutput & "<param name=" & chr(34) & "RotateAngle" & chr(34) & " value=0>"
strOutput = strOutput & "<param name=" & chr(34) & "PreviewFrameRate" & chr(34) & " value=2>"
strOutput = strOutput & "<param name=" & chr(34) & "DeviceSerialNo" & chr(34) & " value=" & chr(34) & chr(34) & ">"
strOutput = strOutput & "</APPLET>"
strOutput = strOutput & "</CENTER>"
end if
' >>> Next line was added
strOutput = strOutput & "</div>"
Note that the "Top" parameter is a negative value and will move the image higher within the web-page. To get an idea of what the
STYLE tag's parameters do, tweak each value and then refresh Premise Browser to see the resulting effect.
For example, "
border-style:inset;
border-color:#A9A9A9;
Overflow:auto;" will create a dark gray, inset border around the image and display scroll bars only if the contents exceed the viewable space. It is all just standard CSS stuff and
well-documented on several web sites.
If you are using the
Webframes module and you wish to reduce the top margin, go to
Modules > Plugins > Selectors > Webframes and locate the "
Top" property in the CSS section. Change the "Top" property to a negative value and the embedded image will be displayed higher on the page (see the attached image).