mdolle
asked on
Can I use ActiveXObject("Shell.Application") to get meta tags using DOM
Hello Experts!
I have code that creates a Shell.Application and then goes thru to identify instances of IE, and it is working great( thanks to your answers to my last question )
var objShell = new ActiveXObject("Shell.Appli cation");
var objShellWindows;
objShellWindows = objShell.Windows();
if (objShellWindows != null) {
for (var i = 0; i < objShellWindows.Count; i++) {
objIE = objShellWindows.Item(i);
if (objIE) // if there is an objIE, check if it is MPS page
{
if ( objIE.LocationURL == MPS_URL ) { myIE = objIE.LocationURL; }
var ie = new ActiveXObject( "InternetExplorer.Applicat ion" );
ie.Navigate( objIE.LocationURL ); //LocationURL does not have a value yet
ie.Visible = 1;
alert("loading"); //let document load, need something like sleep
doc = ie.document;
mtags = doc.getElementsByTagName(" META");
.
......
The problem is that I need to check the values of meta tags once the page loads. I tried to use objIE.document, but get error that document is not supported. So, I created var ie = new ActiveXObject( "InternetExplorer.Applicat ion" ); - which I am not sure is necessary or even does what I need- to check ie.document, however when I navigate to objIE.LocationURL, that is still blank, so I cannot check the meta tags. How can I check the meta tags, it seems like it would be the easiest part of this whole thing..
thanks!
Myra
I have code that creates a Shell.Application and then goes thru to identify instances of IE, and it is working great( thanks to your answers to my last question )
var objShell = new ActiveXObject("Shell.Appli
var objShellWindows;
objShellWindows = objShell.Windows();
if (objShellWindows != null) {
for (var i = 0; i < objShellWindows.Count; i++) {
objIE = objShellWindows.Item(i);
if (objIE) // if there is an objIE, check if it is MPS page
{
if ( objIE.LocationURL == MPS_URL ) { myIE = objIE.LocationURL; }
var ie = new ActiveXObject( "InternetExplorer.Applicat
ie.Navigate( objIE.LocationURL ); //LocationURL does not have a value yet
ie.Visible = 1;
alert("loading"); //let document load, need something like sleep
doc = ie.document;
mtags = doc.getElementsByTagName("
.
......
The problem is that I need to check the values of meta tags once the page loads. I tried to use objIE.document, but get error that document is not supported. So, I created var ie = new ActiveXObject( "InternetExplorer.Applicat
thanks!
Myra
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER