Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

HTA iframe Content?

HTA iframe Content?

HTA iframe Content?

Hi There,

Apologies if this has cropped up elsewhere, I did a search but couldn't find anything..

I found some code that launches an explorer type window inside an HTA & amended it, but it uses an iframe to load the content. - What I'd like to do is to return the value (name, path) of a folder clicked in the left window & put that value in the right window.. Is this possible at all?

The code (including error & probably obsolete code) is pasted below which you can copy & paste to see what I mean.

If this can't be done then fair enough, I just don't know the properties I can expose from the iframe content.

Any help or guidance appreciated.

CODE -->

		<title>Simple Browser</title>
			APPLICATIONNAME="Simple Browser"

<script language="VBScript">
Sub Window_Onload
	window.resizeTo 1024, 768
	window.moveTo 200, 80
	Set objNetwork = CreateObject("Wscript.Network")
	Set objFSO = CreateObject("Scripting.FileSystemObject")
	Set colDrives = objFSO.Drives
		For Each objDrive in colDrives
			Set objFolOption = Document.CreateElement("OPTION")
			objFolOption.Text = objDrive.DriveLetter
			objFolOption.Value = objDrive.Path
End Sub

Function NavLocal()
	document.getElementById("LocalData").src = LocalDrive.Value & "\"
End Function

Function NavRemote()
	document.getElementById("RemoteData").src = 'Maybe something here???
End Function

Function EchoFol
val3 = document.getElementById("LocalData").contentWindow.testTxt.value
MsgBox val3
End Function
Sub ReLoad
	location.reload True
End Sub
Sub RunExit
End Sub

	<table border="1" style="width:100%;height:95%;">
				<b>Local Drive:</b><select NAME=FolLocation id=LocalDrive style="width:50px" onChange="NavLocal()"><b>:\</b>
				<input type=button value="Browse" id=local_button style="background-color:green; color:#fff; font-weight:bold;" onclick="NavLocal()"><br>
				<iframe id=LocalData style="width:100%;height:95%" application="yes"></iframe><br>
				<!--<b>Remote Path: \\</b><input type=text value="" id=RemotePath style="width:40%"><b>\</b>-->
				<!--<input type=text value="C" id=RemoteDrive style="width:20"><b>$</b>-->
				<!--<input type=button value="Remote" id=remote_button style="background-color:green; color:#fff; font-weight:bold;" onclick="NavRemote()"><br>-->
				<iframe src="" id=RemoteData style="width:100%;height:95%" application="yes"></iframe><br>
				<input type=button value="Refresh" id=reload_button style="background-color:blue; color:#fff; font-weight:bold;" onclick="ReLoad()">
				<input type=button value="Cancel / Quit" id=Exit_button style="background-color:blue; color:#fff; font-weight:bold;" onclick="RunExit()">

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close