|
-
Oct 17th, 2001, 05:21 PM
#1
Thread Starter
Lively Member
Newbie Questions #1 and #2
Sorry to be a bother. I've got some questions that I couldn't find answers to after scouring the past threads:
#1) I'm trying to create a simple program using the WebBrowser control. I need to fill in a couple of textboxes on a web page, click a button, and click a link, etc.
I've seem some code that allows me to grab names and destinations of links, but how do I actually 'click' the link via code? The link position changes from time-to-time, so my original (not-so-bright) idea of using 'Sendkey' to send a bunch of tabs until the proper link is selected doesn't work so well.
So, is there a way to choose a particular link and 'click' it via the WebBrowser control? Same with choosing a given textbox or button.
#2) Here's a silly newbie question from one who obviously doesn't know much about ASP. If a page is updated, can I include some ASP code that will re-send the updated page to all active sessions?
In other words, I've seen web pages with tags such as:
<META HTTP-EQUIV="REFRESH" CONTENT="60">
which I gather tells the browser to refresh every 1min. Is there a way to do this backwards (ie, from the web server) and contact all active sessions to send the new page?
I would suspect the answer to my own question is 'no'. But someone who is much wiser could possibly enlighten me, or suggest an alternative way of accomplishing this.
Thanks!
- Kronix
-
Oct 17th, 2001, 07:04 PM
#2
Good Ol' Platypus
For #2 I haven't heard of any ways to do this... maybe just have those <META> tags on every page?
All contents of the above post that aren't somebody elses are mine, not the property of some media corporation. 
(Just a heads-up)
-
Oct 18th, 2001, 06:21 AM
#3
Black Cat
For #2, there is Server Push, but as far as I know only Netscape supports it.
Josh
Get these: Mozilla Opera OpenBSD
I have books for sale: "MCSD in a Nutshell" and "VB Distributed Exam Cram" - PM me for details. Will also trade for a decent ATX Pentium 2 MB/CPU/RAM combo.
-
Oct 19th, 2001, 02:12 PM
#4
Thread Starter
Lively Member
Well, it appears that both Saxtraxi and JoshT are correct about my second question.
I've done some casual research into the "server push" idea Josh mentioned, and indeed it seems to be limited to Netscape.
Which leaves me stuck. I've got a VB program that can update web pages, but no way to "force" the updated info down to any active session users.
I assume it's a Bad Thing (tm) to add the META tags on each page requesting updates every second or two.
I guess I'll have to rethink my ideas, here... As for my first question, does anyone have a link or doc to point me to that would describe (in gruesome detail!) how to use the HTMLDocument Object in VB? I seem to have access to a whole lot of info about the loaded page... but it's hit-and-miss for a newbie to figure out exactly what he's doing with it.
- Kronix
-
Oct 19th, 2001, 02:53 PM
#5
Thread Starter
Lively Member
Hrm. What does APPLICATION.LOCK and APPLICATION.UNLOCK do?
-
Oct 19th, 2001, 05:36 PM
#6
Member
for question #2:
You could create a hidden frame that updates itself every minute or so and let a javascript check if the users need to update the page they are on. If they do need to update, display an alert saying so 
This is the only way I can think of.
David
"There are no must's in life unless you provide for someone else than yourself"
-
Oct 22nd, 2001, 07:01 AM
#7
Black Cat
Hrm. What does APPLICATION.LOCK and APPLICATION.UNLOCK do?
It locks Application scope variables so the page that calls this is the only one that can access them until they are unlocked. It would prevent other pages from modify values at the same time.
Josh
Get these: Mozilla Opera OpenBSD
I have books for sale: "MCSD in a Nutshell" and "VB Distributed Exam Cram" - PM me for details. Will also trade for a decent ATX Pentium 2 MB/CPU/RAM combo.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|