Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


HTA hyperlink delay on click

 
Logged in as: Guest
arrSession:exec spGetSession 2,2,66585
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> HTA hyperlink delay on click
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 HTA hyperlink delay on click - 11/18/2008 1:44:51 AM   
  tinytim

 

Posts: 6
Score: 0
Joined: 11/16/2008
Status: offline
Well... technically it isn't a "hyperlink". It's more like a sub set on a div. Here let me humour you guys for a sec :

# <head> #


      

# <body> #


      

When I click the div the HTA freezes while IE is loading. Not a preference by anyone's standards. How to solve please?
 
 
Post #: 1
 
 RE: HTA hyperlink delay on click - 11/18/2008 5:42:52 AM   
  tinytim

 

Posts: 6
Score: 0
Joined: 11/16/2008
Status: offline
Soooooooooooooooooooooooooooo.... this is impossible right?

(in reply to tinytim)
 
 
Post #: 2
 
 RE: HTA hyperlink delay on click - 11/18/2008 5:56:19 AM   
  dm_4ever


Posts: 2728
Score: 46
Joined: 6/29/2006
From: Orange County, California
Status: offline
If you're just trying to launch an IE instance to a specific site and have no requirements to interact with it from the HTA....

Sub OpenIE(strURL)
   Dim objShell : Set objShell = CreateObject("WScript.Shell")
   objShell.Run "iexplore.exe " & strURL, 1, False
End Sub

_____________________________

dm_4ever

My philosophy: K.I.S.S - Keep It Simple Stupid
Read Me: http://www.visualbasicscript.com/m_24727/tm.htm
Frequently Asked Stuff: http://www.visualbasicscript.com/m_47117/tm.htm

(in reply to tinytim)
 
 
Post #: 3
 
 RE: HTA hyperlink delay on click - 11/18/2008 5:57:38 AM   
  TNO


Posts: 1402
Score: 16
Joined: 12/18/2004
From: thenewobjective.com
Status: offline
I'm confused more about what you are doing. Less humor and more details please. Does this sub exist in the webpage you are navigating to? are you dynamically adding a reference or what?

_____________________________

To iterate is human, to recurse divine. -- L. Peter Deutsch

(in reply to tinytim)
 
 
Post #: 4
 
 RE: HTA hyperlink delay on click - 11/18/2008 9:41:42 AM   
  tinytim

 

Posts: 6
Score: 0
Joined: 11/16/2008
Status: offline
@ dm_4ever : That works perfectly thanks.
@ TNO : 1. I had no intention for you to find me funny, 2. No I'm not adding a dynamic reference, 3. "I see dead people" by Mel Gibson, 4. My middle name is not Morgan, 5. When all else fails here's some code enjoy :


      

Having said that, IE is not my default browser. Mozilla is. In which case I'd simply replace "iexplorer.exe" with "firefox.exe" of the openIE Sub in the code dm_4ever supplied, but what if I wanted to launch an instance of the default browser without actually knowing what it is? Is this possible? Or perhaps I should be asking if this is a good idea?

< Message edited by tinytim -- 11/18/2008 9:42:55 AM >

(in reply to dm_4ever)
 
 
Post #: 5
 
 RE: HTA hyperlink delay on click - 11/18/2008 9:59:09 AM   
  TNO


Posts: 1402
Score: 16
Joined: 12/18/2004
From: thenewobjective.com
Status: offline
Launching the url through the Run dialog will launch the default browser (or add a tab to the existing instance). The downside is that you will then have to iterate through all the active applications to find the one you just started (looking for document.title perhaps) and then using GetObject() to bind a reference to it.

_____________________________

To iterate is human, to recurse divine. -- L. Peter Deutsch

(in reply to tinytim)
 
 
Post #: 6
 
 RE: HTA hyperlink delay on click - 11/18/2008 11:01:46 PM   
  tinytim

 

Posts: 6
Score: 0
Joined: 11/16/2008
Status: offline
In that case I'll use the bellow code for now to make things easier :

Sub hyperlink( sURL )
  window.document.body.style.cursor = "wait"
  Dim oShell : Set oShell = CreateObject( "WScript.Shell" )
  oShell.Run "iexplore.exe " & sURL, 0, True
  window.document.body.style.cursor = ""
  Set oShell = Nothing
End Sub

And get cracking on what you've said later.
Thanks TNO.

(in reply to TNO)
 
 
Post #: 7
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> WSH & Client Side VBScript >> HTA hyperlink delay on click Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts