tags:

views:

553

answers:

5

I have tried to put

<a href="page2.hta">Go Page 2</a>

inside a .hta file. However, it opens a browser when I click on the link.

Is it possible to make it open page2.hta within the same window?

A: 

I think you need a target="_self" in the a href, or a <base target="_self"> in the header of the hta.

David
I have tried but it seems not work on hta
Alan
A: 
<a href="page2.hta" target="_self">Go Page 2</a>

_self renders the link in the current frame (useful for overriding a BASE TARGET)

rahul
I have tried but it seems not work on hta
Alan
Which is your browser?
rahul
I run the .hta as a windows application
Alan
A: 

Create a mime-type for .hta files on the web server.

Gthompson83
I need to run the hta as a desktop application instead of web
Alan
+1  A: 

If you're implementing a Wizard (or whatever), use the HTA Application as a wrapper around an IFRAME.

http://msdn.microsoft.com/en-us/library/ms536496(VS.85).aspx

When you want to flip between "pages", navigate that subframe rather than trying to navigate the .HTA itself.

EricLaw -MSFT-
It works! Thanks!
Alan
+2  A: 

You need to make the HTA "navigable".

<hta:application navigable="yes" />
Thanks. It works perfectly!
Alan