Go Back   CodingForums.com > :: Client side development > HTML & CSS

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 04-20-2012, 03:41 AM   PM User | #1
zendainc
New to the CF scene

 
Join Date: Apr 2012
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
zendainc is an unknown quantity at this point
HTA - Force Dynamically hidden/visible buttons to occupy the same space

Hi All,

I'm currently trying to put together a small HTA panel which I can use as a Quicklaunch bar so to speak. I have a drop down list which allows me to Select a Video Conferencing Room from a drop down list, this then makes the relevant buttons visible.

The functionality is mostly working, however my buttons are still occupying space while invisible.

Is there a way to make sure that all of my buttons occupy the same general area rather than forcing me to scroll down a page once they become visible?

Code:
<html lang="en">
<head>
	<title> VC Panel</title>
	<hta:application applicatname="VC Panel" scroll="yes" singleinstance="yes">
	<SCRIPT LANGUAGE="VBScript">

' Show/Hide Buttons based on Room
	Sub VisList
		If OptionChooser.Value = 1 Then
			Dellforce_Span.style.visibility="visible"
			Ridge4_span.style.visibility="hidden"
			Ridge7_Span.style.visibility="hidden"
		ElseIf OptionChooser.Value = 2 Then
			Ridge4_Span.style.visibility="visible"
			Dellforce_Span.style.visibility="hidden"
			Ridge7_Span.style.visibility="hidden"
		ElseIf OptionChooser.Value = 3 Then
			Ridge7_Span.style.visibility="visible"
			Ridge4_span.style.visibility="hidden"
			Dellforce_Span.style.visibility="hidden"
		Else
			Dellforce_Span.style.visibility="hidden"
			Ridge4_Span.style.visibility="hidden"
			Ridge7_Span.style.visibility="hidden"
		End If
	End Sub


' Set Window Size
    Sub Window_onLoad
        window.resizeTo 266,442
        Dellforce_Span.style.visibility="hidden"
        Ridge4_Span.style.visibility="hidden"
        Ridge7_Span.style.visibility="hidden"
    End Sub 
    
	</SCRIPT>
	
	<script type="text/javascript">
	
// Dellforce Road Buttons
	function openURL_WebSnapshot_Dellforce()
	{
		var shell = new ActiveXObject("WScript.Shell");
		shell.run("https://10.2.62.20/webpart.ssi");
	}
	function openURL_Calendar_Dellforce()
	{
		var shell = new ActiveXObject("WScript.Shell");
		shell.run("http://Glkgwema1/exchange/RBSDellforceRd.BLD8DunlopVCRoom@ConTec.com.au/calendar/");
	}
	function openURL_WebUI_Dellforce()
	{
		var shell = new ActiveXObject("WScript.Shell");
		shell.run("https://10.2.62.20");
	}
	function RunPutty_Dellforce()
	{
		var shell = new ActiveXObject("Wscript.Shell");
		shell.Run("putty -ssh tandberg@10.2.62.20");
	}
	
// Ridge Level 4 Buttons
	function openURL_WebSnapshot_Ridge4()
	{
		var shell = new ActiveXObject("WScript.Shell");
		shell.run("https://Glkgvc04/webpart.ssi");
	}
	function openURL_Calendar_Ridge4()
	{
		var shell = new ActiveXObject("WScript.Shell");
		shell.run("http://Glkgwema1/exchange/MeetingRoom@ConTec.com.au/calendar/");
	}
	function openURL_WebUI_Ridge4()
	{
		var shell = new ActiveXObject("Wscript.Shell");
		shell.run("https://Glkgvc04");
	}
	function RunPutty_Ridge4()
	{
		var shell = new ActiveXObject("Wscript.Shell");
		shell.run("putty -ssh tandberg@Glkgvc04");
	}
	
// Ridge Level 7 Buttons
	function openURL_WebSnapshot_Ridge7()
	{
		var shell = new ActiveXObject("WScript.Shell");
		shell.run("https://Glkgvc02/webpart.ssi");
	}
	function openURL_Calendar_Ridge7()
	{
		var shell = new ActiveXObject("WScript.Shell");
		shell.run("http://Glkgwema1/exchange/RBSRidgeSt7thFloorWindRoomCA@ConTec.com.au/calendar/");
	}
	function openURL_WebUI_Ridge7()
	{
		var shell = new ActiveXObject("Wscript.Shell");
		shell.run("https://Glkgvc02");
	}
	function RunPutty_Ridge7()
	{
		var shell = new ActiveXObject("Wscript.Shell");
		shell.run("putty -ssh tandberg@Glkgvc02");
	}
	</script>

</head>
<body STYLE="font:14pt arial; color:white; 
filter:progid:DXImageTransform.Microsoft.Gradient
(GradientType=1, StartColorStr='#808080', EndColorStr='#C0C0C0')">

<select size="1" name="OptionChooser" onChange="VisList">
    <option value="0"></option>
    <option value="1">Dellforce</option>
    <option value="2">Level 4 Ridge</option>
    <option value="3">Level 7 Ridge</option>
</select>
<br></br>

<div style="text-align:center">
<span id="Dellforce_Span">
<B><U>Dellforce ROAD</B></U><p>
	<input type="button" name="Dellforce_WebUI" onclick="openURL_WebUI_Dellforce()" value=" Web UI  ">
	<input type="button" name="Dellforce_WebSnapShot" onclick="openURL_WebSnapshot_Dellforce()" value="Snapshot">
	<input type="button" name="Dellforce_Calendar" onclick="openURL_Calendar_Dellforce()" value="Calendar">
	<input type="button" name="Dellforce_Putty" onclick="RunPutty_Dellforce()" value="  SSH       ">
</span>

<span id="Ridge4_Span">
<B><U>Ridge Street Level 4</B></U><p>
	<input type="button" name="Ridge4_WebUI" onclick="openURL_WebUI_Ridge4()" value=" Web UI  ">
	<input type="button" name="Ridge4_WebSnapShot" onclick="openURL_WebSnapshot_Ridge4()" value="Snapshot">
	<input type="button" name="Ridge4_Calendar" onclick="openURL_Calendar_Ridge4()" value="Calendar">
	<input type="button" name="Ridge4_Putty" onclick="RunPutty_Ridge4()" value="  SSH       ">
</span>

<span id="Ridge7_Span">
<B><U>Ridge Street Level 7</B></U><p>
	<input type="button" name="Ridge7_WebUI" onclick="openURL_WebUI_Ridge7()" value=" Web UI  ">
	<input type="button" name="Ridge7_WebSnapShot" onclick="openURL_WebSnapshot_Ridge7()" value="Snapshot">
	<input type="button" name="Ridge7_Calendar" onclick="openURL_Calendar_Ridge7()" value="Calendar">
	<input type="button" name="Ridge7_Putty" onclick="RunPutty_Ridge7()" value="  SSH       ">
</span>



</body>
</html>
zendainc is offline   Reply With Quote
Old 04-20-2012, 12:49 PM   PM User | #2
aaronhockey_09
Regular Coder

 
Join Date: Dec 2010
Posts: 411
Thanks: 21
Thanked 55 Times in 55 Posts
aaronhockey_09 is an unknown quantity at this point
instead of making them invisible.
Maybe try changing the CSS instead
and have the button change from display:none; to display:block;
aaronhockey_09 is offline   Reply With Quote
Reply

Bookmarks

Tags
controls, dynamic, hta, html, vbscript

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 10:24 AM.


Advertisement
Log in to turn off these ads.