Changing JScript global variable values dynamically
From: Peter (peter1234se_at_yahoo.se)
Date: 05/14/04
- Next message: EilefH: "contentEditable and caret/focus problem"
- Previous message: Igor Tandetnik: "Re: Detecting navigation errors using web browser control"
- Next in thread: Igor Tandetnik: "Re: Changing JScript global variable values dynamically"
- Reply: Igor Tandetnik: "Re: Changing JScript global variable values dynamically"
- Messages sorted by: [ date ] [ thread ]
Date: 14 May 2004 01:43:56 -0700
Using the IWebBrowser2 ActiveX plugin, I can access the html page's
IHTMLDocument interface and from there get access to
IHTMLScriptElement.
But is there a way to actually go into running scripts and dynamically
changing e.g global JScript variable values?
I have succeeded in changing variable initializations before the page
is displayed by calling the IHTMLScriptElement::put_text, but this
only affects the initial values.
I then tried to have a script setting the value
<SCRIPT LANGUAGE=javascript>
function setValue()
{
myglobal = 1;
}
</SCRIPT>
which periodically is called in the page, and when I want to change
the value I replace this scripts text. This did not seem to work.
Perhaps all scripts are preloaded and not read again every time they
are executed?
Any suggestions of how to do this?
Peter
- Next message: EilefH: "contentEditable and caret/focus problem"
- Previous message: Igor Tandetnik: "Re: Detecting navigation errors using web browser control"
- Next in thread: Igor Tandetnik: "Re: Changing JScript global variable values dynamically"
- Reply: Igor Tandetnik: "Re: Changing JScript global variable values dynamically"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|
|