IE.App-DHTML Dialogs - Accessing HTML Element Styles 
Author Message
 IE.App-DHTML Dialogs - Accessing HTML Element Styles

Hi,

I've hit a snag and hope a DHTML/CSS guru can help.  I can't seem to find a
reference for this in searching my usual sources, or anything on point in
past newsgroup posts.

How does one change a style set in the <html> tag for a WSH-based IE.App
dialog?  Specifically, I want to change a border setting for a demo dialog
that allows cycling to show different formatting styles, from outside the
HTML code.  To get the outset window dialog on IE6 without any gapping, I've
had to drop the border style into the <html> tag by trial and error (it
doesn't seem to work properly as a body style, like it does for IE5.5, no
matter how I play with margins; the <html> setting works on both versions of
IE).  I have no problem setting the style I want there -- just changing it.

I need to change

"<html style=""border-style:outset;border-width:5px"">"

to

"<html style=""border-style:none"">"

and back

I've tried every permutation at every level that I can think of for

oIEApp.Document.ParentWindow.Document. ... .Style.BorderStyle= "..."

but I cannot seem to find the appropriate syntax for accessing the <html>
element tag style.  I've tried adding an id, etc., but with no luck.

I'm sure it's something simple that I'm overlooking, but I'd really
appreciate a pointer.

Regards,
Joe Earnest

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system ( http://www.*-*-*.com/ ).
Version: 6.0.410 / Virus Database: 231 - Release Date: 10-31-02



Wed, 17 Aug 2005 11:36:51 GMT  
 IE.App-DHTML Dialogs - Accessing HTML Element Styles

Quote:
> Hi,

> I've hit a snag and hope a DHTML/CSS guru can help.  I can't seem to find
a
> reference for this in searching my usual sources, or anything on point in
> past newsgroup posts.

> How does one change a style set in the <html> tag for a WSH-based IE.App
> dialog?  Specifically, I want to change a border setting for a demo dialog
> that allows cycling to show different formatting styles, from outside the
> HTML code.  To get the outset window dialog on IE6 without any gapping,
I've
> had to drop the border style into the <html> tag by trial and error (it
> doesn't seem to work properly as a body style, like it does for IE5.5, no
> matter how I play with margins; the <html> setting works on both versions
of
> IE).  I have no problem setting the style I want there -- just changing
it.

> I need to change

> "<html style=""border-style:outset;border-width:5px"">"

> to

> "<html style=""border-style:none"">"

> and back

> I've tried every permutation at every level that I can think of for

> oIEApp.Document.ParentWindow.Document. ... .Style.BorderStyle= "..."

> but I cannot seem to find the appropriate syntax for accessing the <html>
> element tag style.  I've tried adding an id, etc., but with no luck.

> I'm sure it's something simple that I'm overlooking, but I'd really
> appreciate a pointer.

> Regards,
> Joe Earnest

In the past I've used documentElement to successfully get this element:
oIEApp.Document.documentElement
or maybe
oIEApp.document.getElementByTagName("HTML")(0)

Joe



Wed, 17 Aug 2005 19:27:31 GMT  
 IE.App-DHTML Dialogs - Accessing HTML Element Styles
Sorry, that second example should be:
oIEApp.document.getElementsByTagName("HTML")(0)
Joe
Quote:
> In the past I've used documentElement to successfully get this element:
> oIEApp.Document.documentElement
> or maybe
> oIEApp.document.getElementByTagName("HTML")(0)

> Joe



Wed, 17 Aug 2005 21:22:58 GMT  
 IE.App-DHTML Dialogs - Accessing HTML Element Styles
Joe,

Thank you very much.  The .DocumentElement works like a charm.  Now that I
know what I'm looking for, I'm able to bring up an MSDN workshop article on
it, but I would never have found it without the suggestion.  Looks like what
I needed to search for was "root node", which I would never have thought of.
Thanks again.  (BTW, thanks also for suggesting
.GetElementsByTagName("HTML")(0) -- I'm sure that'll be useful in the
future.  I'd tried getting the element by id after assigning an id, but that
didn't seem to work on this element.)

Regards,
Joe Earnest


| In the past I've used documentElement to successfully get this element:
| oIEApp.Document.documentElement
| or maybe
| oIEApp.document.getElementByTagName("HTML")(0)
|
| Joe

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.410 / Virus Database: 231 - Release Date: 10-31-02



Thu, 18 Aug 2005 01:02:51 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. - a WYSIWYG Authoring Tool for DHTML Dialogs: [B3 HTML Dialogs]

2. Dialogs/Message Box appearing behind IE window in VB DHTML

3. Making DHTML apps work with standard IE security (medium)

4. access to element's style denied

5. IE.App DHTML Disabling with IE6

6. Accessing elements in DHTML

7. Create Microsoft style HTML Help documentation for VB apps

8. Create Microsoft style HTML Help documentation for VB apps

9. Create Microsoft style HTML Help documentation for VB apps

10. VBS and IE for ASP and HTML with some DHTML<-- Can get confusing

11. Accessing HTML elements in a different frame w/ActiveX

12. HTML page within ActiveX Ctl accessing browser elements

 

 
Powered by phpBB® Forum Software