Guest_imported
New member
- Jan 1, 1970
- 0
I'm wanting to us the web browser control (part of Microsoft Internet controls) to display html documents within a VB application.
The web browser control is to display a number of html 'templates' I have created, and then feed in certain pieces of dynamic information (from a databse) to the html document from VB using the Document Object Model.
Currently, I'm using the div tag within the html page to insert bits of information, and all is working well using the following line in VB:
iDoc.All(strAttrName).insertAdjacentHTML "BeforeBegin", strValue
However, if I have two divs next to each other in the html then each one is inserted onto a new line. For example if I'm trying to build up a name then it's not really appropraite to have the forename on one line and the surname on the next.
e.g.
This...
<p><font face="Arial"><div id="FORENAME"> </div> <div id="SURNAME"> </div></font></p>
Gives this...
Name:
Joe
Bloggs
So, are there any other tags other than the div tag which would not cause a carriage return? I'm not really interested in concatenating the two values together in VB before inserting them, as that would involve hard coding checks for certain fields, and would not be a generic solution.
Any ideas anybody???
The web browser control is to display a number of html 'templates' I have created, and then feed in certain pieces of dynamic information (from a databse) to the html document from VB using the Document Object Model.
Currently, I'm using the div tag within the html page to insert bits of information, and all is working well using the following line in VB:
iDoc.All(strAttrName).insertAdjacentHTML "BeforeBegin", strValue
However, if I have two divs next to each other in the html then each one is inserted onto a new line. For example if I'm trying to build up a name then it's not really appropraite to have the forename on one line and the surname on the next.
e.g.
This...
<p><font face="Arial"><div id="FORENAME"> </div> <div id="SURNAME"> </div></font></p>
Gives this...
Name:
Joe
Bloggs
So, are there any other tags other than the div tag which would not cause a carriage return? I'm not really interested in concatenating the two values together in VB before inserting them, as that would involve hard coding checks for certain fields, and would not be a generic solution.
Any ideas anybody???