Hi,
I am trying to alter the refresh rate of an online webpage in a webbrowser
control using MFC. However the Timer ID is stored in a local variable and I
don't know how to access it. Is there a technique in Javascript that I might
be able to use/adapt?
I have a timer set within a prototype thus:
;HControl.proto type.setFLTimeo ut = function() {
var oFLTimeout = setTimeout("hCt rl.mkView.reloa dFL();", iFLTimeout);
}
But the timer Id oFLTimeout is local so, once the page is loaded how can I
access and stop the timer to prevent the page refreshing (or perhaps "reset"
it to my own bespoke rate)?
The only way I know how is using clearTimeout(), however this method
requires the timer ID.
Can I "list" all the timers somehow?
I really am stumped and would like some advise on how I can progress.
Thanks 18 2175
Joe wrote on 13 sep 2004 in comp.lang.javas cript: I am trying to alter the refresh rate of an online webpage in a webbrowser control using MFC. However the Timer ID is stored in a local variable and I don't know how to access it. Is there a technique in Javascript that I might be able to use/adapt?
I have a timer set within a prototype thus:
;HControl.proto type.setFLTimeo ut = function() { var oFLTimeout = setTimeout("hCt rl.mkView.reloa dFL();", iFLTimeout);
So use a global variable.
You are the boss of the code, aren't you?
===
var oFLTimeout;
HControl.protot ype.setFLTimeou t = function() {
oFLTimeout = setTimeout("hCt rl.mkView.reloa dFL();", iFLTimeout);
===
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress,
but let us keep the discussions in the newsgroup)
> So use a global variable. You are the boss of the code, aren't you?
No, I'm not!
Perhaps I wasn't clear enough, I said "online webpage" in other words I'm
downloading the page and its scripts and I want to inhibit/change the page
refresh timer.
Thanks
Joe wrote on 13 sep 2004 in comp.lang.javas cript: So use a global variable.
You are the boss of the code, aren't you?
No, I'm not!
Perhaps I wasn't clear enough, I said "online webpage" in other words I'm downloading the page and its scripts and I want to inhibit/change the page refresh timer.
Indeed you were not very clear.
So open the page,
go to view source,
change the code and save the local file,
then execute this local file,
if necessary after adding:
<base href="http://the original url here"> in the <head> section.
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress,
but let us keep the discussions in the newsgroup)
Joe said: Hi,
I am trying to alter the refresh rate of an online webpage in a webbrowser control using MFC. However the Timer ID is stored in a local variable and I don't know how to access it. Is there a technique in Javascript that I might be able to use/adapt?
Stop trying to cheat on whatever timed test it is
that you're trying to hack.
"Evertjan." <ex************ **@interxnl.net > wrote in message
news:Xn******** **********@194. 109.133.29... Joe wrote on 13 sep 2004 in comp.lang.javas cript: So use a global variable.
You are the boss of the code, aren't you?
No, I'm not!
Perhaps I wasn't clear enough, I said "online webpage" in other words I'm downloading the page and its scripts and I want to inhibit/change the page refresh timer.
Indeed you were not very clear.
So open the page, go to view source, change the code and save the local file, then execute this local file, if necessary after adding: <base href="http://the original url here"> in the <head> section.
Well I'm still not being very clear:)
I want to download the web page into my browser control.
I want to then execute a "function" within my MFC program through the
script interface which will allow me to "automatica lly" adjust the refresh
rate by altering the script function dynamically.
If the timerID is a global variable I can do it.
However as it is a local variable I can't.
"Manually" changing the page scripts isn't an option.
"Lee" <RE************ **@cox.net> wrote in message
news:ci******** *@drn.newsguy.c om... Joe said: Hi,
I am trying to alter the refresh rate of an online webpage in a
webbrowsercontrol using MFC. However the Timer ID is stored in a local variable and
Idon't know how to access it. Is there a technique in Javascript that I
mightbe able to use/adapt?
Stop trying to cheat on whatever timed test it is that you're trying to hack.
Thanks Lee, very useful. Of course, I'm not "cheating" anything.
Have you any constructive comments to make which might actually help me out?
Joe wrote on 13 sep 2004 in comp.lang.javas cript: Well I'm still not being very clear:)
I want to download the web page into my browser control.
What is a "browser control"?
I want to then execute a "function" within my MFC program through the script interface which will allow me to "automatica lly" adjust the refresh rate by altering the script function dynamically.
If the timerID is a global variable I can do it.
However as it is a local variable I can't.
"Manually" changing the page scripts isn't an option.
Changing the page by script should be possible.
I suppose you want to do some data mining.
Like this?
function getUrl(url) {
var http = new ActiveXObject(" microsoft.xmlht tp");
http.open("GET" ,url,false);
http.send();
return http.responseTe xt;
}
When the content of the file is in a local variable as a string,
you can replace parts of that string with multiple regex replace.
t = getUrl('http://yourTargettedWE Bsource.com/')
t = t.replace(/;HControl.proto type/,
'var oFLTimeout\n;HC ontrol.prototyp e')
t = t.replace(/var oFLTimeout/,'oFLTimeout')
After that you can execute the string as if it were a http file.
[How? I have to think about that ;-) ]
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress,
but let us keep the discussions in the newsgroup)
Joe said:
"Lee" <RE************ **@cox.net> wrote in message news:ci******* **@drn.newsguy. com... Joe said: > >Hi, > >I am trying to alter the refresh rate of an online webpage in awebbrowser >control using MFC. However the Timer ID is stored in a local variable andI >don't know how to access it. Is there a technique in Javascript that Imight >be able to use/adapt?
Stop trying to cheat on whatever timed test it is that you're trying to hack.
Thanks Lee, very useful. Of course, I'm not "cheating" anything.
You're welcome.
It's not your page. Somebody put a timer there for a
reason. You're trying to change it. That fits my
definition of cheating.
If it happens not to be a test, posting a solution (if
one existed) would allow others to cheat on such tests.
"Lee" <RE************ **@cox.net> wrote in message
news:ci******** *@drn.newsguy.c om... Joe said:
"Lee" <RE************ **@cox.net> wrote in message news:ci******* **@drn.newsguy. com... Joe said: > >Hi, > >I am trying to alter the refresh rate of an online webpage in awebbrowser >control using MFC. However the Timer ID is stored in a local variable
andI >don't know how to access it. Is there a technique in Javascript that I might >be able to use/adapt?
Stop trying to cheat on whatever timed test it is that you're trying to hack.
Thanks Lee, very useful. Of course, I'm not "cheating" anything.
You're welcome.
It's not your page. Somebody put a timer there for a reason. You're trying to change it. That fits my definition of cheating.
If it happens not to be a test, posting a solution (if one existed) would allow others to cheat on such tests.
So you're posting smart-arse comments from baseless assumptions when you
have no idea at all why I want to do what I'm asking.
That fits my definition of a ******* ******.
Have a nice day. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Erik Andersson |
last post by:
Hi!
<?
class Foo {
function getMessage() {
return "foo";
}
}
class Bar {
function getFoo() {
|
by: |-|erc |
last post by:
OK, here's the start of the index file I'm working on and its used for every page like so
index.php?action=register
index.php?action=logout
etc.
<?php
define ('IN_SITE', 1 );
define ('LOGGED_IN', FALSE );
|
by: Mohanasundaram |
last post by:
int i = 10;
int main()
{
int i = 20;
return 0;
}
Hi All,
I want to access the global variable i inside the main. Is there
|
by: Bob Day |
last post by:
VS 2003, vb.net , sql msde...
I have an application with multiple threads running. Its a telephony
application where each thread represents a telephone line. For code that
would be the same for each thread, I put in Shared methods as below. It is
only now that I am realizing the complexity of multiple threads accessing
shared methods. ...
|
by: Vincent |
last post by:
I have been trying to find some API routines that will allow me to
determine the name of the computer that is accessing a file on a
server. I have found the NetFileEnum call (returns the names of the
files in use and the names of the users accessing them). I have also
found the NetConnectionEnum call (returns the name of the computer that...
| |
by: Shilpa |
last post by:
Hi,
I just wanted to know whether we can access global variable within a
local block , where both variables are having same name.
For ex:
int temp=5 ;
{
int temp=10;
|
by: Kabo |
last post by:
Hi there, I'm currently working on a C# application that deals with dynamically created TabPages based (each TabPage represents a file that has been opened).
On each TabPage there is a DataGridView control as well as some other items including a Button whose purpose is to start/stop a timer clock of sorts. The main problem here is that all of...
|
by: jobbs64 |
last post by:
I'm working on a game called carpet fishing...long story...anyways I am having trouble working with the fish that I've created. I need to be able to access their Fish Class method move() so I can keep the fish placement random and changing. Also I want to be able to change the timer delay randomly...but both of these have to be triggered by a...
|
by: Dheeraj Joshi |
last post by:
Hi, I was wondering is there any technique available, so we can access the global variable inside a function if we have a local variable inside the function with the same name as global variable.
Example
#include<something.h>
int countVal = 100;
/*
Some stuff
*/
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in...
| |
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |