473,387 Members | 1,611 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

accessing a javascript variable using IHTMLDocument

Alf
Hi,

I have the IHTMLDocument2 interface set up for a web page in an MFC VC++
prog.
eg

IHTMLDocument2* pHTMLDocument2;
hr = pMC->QueryInterface(IID_IHTMLDocument2,
(void**)&pHTMLDocument2 );

The page contains:
var variable_name = "variable data";
within a <SCRIPT> tag.
Is there a straightforward way to return the value of the variable_name
using the interface?

Of course I know I can do a hard-coded search using, say, 'c' char
functions, but I just wondered...

TIA

BTW
Apologies if this is the wrong forum - please redirect me as appropriate.

Jul 23 '05 #1
1 4889
In article <40***********************@news-text.dial.pipex.com>,
no*@home.com enlightened us with...
Hi,

I have the IHTMLDocument2 interface set up for a web page in an MFC VC++
prog.
eg


Microsoft newsgroups are great for these questions.

http://groups.google.com/groups?hl=en&lr=&ie=UTF-8
&group=microsoft.public.vc.mfc

or
msnews:microsoft.public.vc.mfc.*

--
--
~kaeli~
Time flies like an arrow. Fruit flies like a banana.
http://www.ipwebdesign.net/wildAtHeart
http://www.ipwebdesign.net/kaelisSpace

Jul 23 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Peter | last post by:
Hello, Two newbie questions: 1) I have a javascript file with a function in it. From this function I want to access a variable in another javascript file -which is not inside a function. I...
9
by: quikquic | last post by:
Suppose I download a html file with javascript in it, for example, <html> <body> <script language="JavaScript"> document.write("Hello"); </script> </body> </html>
5
by: ms_chika | last post by:
Hi to all, I have this problem in xsl wherein i want to access a variable in javascript and use it my xsl. How would i access or use a javscript variable in my xsl file? Please help. ...
6
by: Chris Styles | last post by:
Dear All, I've been using some code to verify form data quite happily, but i've recently changed the way my form is structured, and I can't get it to work now. Originally : The form is...
0
by: Christopher Bray | last post by:
Hello, I am trying to retrieve a javascript variable that I have assigned to the "document" object of a hosted IE control. I imported the IE control per the instructions at the following URL:...
1
by: CS Wong | last post by:
Hi, I have a page form where form elements are created dynamically using Javascript instead of programatically at the code-behind level. I have problems accessing the dynamically-created...
5
by: Jay | last post by:
Hi, Does anyone know if you can do an HTML POST to a plain html file using javascript to receive and parse the parameters, instead of using asp, php, or a plain-old cgi program? Thanks, Jay
3
by: Matthew Lock | last post by:
Hello, I am automating Internet Explorer in order to do some simple automated testing of a web application. How do I invoke Javascript functions in the web page I load? I can successfully start...
0
by: everlast88az | last post by:
I have created an active x web browser axWebBrowser1. I navigate to the url through: axWebBrowser1.Navigate(URL, ref Zero, ref EmptyString, ref EmptyString, ref EmptyString); ...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
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,...
0
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...
0
jinu1996
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...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.