PDA

Click to See Complete Forum and Search --> : this is a test...please disregard


Eugene Wilson
May 18th, 2005, 09:04 PM
Dim dhtmldoc As HTMLDocument
Dim dhtmlbody As HTMLBody
Dim DHTMLEC As HTMLElementCollection
Dim DELEM As IHTMLElement
Dim obj As Object


' Dim dhtmlelement As HTML

Set dhtmldoc = WebPreview.Document
Set dhtmlbody = WebPreview.Document.body


Set dhtmlbody = WebPreview.Document.body

' dhtmlbody.outerHTML = "<h1>hi</h>"
' dhtmlbody.innerHTML = "<body><h1>there</h></body>"
WebPreview.Navigate2 (ckRSlash(G_UserDir) + "comp.html")

Call ClearWebPreview

WebPreview.Document.body.insertAdjacentHTML "afterEnd", "<h1>there</h>"
WebPreview.Document.body.insertAdjacentHTML "BeforeEnd", "<h1>tdddhere</h>"

WebPreview.Document.body.insertAdjacentHTML "BeforeEnd", "<Table BORDER=2><TR><TD ID=MARK>hello</TD></TR></Table>"

'Set DHTMLEC = WebPreview.Document.All("TD")
'For Each OBJ In DHTMLEC
' Debug.Print
'Next

Dim hctableCellEC As IHTMLElementCollection
'Dim hFontElement As IHTMLFontElement
Dim hTableCell As HTMLTableCell
Dim cellcounter As Integer

cellcounter = 1
Set hctableCellEC = WebPreview.Document.body.getElementsByTagName("TD")


For Each hTableCell In hctableCellEC
'Debug.Print "innertext" & hCell.innerText

'hCell.Color
If cellcounter = hctableCellEC.Length Then
Call hTableCell.insertAdjacentHTML("BeforeEnd", "<TR><TD>holy moly</TD></TR>")
Else
cellcounter = cellcounter + 1
End If
Next
cellcounter = 1
Set hctableCellEC = WebPreview.Document.body.getElementsByTagName("TD")
For Each hTableCell In hctableCellEC
'Debug.Print "innertext" & hCell.innerText

'hCell.Color
If cellcounter = hctableCellEC.Length Then
Call hTableCell.insertAdjacentHTML("BeforeEnd", "<TR><TD>holy moly</TD></TR>")
Else
cellcounter = cellcounter + 1
End If
Next

Eugene Wilson
May 18th, 2005, 09:08 PM
test

Eugene Wilson
May 18th, 2005, 09:09 PM
:) :cry:

Bruce Fox
May 18th, 2005, 09:17 PM
Eugene,

There is a test Forum for this purpose here: http://www.vbforums.com/forumdisplay.php?f=39

Sir Loin
May 18th, 2005, 09:23 PM
What exactly do you test in the test forum?

MartinLiss
May 18th, 2005, 09:38 PM
What exactly do you test in the test forum?Anything you want.

BTW I moved this thread.