Quote Originally Posted by szpilman
thnx thread1 and david.
the web browser control work well.
but it raise another question is..
suppose i have made the TABLE succesfully, then
how to make that HTML TABLE can interact with the VB6 FORM ?
lets say FORM1 contain the TABLE from WEB BROWSER control,
if i right click on the cell, there is an event that will show another form, but the form is from VB6 not HTML page.

thnk U.

rgrds,

szpilman

well, thanks to the control's TitleChange event . .. the event fires whenever there is a change in the document.title or whenever you assign a value to this property. since this event also fires upon load of the document, perhaps you can declare your own format that can be filtered out.. here is the revised code, see how i raised the event in the script

Code:
  wbb.Navigate "about:blank"
  
  wbb.Document.open
    
  wbb.Document.writeln "<html>" & vbCrLf & _
                       "<head>" & vbCrLf & _
                       "<style type=""text/css"">" & vbCrLf & _
                       "td {white-space: nowrap;}" & vbCrLf & _
                       "</style>" & vbCrLf & _
                       "<script type=""text/javascript"">" & vbCrLf & _
                       "document.onmousedown = function () { if (event.button == 2) { this.title = 'RIGHT CLICK DATA: ' + this.elementFromPoint(event.x, event.y).innerHTML; return false; } }" & vbCrLf & _
                       "</script>" & vbCrLf & _
                       "</head>"
  
  wbb.Document.writeln "<body oncontextmenu=""return false;"">" & vbCrLf & _
                       "<table border=""1"" cellspacing=""0"">" & vbCrLf & _
                       "<thead style=""font: bold 14px arial; color: blue;"">" & vbCrLf & _
                       "<tr>" & vbCrLf & _
                       "  <td>Item #</td>" & vbCrLf & _
                       "  <td>Quantity</td>" & vbCrLf & _
                       "  <td>Code</td>" & vbCrLf & _
                       "  <td>Description</td>" & vbCrLf & _
                       "</tr>" & vbCrLf & _
                       "<tbody style=""font: 10px arial;"">" & vbCrLf & _
                       "<tr>" & vbCrLf & _
                       "  <td>1</td>" & vbCrLf & _
                       "  <td>50</td>" & vbCrLf & _
                       "  <td>USBFD2G</td>" & vbCrLf & _
                       "  <td>USB Flash Drive 2GB</td>" & vbCrLf & _
                       "</tr>" & vbCrLf & _
                       "<tr>" & vbCrLf & _
                       "  <td>2</td>" & vbCrLf & _
                       "  <td>15</td>" & vbCrLf & _
                       "  <td>LCDMON</td>" & vbCrLf & _
                       "  <td>TFT LCD Monitor</td>" & vbCrLf & _
                       "</tr>" & vbCrLf & _
                       "</table>"
  wbb.Document.writeln "</body></html>"
                       
  wbb.Document.Close
Code:
Private Sub wbb_TitleChange(ByVal Text As String)
  If Text Like "RIGHT CLICK DATA:*" Then
    MsgBox Text    
  End If
End Sub