Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Display Web Page within HTA InnerHTML

Status
Not open for further replies.

pshelfo

IS-IT--Management
Apr 27, 2004
16
US
I am trying to create a toolbar HTA which can launch a web page within the InnerHTML window thus allowing the toolbar to be always visible. Is this possible? This is the code I have so far:

<html>

<head>
<title>Toolbar Example</title>
</head>

<Script Language="VBScript">
Sub Window_Onload
CommandButton1.Width = 32
CommandButton1.Height = 32
CommandButton1.Picture = LoadPicture("test.ico")
End Sub

Sub CommandButton1_Click()
DataArea.InnerHTML =

End Sub
</Script>

<body topmargin="0" rightmargin="0" leftmargin="0">

<table width="100%" border="1" width="100%" bordercolorlight="buttonface"
bordercolordark="buttonface" style="border-collapse:collapse">
<tr>
<td width="100%" bgcolor="buttonface">
<object classid="clsid:D7053240-CE69-11CD-A777-00DD01143C57" id="CommandButton1"></object>
</td>
</tr>
<table>

<p>&nbsp;<p>
<blockquote>

<span id=DataArea></span>


</blockquote>
</body>
</html>
 
I doubt for a span element DataArea.innerHTML would "launch" web page. To salvage the implementation, may be this will help.
[1]
><span id=DataArea></span>
[tt]<iframe name="DataArea" id="DataArea"></iframe>[/tt]
[2]
>DataArea.InnerHTML = [tt]top.frames("DataArea").window.location="[/tt]

I see not quite neat thing, but, that's a start.
 
Thanks for trying to salvage the process. I tried adding the statements you suggested but the code is throwing errors that the object does not support the DataArea.InnerHtml method. Is there another way to display a web page in a HTA other than using InnerHtml?
 
My posted lines are supposed to replace your corresponding lines. That's what I meant.
 
Oppsss...I replaced your code with mine and it worked. However I am trying to pretty up the screen by aligning the frame and maximizing for resolution. When I use Height="100%" Width="100%" or Align="center" the statements are ignored. I can set Width="100" or Align="100" but that is per pixel.

<iframe name="DataArea" id="DataArea" height="95%" width="100%"></iframe>

Do you have a recommedation of a good reference I can use for sytle changes? All the references I have searched on do not work with my statement.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top